hc
2023-12-06 08f87f769b595151be1afeff53e144f543faa614
kernel/drivers/net/vmxnet3/vmxnet3_defs.h
....@@ -1,7 +1,7 @@
11 /*
22 * Linux driver for VMware's vmxnet3 ethernet NIC.
33 *
4
- * Copyright (C) 2008-2016, VMware, Inc. All Rights Reserved.
4
+ * Copyright (C) 2008-2020, VMware, Inc. All Rights Reserved.
55 *
66 * This program is free software; you can redistribute it and/or modify it
77 * under the terms of the GNU General Public License as published by the
....@@ -82,6 +82,7 @@
8282 VMXNET3_CMD_RESERVED3,
8383 VMXNET3_CMD_SET_COALESCE,
8484 VMXNET3_CMD_REGISTER_MEMREGS,
85
+ VMXNET3_CMD_SET_RSS_FIELDS,
8586
8687 VMXNET3_CMD_FIRST_GET = 0xF00D0000,
8788 VMXNET3_CMD_GET_QUEUE_STATUS = VMXNET3_CMD_FIRST_GET,
....@@ -96,19 +97,20 @@
9697 VMXNET3_CMD_GET_RESERVED1,
9798 VMXNET3_CMD_GET_TXDATA_DESC_SIZE,
9899 VMXNET3_CMD_GET_COALESCE,
100
+ VMXNET3_CMD_GET_RSS_FIELDS,
99101 };
100102
101103 /*
102104 * Little Endian layout of bitfields -
103105 * Byte 0 : 7.....len.....0
104
- * Byte 1 : rsvd gen 13.len.8
106
+ * Byte 1 : oco gen 13.len.8
105107 * Byte 2 : 5.msscof.0 ext1 dtype
106108 * Byte 3 : 13...msscof...6
107109 *
108110 * Big Endian layout of bitfields -
109111 * Byte 0: 13...msscof...6
110112 * Byte 1 : 5.msscof.0 ext1 dtype
111
- * Byte 2 : rsvd gen 13.len.8
113
+ * Byte 2 : oco gen 13.len.8
112114 * Byte 3 : 7.....len.....0
113115 *
114116 * Thus, le32_to_cpu on the dword will allow the big endian driver to read
....@@ -123,13 +125,13 @@
123125 u32 msscof:14; /* MSS, checksum offset, flags */
124126 u32 ext1:1;
125127 u32 dtype:1; /* descriptor type */
126
- u32 rsvd:1;
128
+ u32 oco:1;
127129 u32 gen:1; /* generation bit */
128130 u32 len:14;
129131 #else
130132 u32 len:14;
131133 u32 gen:1; /* generation bit */
132
- u32 rsvd:1;
134
+ u32 oco:1;
133135 u32 dtype:1; /* descriptor type */
134136 u32 ext1:1;
135137 u32 msscof:14; /* MSS, checksum offset, flags */
....@@ -155,9 +157,10 @@
155157 };
156158
157159 /* TxDesc.OM values */
158
-#define VMXNET3_OM_NONE 0
159
-#define VMXNET3_OM_CSUM 2
160
-#define VMXNET3_OM_TSO 3
160
+#define VMXNET3_OM_NONE 0
161
+#define VMXNET3_OM_ENCAP 1
162
+#define VMXNET3_OM_CSUM 2
163
+#define VMXNET3_OM_TSO 3
161164
162165 /* fields in TxDesc we access w/o using bit fields */
163166 #define VMXNET3_TXD_EOP_SHIFT 12
....@@ -223,6 +226,8 @@
223226 /* fields in RxDesc we access w/o using bit fields */
224227 #define VMXNET3_RXD_BTYPE_SHIFT 14
225228 #define VMXNET3_RXD_GEN_SHIFT 31
229
+
230
+#define VMXNET3_RCD_HDR_INNER_SHIFT 13
226231
227232 struct Vmxnet3_RxCompDesc {
228233 #ifdef __BIG_ENDIAN_BITFIELD
....@@ -685,12 +690,22 @@
685690 struct Vmxnet3_MemoryRegion memRegs[1];
686691 };
687692
693
+enum Vmxnet3_RSSField {
694
+ VMXNET3_RSS_FIELDS_TCPIP4 = 0x0001,
695
+ VMXNET3_RSS_FIELDS_TCPIP6 = 0x0002,
696
+ VMXNET3_RSS_FIELDS_UDPIP4 = 0x0004,
697
+ VMXNET3_RSS_FIELDS_UDPIP6 = 0x0008,
698
+ VMXNET3_RSS_FIELDS_ESPIP4 = 0x0010,
699
+ VMXNET3_RSS_FIELDS_ESPIP6 = 0x0020,
700
+};
701
+
688702 /* If the command data <= 16 bytes, use the shared memory directly.
689703 * otherwise, use variable length configuration descriptor.
690704 */
691705 union Vmxnet3_CmdInfo {
692706 struct Vmxnet3_VariableLenConfDesc varConf;
693707 struct Vmxnet3_SetPolling setPolling;
708
+ enum Vmxnet3_RSSField setRssFields;
694709 __le64 data[2];
695710 };
696711