]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Changes to header files vmnet_defs.h and vmxnet3_defs.h needed to
authorOliver Kurth <okurth@vmware.com>
Mon, 23 Oct 2017 21:21:21 +0000 (14:21 -0700)
committerOliver Kurth <okurth@vmware.com>
Mon, 23 Oct 2017 21:21:21 +0000 (14:21 -0700)
integrate ENS capabilities into existing Uplink capabilities.
The changes are not directly applicable to open-vm-tools.

open-vm-tools/modules/shared/vmxnet/vmnet_def.h
open-vm-tools/modules/shared/vmxnet/vmxnet3_defs.h

index 1c4419df97d7b9316c5d497b8267059383693318..6eb8a3565b74e4e5de42ffe9f9af7480b3b40ea7 100644 (file)
 #define VMNET_CAP_ADVERTISE_MODES      CONST64U(0x80000000000000)   /* Support getting/setting interconnect modes */
 #define VMNET_CAP_HW_DCB               CONST64U(0x100000000000000)  /* DCB capability in hardware */
 #define VMNET_CAP_RX_SW_LRO            CONST64U(0x200000000000000)  /* Suppport SW LRO */
+#define VMNET_CAP_ENS                  CONST64U(0x400000000000000)  /* Suppport ENS */
 #define VMNET_CAP_LEGACY               CONST64U(0x8000000000000000) /* Uplink is compatible with vmklinux drivers */
 
 #endif // _VMNET_DEF_H_
index 7637e8a49f72d234f0a7bc1e4ee779b38dcd1366..48112285eeb3025d1c328c416895fa4ae6e17b9d 100644 (file)
@@ -140,6 +140,7 @@ typedef enum {
    VMXNET3_CMD_GET_TXDATA_DESC_SIZE,
    VMXNET3_CMD_GET_COALESCE,
    VMXNET3_CMD_GET_RSS_FIELDS,
+   VMXNET3_CMD_GET_ENCAP_DSTPORT,
 } Vmxnet3_Cmd;
 
 /* Adaptive Ring Info Flags */
@@ -172,13 +173,13 @@ struct Vmxnet3_TxDesc {
    uint32 msscof:14;  /* MSS, checksum offset, flags */
    uint32 ext1:1;
    uint32 dtype:1;    /* descriptor type */
-   uint32 rsvd:1;
+   uint32 oco:1;      /* Outer csum offload */
    uint32 gen:1;      /* generation bit */
    uint32 len:14;
 #else
    uint32 len:14;
    uint32 gen:1;      /* generation bit */
-   uint32 rsvd:1;
+   uint32 oco:1;      /* Outer csum offload */
    uint32 dtype:1;    /* descriptor type */
    uint32 ext1:1;
    uint32 msscof:14;  /* MSS, checksum offset, flags */
@@ -206,9 +207,10 @@ struct Vmxnet3_TxDesc {
 Vmxnet3_TxDesc;
 
 /* TxDesc.OM values */
-#define VMXNET3_OM_NONE  0
-#define VMXNET3_OM_CSUM  2
-#define VMXNET3_OM_TSO   3
+#define VMXNET3_OM_NONE  0          /* 0b00 */
+#define VMXNET3_OM_ENCAP 1          /* 0b01 */
+#define VMXNET3_OM_CSUM  2          /* 0b10 */
+#define VMXNET3_OM_TSO   3          /* 0b11 */
 
 /* fields in TxDesc we access w/o using bit fields */
 #define VMXNET3_TXD_EOP_SHIFT 12
@@ -361,7 +363,15 @@ struct Vmxnet3_RxCompDescExt {
    uint8  segCnt;       /* Number of aggregated packets */
    uint8  dupAckCnt;    /* Number of duplicate Acks */
    __le16 tsDelta;      /* TCP timestamp difference */
-   __le32 dword2;
+
+#ifdef __BIG_ENDIAN_BITFIELD
+   uint32 encap:1;      /* LRO info refers to inner pkt */
+   uint32 reserved:31;
+#else
+   uint32 reserved:31;
+   uint32 encap:1;      /* LRO info refers to inner pkt */
+#endif  /* __BIG_ENDIAN_BITFIELD */
+
 #ifdef __BIG_ENDIAN_BITFIELD
    uint32 gen:1;        /* generation bit */
    uint32 type:7;       /* completion type */
@@ -856,6 +866,15 @@ typedef enum Vmxnet3_RSSField {
    VMXNET3_RSS_FIELDS_ESPIP6 = 0x0020,
 } Vmxnet3_RSSField;
 
+typedef
+#include "vmware_pack_begin.h"
+struct Vmxnet3_EncapDstPort {
+   __le16            geneveDstPort;
+   __le16            vxlanDstPort;
+}
+#include "vmware_pack_end.h"
+Vmxnet3_EncapDstPort;
+
 /*
  * If a command data does not exceed 16 bytes, it can use
  * the shared memory directly. Otherwise use variable length
@@ -867,6 +886,7 @@ union Vmxnet3_CmdInfo {
    Vmxnet3_VariableLenConfDesc varConf;
    Vmxnet3_SetPolling          setPolling;
    Vmxnet3_RSSField            setRSSFields;
+   Vmxnet3_EncapDstPort        encapDstPort;
    __le64                      data[2];
 }
 #include "vmware_pack_end.h"