DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH next 0/7] vmxnet3: upgrade to version 7
@ 2023-04-12 16:26 Ronak Doshi
  2023-04-12 16:26 ` [PATCH next 1/7] vmxnet3: prepare for version 7 changes Ronak Doshi
                   ` (7 more replies)
  0 siblings, 8 replies; 21+ messages in thread
From: Ronak Doshi @ 2023-04-12 16:26 UTC (permalink / raw)
  Cc: dev, Ronak Doshi

vmxnet3 emulation has recently added several new features including
support for uniform passthrough(UPT). To make UPT work vmxnet3 has
to be enhanced as per the new specification. This patch series
extends the vmxnet3 driver to leverage these new features.

Compatibility is maintained using existing vmxnet3 versioning mechanism as
follows:
- new features added to vmxnet3 emulation are associated with new vmxnet3
   version viz. vmxnet3 version 7.
- emulation advertises all the versions it supports to the driver.
- during initialization, vmxnet3 driver picks the highest version number
supported by both the emulation and the driver and configures emulation
to run at that version.

In particular, following changes are introduced:

Patch 1:
  This patch introduces utility macros for vmxnet3 version 7 comparison
  and updates Copyright information.

Patch 2:
  This patch adds new capability registers to fine control enablement of
  individual features based on emulation and passthrough.

Patch 3:
  This patch adds support for large passthrough BAR register.

Patch 4:
  This patch introduces new command to set ring buffer sizes to pass this
  information to the hardware.

Patch 5:
  For better performance, hardware has a requirement to limit number of TSO
  descriptors. This patch adds that support.

Patch 6:
  Avoid updating rxprod register when in UPT for performance reasons.

Patch 7:
  With all vmxnet3 version 7 changes incorporated in the vmxnet3 driver,
  with this patch, the driver can configure emulation to run at vmxnet3
  version 7.

Ronak Doshi (7):
  vmxnet3: prepare for version 7 changes
  vmxnet3: add support for capability registers
  vmxnet3: add support for large passthrough BAR register
  vmxnet3: add command to set ring buffer sizes
  vmxnet3: limit number of TXDs used for TSO packet
  vmxnet3: avoid updating rxprod register frequently
  vmxnet3: update to version 7

 drivers/net/vmxnet3/base/vmxnet3_defs.h |  74 +++++++++++++++++++---
 drivers/net/vmxnet3/vmxnet3_ethdev.c    | 106 +++++++++++++++++++++++++++++++-
 drivers/net/vmxnet3/vmxnet3_ethdev.h    |  16 +++++
 drivers/net/vmxnet3/vmxnet3_ring.h      |   2 +-
 drivers/net/vmxnet3/vmxnet3_rxtx.c      |  48 +++++++++++----
 lib/ethdev/rte_ethdev.h                 |   2 +
 6 files changed, 226 insertions(+), 22 deletions(-)

-- 
2.11.0


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH next 1/7] vmxnet3: prepare for version 7 changes
  2023-04-12 16:26 [PATCH next 0/7] vmxnet3: upgrade to version 7 Ronak Doshi
@ 2023-04-12 16:26 ` Ronak Doshi
  2023-04-26 16:58   ` Ferruh Yigit
  2023-04-12 16:26 ` [PATCH next 2/7] vmxnet3: add support for capability registers Ronak Doshi
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 21+ messages in thread
From: Ronak Doshi @ 2023-04-12 16:26 UTC (permalink / raw)
  To: Jochen Behrens; +Cc: dev, Ronak Doshi

vmxnet3 is currently at version 6 and this patch initiates the
preparation to accommodate changes for upto version 7. Introduced
utility macros for vmxnet3 version 7 comparison.

Signed-off-by: Ronak Doshi <doshir@vmware.com>
Acked-by: Jochen Behrens <jbehrens@vmware.com>
---
 drivers/net/vmxnet3/vmxnet3_ethdev.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.h b/drivers/net/vmxnet3/vmxnet3_ethdev.h
index 5a303717b1..fc976707fd 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.h
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.h
@@ -124,6 +124,7 @@ struct vmxnet3_hw {
 	UPT1_RxStats          snapshot_rx_stats[VMXNET3_MAX_RX_QUEUES];
 };
 
+#define VMXNET3_REV_7		6		/* Vmxnet3 Rev. 7 */
 #define VMXNET3_REV_6		5		/* Vmxnet3 Rev. 6 */
 #define VMXNET3_REV_5		4		/* Vmxnet3 Rev. 5 */
 #define VMXNET3_REV_4		3		/* Vmxnet3 Rev. 4 */
@@ -131,6 +132,7 @@ struct vmxnet3_hw {
 #define VMXNET3_REV_2		1		/* Vmxnet3 Rev. 2 */
 #define VMXNET3_REV_1		0		/* Vmxnet3 Rev. 1 */
 
+#define VMXNET3_VERSION_GE_7(hw) ((hw)->version >= VMXNET3_REV_7 + 1)
 #define VMXNET3_VERSION_GE_6(hw) ((hw)->version >= VMXNET3_REV_6 + 1)
 #define VMXNET3_VERSION_GE_5(hw) ((hw)->version >= VMXNET3_REV_5 + 1)
 #define VMXNET3_VERSION_GE_4(hw) ((hw)->version >= VMXNET3_REV_4 + 1)
-- 
2.11.0


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH next 2/7] vmxnet3: add support for capability registers
  2023-04-12 16:26 [PATCH next 0/7] vmxnet3: upgrade to version 7 Ronak Doshi
  2023-04-12 16:26 ` [PATCH next 1/7] vmxnet3: prepare for version 7 changes Ronak Doshi
@ 2023-04-12 16:26 ` Ronak Doshi
  2023-04-26 16:55   ` Ferruh Yigit
  2023-04-12 16:26 ` [PATCH next 3/7] vmxnet3: add support for large passthrough BAR register Ronak Doshi
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 21+ messages in thread
From: Ronak Doshi @ 2023-04-12 16:26 UTC (permalink / raw)
  To: Jochen Behrens, Thomas Monjalon, Ferruh Yigit, Andrew Rybchenko
  Cc: dev, Ronak Doshi

This patch enhances vmxnet3 to suuport capability registers which
allows it to enable features selectively. The DCR register tracks
the capabilities vmxnet3 device supports. The PTCR register states
the capabilities that the passthrough device supports.

With the help of these registers, vmxnet3 can enable only those
features which the passthrough device supoprts. This allows
smooth trasition to Uniform-Passthrough (UPT) mode if the virtual
nic requests it. If PTCR register returns nothing or error it means
UPT is not being requested and vnic will continue in emulation mode.

Signed-off-by: Ronak Doshi <doshir@vmware.com>
Acked-by: Jochen Behrens <jbehrens@vmware.com>
---
 drivers/net/vmxnet3/base/vmxnet3_defs.h | 44 +++++++++++++++++---
 drivers/net/vmxnet3/vmxnet3_ethdev.c    | 71 +++++++++++++++++++++++++++++++++
 drivers/net/vmxnet3/vmxnet3_ethdev.h    | 11 +++++
 lib/ethdev/rte_ethdev.h                 |  2 +
 4 files changed, 123 insertions(+), 5 deletions(-)

diff --git a/drivers/net/vmxnet3/base/vmxnet3_defs.h b/drivers/net/vmxnet3/base/vmxnet3_defs.h
index bd6695e69d..759fdb6e4a 100644
--- a/drivers/net/vmxnet3/base/vmxnet3_defs.h
+++ b/drivers/net/vmxnet3/base/vmxnet3_defs.h
@@ -26,6 +26,12 @@
 #define VMXNET3_REG_MACH  0x30   /* MAC Address High */
 #define VMXNET3_REG_ICR   0x38   /* Interrupt Cause Register */
 #define VMXNET3_REG_ECR   0x40   /* Event Cause Register */
+#define VMXNET3_REG_DCR   0x48   /* Device capability register,
+				  * from 0x48 to 0x80
+				  */
+#define VMXNET3_REG_PTCR  0x88   /* Passthru capbility register
+				  * from 0x88 to 0xb0
+				  */
 
 #define VMXNET3_REG_WSAL  0xF00  /* Wireless Shared Address Lo  */
 #define VMXNET3_REG_WSAH  0xF08  /* Wireless Shared Address Hi  */
@@ -103,11 +109,13 @@ typedef enum {
    VMXNET3_CMD_GET_CONF_INTR,
    VMXNET3_CMD_GET_ADAPTIVE_RING_INFO,
    VMXNET3_CMD_GET_TXDATA_DESC_SIZE,
-	VMXNET3_CMD_RESERVED5,
-	VMXNET3_CMD_RESERVED6,
-	VMXNET3_CMD_RESERVED7,
-	VMXNET3_CMD_RESERVED8,
-	VMXNET3_CMD_GET_MAX_QUEUES_CONF,
+   VMXNET3_CMD_RESERVED5,
+   VMXNET3_CMD_RESERVED6,
+   VMXNET3_CMD_RESERVED7,
+   VMXNET3_CMD_RESERVED8,
+   VMXNET3_CMD_GET_MAX_QUEUES_CONF,
+   VMXNET3_CMD_GET_MAX_CAPABILITIES,
+   VMXNET3_CMD_GET_DCR0_REG,
 } Vmxnet3_Cmd;
 
 /* Adaptive Ring Info Flags */
@@ -877,4 +885,30 @@ do {\
 
 #define VMXNET3_DID_PASSTHRU    0xFFFF
 
+#define VMXNET3_DCR_ERROR                          31   /* error when bit 31 of DCR is set */
+#define VMXNET3_CAP_UDP_RSS                        0    /* bit 0 of DCR 0 */
+#define VMXNET3_CAP_ESP_RSS_IPV4                   1    /* bit 1 of DCR 0 */
+#define VMXNET3_CAP_GENEVE_CHECKSUM_OFFLOAD        2    /* bit 2 of DCR 0 */
+#define VMXNET3_CAP_GENEVE_TSO                     3    /* bit 3 of DCR 0 */
+#define VMXNET3_CAP_VXLAN_CHECKSUM_OFFLOAD         4    /* bit 4 of DCR 0 */
+#define VMXNET3_CAP_VXLAN_TSO                      5    /* bit 5 of DCR 0 */
+#define VMXNET3_CAP_GENEVE_OUTER_CHECKSUM_OFFLOAD  6    /* bit 6 of DCR 0 */
+#define VMXNET3_CAP_VXLAN_OUTER_CHECKSUM_OFFLOAD   7    /* bit 7 of DCR 0 */
+#define VMXNET3_CAP_PKT_STEERING_IPV4              8    /* bit 8 of DCR 0 */
+#define VMXNET3_CAP_VERSION_4_MAX                  VMXNET3_CAP_PKT_STEERING_IPV4
+#define VMXNET3_CAP_ESP_RSS_IPV6                   9    /* bit 9 of DCR 0 */
+#define VMXNET3_CAP_VERSION_5_MAX                  VMXNET3_CAP_ESP_RSS_IPV6
+#define VMXNET3_CAP_ESP_OVER_UDP_RSS               10   /* bit 10 of DCR 0 */
+#define VMXNET3_CAP_INNER_RSS                      11   /* bit 11 of DCR 0 */
+#define VMXNET3_CAP_INNER_ESP_RSS                  12   /* bit 12 of DCR 0 */
+#define VMXNET3_CAP_CRC32_HASH_FUNC                13   /* bit 13 of DCR 0 */
+#define VMXNET3_CAP_VERSION_6_MAX                  VMXNET3_CAP_CRC32_HASH_FUNC
+#define VMXNET3_CAP_OAM_FILTER                     14   /* bit 14 of DCR 0 */
+#define VMXNET3_CAP_ESP_QS                         15   /* bit 15 of DCR 0 */
+#define VMXNET3_CAP_LARGE_BAR                      16   /* bit 16 of DCR 0 */
+#define VMXNET3_CAP_OOORX_COMP                     17   /* bit 17 of DCR 0 */
+#define VMXNET3_CAP_VERSION_7_MAX                  18
+/* when new capability is introduced, update VMXNET3_CAP_MAX */
+#define VMXNET3_CAP_MAX                            VMXNET3_CAP_VERSION_7_MAX
+
 #endif /* _VMXNET3_DEFS_H_ */
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index fd946dec5c..8d656ffaf8 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -299,6 +299,61 @@ eth_vmxnet3_txdata_get(struct vmxnet3_hw *hw)
 		sizeof(struct Vmxnet3_TxDataDesc) : txdata_desc_size;
 }
 
+static int
+eth_vmxnet3_setup_capabilities(struct vmxnet3_hw *hw,
+			       struct rte_eth_dev *eth_dev)
+{
+	uint32_t dcr, ptcr, value;
+	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
+
+	VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_CMD,
+			       VMXNET3_CMD_GET_MAX_CAPABILITIES);
+	value = VMXNET3_READ_BAR1_REG(hw, VMXNET3_REG_CMD);
+	hw->max_capabilities[0] = value;
+	dcr = VMXNET3_READ_BAR1_REG(hw, VMXNET3_REG_DCR);
+	hw->DCR_capabilities[0] = dcr;
+	hw->used_DCR_capabilities[0] = 0;
+	ptcr = VMXNET3_READ_BAR1_REG(hw, VMXNET3_REG_PTCR);
+	hw->PTCR_capabilities[0] = ptcr;
+	hw->used_PTCR_capabilities[0] = 0;
+
+	if (hw->uptv2_enabled && !(ptcr & (1 << VMXNET3_DCR_ERROR))) {
+		PMD_DRV_LOG(NOTICE, "UPTv2 enabled");
+		hw->used_PTCR_capabilities[0] = ptcr;
+	} else {
+		/* Use all DCR capabilities, but disable large bar */
+		hw->used_DCR_capabilities[0] = dcr &
+					(~(1UL << VMXNET3_CAP_LARGE_BAR));
+		PMD_DRV_LOG(NOTICE, "UPTv2 disabled");
+	}
+	if (hw->DCR_capabilities[0] & (1UL << VMXNET3_CAP_OOORX_COMP) &&
+	    hw->PTCR_capabilities[0] & (1UL << VMXNET3_CAP_OOORX_COMP)) {
+		if (hw->uptv2_enabled) {
+			hw->used_PTCR_capabilities[0] |=
+				(1UL << VMXNET3_CAP_OOORX_COMP);
+		}
+	}
+	if (hw->used_PTCR_capabilities[0]) {
+		VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_DCR,
+				       hw->used_PTCR_capabilities[0]);
+	} else if (hw->used_DCR_capabilities[0]) {
+		VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_DCR,
+				       hw->used_DCR_capabilities[0]);
+	}
+	VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_CMD, VMXNET3_CMD_GET_DCR0_REG);
+	dcr = VMXNET3_READ_BAR1_REG(hw, VMXNET3_REG_CMD);
+	hw->used_DCR_capabilities[0] = dcr;
+	PMD_DRV_LOG(NOTICE, "Dev "PCI_PRI_FMT", vmxnet3 v%d, UPT enabled: %s, "
+		    "DCR0=0x%08x, used DCR=0x%08x, "
+		    "PTCR=0x%08x, used PTCR=0x%08x",
+		    pci_dev->addr.domain, pci_dev->addr.bus,
+		    pci_dev->addr.devid, pci_dev->addr.function, hw->version,
+		    hw->uptv2_enabled ? "true" : "false",
+		    hw->DCR_capabilities[0], hw->used_DCR_capabilities[0],
+		    hw->PTCR_capabilities[0], hw->used_PTCR_capabilities[0]);
+	return 0;
+}
+
 /*
  * It returns 0 on success.
  */
@@ -396,6 +451,11 @@ eth_vmxnet3_dev_init(struct rte_eth_dev *eth_dev)
 		return -EIO;
 	}
 
+	if (VMXNET3_VERSION_GE_7(hw)) {
+		/* start with UPTv2 enabled to avoid ESXi issues */
+		hw->uptv2_enabled = TRUE;
+		eth_vmxnet3_setup_capabilities(hw, eth_dev);
+	}
 	/* Getting MAC Address */
 	mac_lo = VMXNET3_READ_BAR1_REG(hw, VMXNET3_REG_MACL);
 	mac_hi = VMXNET3_READ_BAR1_REG(hw, VMXNET3_REG_MACH);
@@ -1433,6 +1493,17 @@ vmxnet3_dev_info_get(struct rte_eth_dev *dev,
 {
 	struct vmxnet3_hw *hw = dev->data->dev_private;
 	int queues = 0;
+	uint32_t dcr, ptcr;
+
+	if (VMXNET3_VERSION_GE_7(hw)) {
+		dcr = VMXNET3_READ_BAR1_REG(hw, VMXNET3_REG_DCR);
+		if (dcr & (1 << VMXNET3_CAP_LARGE_BAR)) {
+			ptcr = VMXNET3_READ_BAR1_REG(hw, VMXNET3_REG_PTCR);
+			if (!(ptcr & (1 << VMXNET3_DCR_ERROR))) {
+				dev_info->dev_capa = RTE_ETH_DEV_CAPA_PASS_THRU;
+			}
+		}
+	}
 
 	if (VMXNET3_VERSION_GE_6(hw)) {
 		VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_CMD,
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.h b/drivers/net/vmxnet3/vmxnet3_ethdev.h
index fc976707fd..1bbf2b4465 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.h
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.h
@@ -122,6 +122,17 @@ struct vmxnet3_hw {
 	UPT1_RxStats	      saved_rx_stats[VMXNET3_EXT_MAX_RX_QUEUES];
 	UPT1_TxStats          snapshot_tx_stats[VMXNET3_MAX_TX_QUEUES];
 	UPT1_RxStats          snapshot_rx_stats[VMXNET3_MAX_RX_QUEUES];
+	/* device capability bit map */
+	uint32_t	      DCR_capabilities[8];
+	/* pass-through capability bit map */
+	uint32_t	      PTCR_capabilities[8];
+	/* max number of capabilities */
+	uint32_t	      max_capabilities[8];
+	/* used device capability bit map */
+	uint32_t	      used_DCR_capabilities[8];
+	/* used pass-through capability bit map */
+	uint32_t	      used_PTCR_capabilities[8];
+	bool                  uptv2_enabled;
 };
 
 #define VMXNET3_REV_7		6		/* Vmxnet3 Rev. 7 */
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index 049641d57c..fd0bc30cfd 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -1606,6 +1606,8 @@ struct rte_eth_conf {
 #define RTE_ETH_DEV_CAPA_FLOW_RULE_KEEP         RTE_BIT64(3)
 /** Device supports keeping shared flow objects across restart. */
 #define RTE_ETH_DEV_CAPA_FLOW_SHARED_OBJECT_KEEP RTE_BIT64(4)
+/**< (vmxnet3) Device supports smart NIC pass through queues */
+#define RTE_ETH_DEV_CAPA_PASS_THRU RTE_BIT64(5)
 /**@}*/
 
 /*
-- 
2.11.0


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH next 3/7] vmxnet3: add support for large passthrough BAR register
  2023-04-12 16:26 [PATCH next 0/7] vmxnet3: upgrade to version 7 Ronak Doshi
  2023-04-12 16:26 ` [PATCH next 1/7] vmxnet3: prepare for version 7 changes Ronak Doshi
  2023-04-12 16:26 ` [PATCH next 2/7] vmxnet3: add support for capability registers Ronak Doshi
@ 2023-04-12 16:26 ` Ronak Doshi
  2023-04-12 16:26 ` [PATCH next 4/7] vmxnet3: add command to set ring buffer sizes Ronak Doshi
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 21+ messages in thread
From: Ronak Doshi @ 2023-04-12 16:26 UTC (permalink / raw)
  To: Jochen Behrens; +Cc: dev, Ronak Doshi

For vmxnet3 to work in UPT mode, the BAR sizes have been increased.
The PT page has been extended to 2 pages and also includes OOB pages
as a part of PT BAR. This patch enhances vmxnet3 to use appropriate
BAR offsets based on the capability registered. To use new offsets,
VMXNET3_CAP_LARGE_BAR needs to be set by the device. If it is not set
then the device will use legacy PT page layout.

Signed-off-by: Ronak Doshi <doshir@vmware.com>
Acked-by: Jochen Behrens <jbehrens@vmware.com>
---
 drivers/net/vmxnet3/base/vmxnet3_defs.h | 13 +++++++++++--
 drivers/net/vmxnet3/vmxnet3_ethdev.c    | 11 +++++++++++
 drivers/net/vmxnet3/vmxnet3_ethdev.h    |  2 ++
 drivers/net/vmxnet3/vmxnet3_rxtx.c      | 13 +++++++------
 4 files changed, 31 insertions(+), 8 deletions(-)

diff --git a/drivers/net/vmxnet3/base/vmxnet3_defs.h b/drivers/net/vmxnet3/base/vmxnet3_defs.h
index 759fdb6e4a..27f35a0062 100644
--- a/drivers/net/vmxnet3/base/vmxnet3_defs.h
+++ b/drivers/net/vmxnet3/base/vmxnet3_defs.h
@@ -43,8 +43,16 @@
 #define VMXNET3_REG_RXPROD   0x800 /* Rx Producer Index for ring 1 */
 #define VMXNET3_REG_RXPROD2  0xA00 /* Rx Producer Index for ring 2 */
 
-#define VMXNET3_PT_REG_SIZE     4096    /* BAR 0 */
-#define VMXNET3_VD_REG_SIZE     4096    /* BAR 1 */
+/* For Large PT BAR, the following offset to DB register */
+#define VMXNET3_REG_LB_TXPROD   0x1000 /* Tx Producer Index */
+#define VMXNET3_REG_LB_RXPROD   0x1400 /* Rx Producer Index for ring 1 */
+#define VMXNET3_REG_LB_RXPROD2  0x1800 /* Rx Producer Index for ring 2 */
+
+#define VMXNET3_PT_REG_SIZE         4096           /* BAR 0 */
+#define VMXNET3_LARGE_PT_REG_SIZE   8192           /* large PT pages */
+#define VMXNET3_VD_REG_SIZE         4096           /* BAR 1 */
+#define VMXNET3_LARGE_BAR0_REG_SIZE (4096 * 4096)  /* LARGE BAR 0 */
+#define VMXNET3_OOB_REG_SIZE        (4094 * 4096)  /* OOB pages */
 
 /*
  * The two Vmxnet3 MMIO Register PCI BARs (BAR 0 at offset 10h and BAR 1 at
@@ -56,6 +64,7 @@
  * VMXNET3_MSIX_BAR_SIZE is defined in "vmxnet3Int.h"
  */
 #define VMXNET3_PHYSMEM_PAGES   4
+#define VMXNET3_PHYSMEM_LB_PAGES 4099 /* 4096 + 1 + 2 */
 
 #define VMXNET3_REG_ALIGN       8  /* All registers are 8-byte aligned. */
 #define VMXNET3_REG_ALIGN_MASK  0x7
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 8d656ffaf8..a04a16a3e0 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -456,6 +456,17 @@ eth_vmxnet3_dev_init(struct rte_eth_dev *eth_dev)
 		hw->uptv2_enabled = TRUE;
 		eth_vmxnet3_setup_capabilities(hw, eth_dev);
 	}
+
+	if (hw->used_DCR_capabilities[0] & (1 << VMXNET3_CAP_LARGE_BAR)) {
+		hw->tx_prod_offset = VMXNET3_REG_LB_TXPROD;
+		hw->rx_prod_offset[0] = VMXNET3_REG_LB_RXPROD;
+		hw->rx_prod_offset[1] = VMXNET3_REG_LB_RXPROD2;
+	} else {
+		hw->tx_prod_offset = VMXNET3_REG_TXPROD;
+		hw->rx_prod_offset[0] = VMXNET3_REG_RXPROD;
+		hw->rx_prod_offset[1] = VMXNET3_REG_RXPROD2;
+	}
+
 	/* Getting MAC Address */
 	mac_lo = VMXNET3_READ_BAR1_REG(hw, VMXNET3_REG_MACL);
 	mac_hi = VMXNET3_READ_BAR1_REG(hw, VMXNET3_REG_MACH);
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.h b/drivers/net/vmxnet3/vmxnet3_ethdev.h
index 1bbf2b4465..cabd83e7e1 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.h
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.h
@@ -122,6 +122,8 @@ struct vmxnet3_hw {
 	UPT1_RxStats	      saved_rx_stats[VMXNET3_EXT_MAX_RX_QUEUES];
 	UPT1_TxStats          snapshot_tx_stats[VMXNET3_MAX_TX_QUEUES];
 	UPT1_RxStats          snapshot_rx_stats[VMXNET3_MAX_RX_QUEUES];
+	uint16_t              tx_prod_offset;
+	uint16_t              rx_prod_offset[2];
 	/* device capability bit map */
 	uint32_t	      DCR_capabilities[8];
 	/* pass-through capability bit map */
diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index a875ffec07..83daac02c4 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -57,8 +57,6 @@
 #define	VMXNET3_TX_OFFLOAD_NOTSUP_MASK	\
 	(RTE_MBUF_F_TX_OFFLOAD_MASK ^ VMXNET3_TX_OFFLOAD_MASK)
 
-static const uint32_t rxprod_reg[2] = {VMXNET3_REG_RXPROD, VMXNET3_REG_RXPROD2};
-
 static int vmxnet3_post_rx_bufs(vmxnet3_rx_queue_t*, uint8_t);
 static void vmxnet3_tq_tx_complete(vmxnet3_tx_queue_t *);
 #ifdef RTE_LIBRTE_VMXNET3_DEBUG_DRIVER_NOT_USED
@@ -577,7 +575,7 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 	if (deferred >= rte_le_to_cpu_32(txq_ctrl->txThreshold)) {
 		txq_ctrl->txNumDeferred = 0;
 		/* Notify vSwitch that packets are available. */
-		VMXNET3_WRITE_BAR0_REG(hw, (VMXNET3_REG_TXPROD + txq->queue_id * VMXNET3_REG_ALIGN),
+		VMXNET3_WRITE_BAR0_REG(hw, (hw->tx_prod_offset + txq->queue_id * VMXNET3_REG_ALIGN),
 				       txq->cmd_ring.next2fill);
 	}
 
@@ -1000,7 +998,8 @@ vmxnet3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 		/* It's time to renew descriptors */
 		vmxnet3_renew_desc(rxq, ring_idx, newm);
 		if (unlikely(rxq->shared->ctrl.updateRxProd)) {
-			VMXNET3_WRITE_BAR0_REG(hw, rxprod_reg[ring_idx] + (rxq->queue_id * VMXNET3_REG_ALIGN),
+			VMXNET3_WRITE_BAR0_REG(hw, hw->rx_prod_offset[ring_idx] +
+					       (rxq->queue_id * VMXNET3_REG_ALIGN),
 					       rxq->cmd_ring[ring_idx].next2fill);
 		}
 
@@ -1027,7 +1026,8 @@ vmxnet3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 		}
 		if (unlikely(rxq->shared->ctrl.updateRxProd)) {
 			for (ring_idx = 0; ring_idx < VMXNET3_RX_CMDRING_SIZE; ring_idx++) {
-				VMXNET3_WRITE_BAR0_REG(hw, rxprod_reg[ring_idx] + (rxq->queue_id * VMXNET3_REG_ALIGN),
+				VMXNET3_WRITE_BAR0_REG(hw, hw->rx_prod_offset[ring_idx] +
+						       (rxq->queue_id * VMXNET3_REG_ALIGN),
 						       rxq->cmd_ring[ring_idx].next2fill);
 			}
 		}
@@ -1322,7 +1322,8 @@ vmxnet3_dev_rxtx_init(struct rte_eth_dev *dev)
 			 * mbufs for coming packets.
 			 */
 			if (unlikely(rxq->shared->ctrl.updateRxProd)) {
-				VMXNET3_WRITE_BAR0_REG(hw, rxprod_reg[j] + (rxq->queue_id * VMXNET3_REG_ALIGN),
+				VMXNET3_WRITE_BAR0_REG(hw, hw->rx_prod_offset[j] +
+						       (rxq->queue_id * VMXNET3_REG_ALIGN),
 						       rxq->cmd_ring[j].next2fill);
 			}
 		}
-- 
2.11.0


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH next 4/7] vmxnet3: add command to set ring buffer sizes
  2023-04-12 16:26 [PATCH next 0/7] vmxnet3: upgrade to version 7 Ronak Doshi
                   ` (2 preceding siblings ...)
  2023-04-12 16:26 ` [PATCH next 3/7] vmxnet3: add support for large passthrough BAR register Ronak Doshi
@ 2023-04-12 16:26 ` Ronak Doshi
  2023-04-26 16:58   ` Ferruh Yigit
  2023-04-12 16:26 ` [PATCH next 5/7] vmxnet3: limit number of TXDs used for TSO packet Ronak Doshi
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 21+ messages in thread
From: Ronak Doshi @ 2023-04-12 16:26 UTC (permalink / raw)
  To: Jochen Behrens; +Cc: dev, Ronak Doshi

This patch adds a new command to set ring buffer sizes. This is
required to pass the buffer size information to passthrough devices.
Also, ring sizes are round down to power of 2.

Signed-off-by: Ronak Doshi <doshir@vmware.com>
Acked-by: Jochen Behrens <jbehrens@vmware.com>
---
 drivers/net/vmxnet3/base/vmxnet3_defs.h | 15 +++++++++++++++
 drivers/net/vmxnet3/vmxnet3_ethdev.c    | 18 ++++++++++++++++++
 drivers/net/vmxnet3/vmxnet3_ethdev.h    |  1 +
 drivers/net/vmxnet3/vmxnet3_rxtx.c      |  7 +++++++
 4 files changed, 41 insertions(+)

diff --git a/drivers/net/vmxnet3/base/vmxnet3_defs.h b/drivers/net/vmxnet3/base/vmxnet3_defs.h
index 27f35a0062..d8cc295b08 100644
--- a/drivers/net/vmxnet3/base/vmxnet3_defs.h
+++ b/drivers/net/vmxnet3/base/vmxnet3_defs.h
@@ -105,6 +105,9 @@ typedef enum {
    VMXNET3_CMD_RESERVED4,
    VMXNET3_CMD_REGISTER_MEMREGS,
    VMXNET3_CMD_SET_RSS_FIELDS,
+   VMXNET3_CMD_RESERVED9,
+   VMXNET3_CMD_RESERVED10,
+   VMXNET3_CMD_SET_RING_BUFFER_SIZE,
 
    VMXNET3_CMD_FIRST_GET = 0xF00D0000,
    VMXNET3_CMD_GET_QUEUE_STATUS = VMXNET3_CMD_FIRST_GET,
@@ -822,6 +825,17 @@ typedef enum Vmxnet3_RSSField {
    VMXNET3_RSS_FIELDS_ESPIP6 = 0x0020,
 } Vmxnet3_RSSField;
 
+typedef
+#include "vmware_pack_begin.h"
+struct Vmxnet3_RingBufferSize {
+	__le16      ring1BufSizeType0;
+	__le16      ring1BufSizeType1;
+	__le16      ring2BufSizeType1;
+	__le16      pad;
+}
+#include "vmware_pack_end.h"
+Vmxnet3_RingBufferSize;
+
 /*
  * If the command data <= 16 bytes, use the shared memory direcly.
  * Otherwise, use the variable length configuration descriptor.
@@ -832,6 +846,7 @@ union Vmxnet3_CmdInfo {
    Vmxnet3_VariableLenConfDesc varConf;
    Vmxnet3_SetPolling          setPolling;
    Vmxnet3_RSSField            setRSSFields;
+   Vmxnet3_RingBufferSize      ringBufSize;
    __le16                      reserved[2];
    __le64                      data[2];
 }
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index a04a16a3e0..72ccd0f7fc 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -1018,6 +1018,22 @@ vmxnet3_setup_driver_shared(struct rte_eth_dev *dev)
 	return VMXNET3_SUCCESS;
 }
 
+static void
+vmxnet3_init_bufsize(struct vmxnet3_hw *hw)
+{
+	struct Vmxnet3_DriverShared *shared = hw->shared;
+	union Vmxnet3_CmdInfo *cmd_info = &shared->cu.cmdInfo;
+
+	if (!VMXNET3_VERSION_GE_7(hw))
+		return;
+
+	cmd_info->ringBufSize.ring1BufSizeType0 = hw->rxdata_buf_size;
+	cmd_info->ringBufSize.ring1BufSizeType1 = 0;
+	cmd_info->ringBufSize.ring2BufSizeType1 = hw->rxdata_buf_size;
+	VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_CMD,
+			       VMXNET3_CMD_SET_RING_BUFFER_SIZE);
+}
+
 /*
  * Configure device link speed and setup link.
  * Must be called after eth_vmxnet3_dev_init. Other wise it might fail
@@ -1101,6 +1117,8 @@ vmxnet3_dev_start(struct rte_eth_dev *dev)
 		return ret;
 	}
 
+	vmxnet3_init_bufsize(hw);
+
 	hw->adapter_stopped = FALSE;
 
 	/* Setting proper Rx Mode and issue Rx Mode Update command */
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.h b/drivers/net/vmxnet3/vmxnet3_ethdev.h
index cabd83e7e1..2b3e2c4caa 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.h
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.h
@@ -96,6 +96,7 @@ struct vmxnet3_hw {
 
 	uint16_t txdata_desc_size; /* tx data ring buffer size */
 	uint16_t rxdata_desc_size; /* rx data ring buffer size */
+	uint16_t rxdata_buf_size; /* rx data buffer size */
 
 	uint8_t num_intrs;
 
diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index 83daac02c4..e31878ecab 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -1113,6 +1113,8 @@ vmxnet3_dev_tx_queue_setup(struct rte_eth_dev *dev,
 		return -EINVAL;
 	} else {
 		ring->size = nb_desc;
+		if (VMXNET3_VERSION_GE_7(hw))
+			ring->size = rte_align32prevpow2(nb_desc);
 		ring->size &= ~VMXNET3_RING_SIZE_MASK;
 	}
 	comp_ring->size = data_ring->size = ring->size;
@@ -1193,6 +1195,9 @@ vmxnet3_dev_rx_queue_setup(struct rte_eth_dev *dev,
 	}
 
 	rxq->mp = mp;
+	/* Remember buffer size for initialization in dev start. */
+	hw->rxdata_buf_size =
+		rte_pktmbuf_data_room_size(mp) - RTE_PKTMBUF_HEADROOM;
 	rxq->queue_id = queue_idx;
 	rxq->port_id = dev->data->port_id;
 	rxq->shared = NULL; /* set in vmxnet3_setup_driver_shared() */
@@ -1217,6 +1222,8 @@ vmxnet3_dev_rx_queue_setup(struct rte_eth_dev *dev,
 		return -EINVAL;
 	} else {
 		ring0->size = nb_desc;
+		if (VMXNET3_VERSION_GE_7(hw))
+			ring0->size = rte_align32prevpow2(nb_desc);
 		ring0->size &= ~VMXNET3_RING_SIZE_MASK;
 		ring1->size = ring0->size;
 	}
-- 
2.11.0


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH next 5/7] vmxnet3: limit number of TXDs used for TSO packet
  2023-04-12 16:26 [PATCH next 0/7] vmxnet3: upgrade to version 7 Ronak Doshi
                   ` (3 preceding siblings ...)
  2023-04-12 16:26 ` [PATCH next 4/7] vmxnet3: add command to set ring buffer sizes Ronak Doshi
@ 2023-04-12 16:26 ` Ronak Doshi
  2023-04-12 16:26 ` [PATCH next 6/7] vmxnet3: avoid updating rxprod register frequently Ronak Doshi
                   ` (2 subsequent siblings)
  7 siblings, 0 replies; 21+ messages in thread
From: Ronak Doshi @ 2023-04-12 16:26 UTC (permalink / raw)
  To: Jochen Behrens; +Cc: dev, Ronak Doshi

Currently, vmxnet3 does not have a limit on number of descriptors
used for a TSO packet. However, with UPT, for hardware performance
reasons, this patch limits the number of transmit descriptors to 24
for a TSO packet.

Signed-off-by: Ronak Doshi <doshir@vmware.com>
Acked-by: Jochen Behrens <jbehrens@vmware.com>
---
 drivers/net/vmxnet3/base/vmxnet3_defs.h |  2 ++
 drivers/net/vmxnet3/vmxnet3_rxtx.c      | 18 ++++++++++++++----
 2 files changed, 16 insertions(+), 4 deletions(-)

diff --git a/drivers/net/vmxnet3/base/vmxnet3_defs.h b/drivers/net/vmxnet3/base/vmxnet3_defs.h
index d8cc295b08..24c235876e 100644
--- a/drivers/net/vmxnet3/base/vmxnet3_defs.h
+++ b/drivers/net/vmxnet3/base/vmxnet3_defs.h
@@ -419,6 +419,8 @@ typedef union Vmxnet3_GenericDesc {
 
 /* max # of tx descs for a non-tso pkt */
 #define VMXNET3_MAX_TXD_PER_PKT 16
+/* max # of tx descs for a tso pkt */
+#define VMXNET3_MAX_TSO_TXD_PER_PKT 24
 
 /* Max size of a single rx buffer */
 #define VMXNET3_MAX_RX_BUF_SIZE  ((1 << 14) - 1)
diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index e31878ecab..7bbae4177e 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -364,6 +364,14 @@ vmxnet3_prep_pkts(__rte_unused void *tx_queue, struct rte_mbuf **tx_pkts,
 			rte_errno = EINVAL;
 			return i;
 		}
+		/* TSO packet cannot occupy more than
+		 * VMXNET3_MAX_TSO_TXD_PER_PKT TX descriptors.
+		 */
+		if ((ol_flags & RTE_MBUF_F_TX_TCP_SEG) != 0 &&
+				m->nb_segs > VMXNET3_MAX_TSO_TXD_PER_PKT) {
+			rte_errno = EINVAL;
+			return i;
+		}
 
 		/* check that only supported TX offloads are requested. */
 		if ((ol_flags & VMXNET3_TX_OFFLOAD_NOTSUP_MASK) != 0 ||
@@ -444,10 +452,12 @@ vmxnet3_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts,
 			continue;
 		}
 
-		/* Drop non-TSO packet that is excessively fragmented */
-		if (unlikely(!tso && count > VMXNET3_MAX_TXD_PER_PKT)) {
-			PMD_TX_LOG(ERR, "Non-TSO packet cannot occupy more than %d tx "
-				   "descriptors. Packet dropped.", VMXNET3_MAX_TXD_PER_PKT);
+		/* Drop non-TSO or TSO packet that is excessively fragmented */
+		if (unlikely((!tso && count > VMXNET3_MAX_TXD_PER_PKT) ||
+			     (tso && count > VMXNET3_MAX_TSO_TXD_PER_PKT))) {
+			PMD_TX_LOG(ERR, "Non-TSO or TSO packet cannot occupy more than "
+				   "%d or %d tx descriptors respectively. Packet dropped.",
+				   VMXNET3_MAX_TXD_PER_PKT, VMXNET3_MAX_TSO_TXD_PER_PKT);
 			txq->stats.drop_too_many_segs++;
 			txq->stats.drop_total++;
 			rte_pktmbuf_free(txm);
-- 
2.11.0


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH next 6/7] vmxnet3: avoid updating rxprod register frequently
  2023-04-12 16:26 [PATCH next 0/7] vmxnet3: upgrade to version 7 Ronak Doshi
                   ` (4 preceding siblings ...)
  2023-04-12 16:26 ` [PATCH next 5/7] vmxnet3: limit number of TXDs used for TSO packet Ronak Doshi
@ 2023-04-12 16:26 ` Ronak Doshi
  2023-04-12 16:26 ` [PATCH next 7/7] vmxnet3: update to version 7 Ronak Doshi
  2023-04-26 16:54 ` [PATCH next 0/7] vmxnet3: upgrade " Ferruh Yigit
  7 siblings, 0 replies; 21+ messages in thread
From: Ronak Doshi @ 2023-04-12 16:26 UTC (permalink / raw)
  To: Jochen Behrens; +Cc: dev, Ronak Doshi

When UPT is enabled, the driver updates rxprod register to
let the device know that it has processed the received packets
and new buffers are available. However, updating it too
frequently can lead to reduced performance.

This patch adds code to avoid updating the register frequently.

Signed-off-by: Ronak Doshi <doshir@vmware.com>
Acked-by: Jochen Behrens <jbehrens@vmware.com>
---
 drivers/net/vmxnet3/vmxnet3_rxtx.c | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c b/drivers/net/vmxnet3/vmxnet3_rxtx.c
index 7bbae4177e..39ad0726cb 100644
--- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
+++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
@@ -1007,7 +1007,8 @@ vmxnet3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 
 		/* It's time to renew descriptors */
 		vmxnet3_renew_desc(rxq, ring_idx, newm);
-		if (unlikely(rxq->shared->ctrl.updateRxProd)) {
+		if (unlikely(rxq->shared->ctrl.updateRxProd &&
+			 (rxq->cmd_ring[ring_idx].next2fill & 0xf) == 0)) {
 			VMXNET3_WRITE_BAR0_REG(hw, hw->rx_prod_offset[ring_idx] +
 					       (rxq->queue_id * VMXNET3_REG_ALIGN),
 					       rxq->cmd_ring[ring_idx].next2fill);
@@ -1027,18 +1028,21 @@ vmxnet3_recv_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts)
 
 	if (unlikely(nb_rxd == 0)) {
 		uint32_t avail;
+		uint32_t posted = 0;
 		for (ring_idx = 0; ring_idx < VMXNET3_RX_CMDRING_SIZE; ring_idx++) {
 			avail = vmxnet3_cmd_ring_desc_avail(&rxq->cmd_ring[ring_idx]);
 			if (unlikely(avail > 0)) {
 				/* try to alloc new buf and renew descriptors */
-				vmxnet3_post_rx_bufs(rxq, ring_idx);
+				if (vmxnet3_post_rx_bufs(rxq, ring_idx) > 0)
+					posted |= (1 << ring_idx);
 			}
 		}
 		if (unlikely(rxq->shared->ctrl.updateRxProd)) {
 			for (ring_idx = 0; ring_idx < VMXNET3_RX_CMDRING_SIZE; ring_idx++) {
-				VMXNET3_WRITE_BAR0_REG(hw, hw->rx_prod_offset[ring_idx] +
-						       (rxq->queue_id * VMXNET3_REG_ALIGN),
-						       rxq->cmd_ring[ring_idx].next2fill);
+				if (posted & (1 << ring_idx))
+					VMXNET3_WRITE_BAR0_REG(hw, hw->rx_prod_offset[ring_idx] +
+							       (rxq->queue_id * VMXNET3_REG_ALIGN),
+							       rxq->cmd_ring[ring_idx].next2fill);
 			}
 		}
 	}
-- 
2.11.0


^ permalink raw reply	[flat|nested] 21+ messages in thread

* [PATCH next 7/7] vmxnet3: update to version 7
  2023-04-12 16:26 [PATCH next 0/7] vmxnet3: upgrade to version 7 Ronak Doshi
                   ` (5 preceding siblings ...)
  2023-04-12 16:26 ` [PATCH next 6/7] vmxnet3: avoid updating rxprod register frequently Ronak Doshi
@ 2023-04-12 16:26 ` Ronak Doshi
  2023-04-26 16:54 ` [PATCH next 0/7] vmxnet3: upgrade " Ferruh Yigit
  7 siblings, 0 replies; 21+ messages in thread
From: Ronak Doshi @ 2023-04-12 16:26 UTC (permalink / raw)
  To: Jochen Behrens; +Cc: dev, Ronak Doshi

With all vmxnet3 version 7 changes incorporated in the vmxnet3 driver,
the driver can configure emulation to run at vmxnet3 version 7, provided
the emulation advertises support for version 7.

Signed-off-by: Ronak Doshi <doshir@vmware.com>
Acked-by: Jochen Behrens <jbehrens@vmware.com>
---
 drivers/net/vmxnet3/vmxnet3_ethdev.c | 6 +++++-
 drivers/net/vmxnet3/vmxnet3_ring.h   | 2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 72ccd0f7fc..a9250f8206 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -410,7 +410,11 @@ eth_vmxnet3_dev_init(struct rte_eth_dev *eth_dev)
 	/* Check h/w version compatibility with driver. */
 	ver = VMXNET3_READ_BAR1_REG(hw, VMXNET3_REG_VRRS);
 
-	if (ver & (1 << VMXNET3_REV_6)) {
+	if (ver & (1 << VMXNET3_REV_7)) {
+		VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_VRRS,
+				       1 << VMXNET3_REV_7);
+		hw->version = VMXNET3_REV_7 + 1;
+	} else if (ver & (1 << VMXNET3_REV_6)) {
 		VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_VRRS,
 				       1 << VMXNET3_REV_6);
 		hw->version = VMXNET3_REV_6 + 1;
diff --git a/drivers/net/vmxnet3/vmxnet3_ring.h b/drivers/net/vmxnet3/vmxnet3_ring.h
index 50992349d8..948762db90 100644
--- a/drivers/net/vmxnet3/vmxnet3_ring.h
+++ b/drivers/net/vmxnet3/vmxnet3_ring.h
@@ -7,7 +7,7 @@
 
 #define VMXNET3_RX_CMDRING_SIZE 2
 
-#define VMXNET3_DRIVER_VERSION_NUM 0x01012000
+#define VMXNET3_DRIVER_VERSION_NUM 0x01013000
 
 /* Default ring size */
 #define VMXNET3_DEF_TX_RING_SIZE 512
-- 
2.11.0


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH next 0/7] vmxnet3: upgrade to version 7
  2023-04-12 16:26 [PATCH next 0/7] vmxnet3: upgrade to version 7 Ronak Doshi
                   ` (6 preceding siblings ...)
  2023-04-12 16:26 ` [PATCH next 7/7] vmxnet3: update to version 7 Ronak Doshi
@ 2023-04-26 16:54 ` Ferruh Yigit
  2023-04-26 18:15   ` Ferruh Yigit
  7 siblings, 1 reply; 21+ messages in thread
From: Ferruh Yigit @ 2023-04-26 16:54 UTC (permalink / raw)
  To: Ronak Doshi; +Cc: dev

On 4/12/2023 5:26 PM, Ronak Doshi wrote:
> vmxnet3 emulation has recently added several new features including
> support for uniform passthrough(UPT). To make UPT work vmxnet3 has
> to be enhanced as per the new specification. This patch series
> extends the vmxnet3 driver to leverage these new features.
> 
> Compatibility is maintained using existing vmxnet3 versioning mechanism as
> follows:
> - new features added to vmxnet3 emulation are associated with new vmxnet3
>    version viz. vmxnet3 version 7.
> - emulation advertises all the versions it supports to the driver.
> - during initialization, vmxnet3 driver picks the highest version number
> supported by both the emulation and the driver and configures emulation
> to run at that version.
> 
> In particular, following changes are introduced:
> 
> Patch 1:
>   This patch introduces utility macros for vmxnet3 version 7 comparison
>   and updates Copyright information.
> 
> Patch 2:
>   This patch adds new capability registers to fine control enablement of
>   individual features based on emulation and passthrough.
> 
> Patch 3:
>   This patch adds support for large passthrough BAR register.
> 
> Patch 4:
>   This patch introduces new command to set ring buffer sizes to pass this
>   information to the hardware.
> 
> Patch 5:
>   For better performance, hardware has a requirement to limit number of TSO
>   descriptors. This patch adds that support.
> 
> Patch 6:
>   Avoid updating rxprod register when in UPT for performance reasons.
> 
> Patch 7:
>   With all vmxnet3 version 7 changes incorporated in the vmxnet3 driver,
>   with this patch, the driver can configure emulation to run at vmxnet3
>   version 7.
> 
> Ronak Doshi (7):
>   vmxnet3: prepare for version 7 changes
>   vmxnet3: add support for capability registers
>   vmxnet3: add support for large passthrough BAR register
>   vmxnet3: add command to set ring buffer sizes
>   vmxnet3: limit number of TXDs used for TSO packet
>   vmxnet3: avoid updating rxprod register frequently
>   vmxnet3: update to version 7
> 

Can you please start the patch title with component: "net/vmxnet3: ..."

>  drivers/net/vmxnet3/base/vmxnet3_defs.h |  74 +++++++++++++++++++---
>  drivers/net/vmxnet3/vmxnet3_ethdev.c    | 106 +++++++++++++++++++++++++++++++-
>  drivers/net/vmxnet3/vmxnet3_ethdev.h    |  16 +++++
>  drivers/net/vmxnet3/vmxnet3_ring.h      |   2 +-
>  drivers/net/vmxnet3/vmxnet3_rxtx.c      |  48 +++++++++++----
>  lib/ethdev/rte_ethdev.h                 |   2 +
>  6 files changed, 226 insertions(+), 22 deletions(-)
> 

Can you please update release notes to document the driver update?

Also what do you think to update driver documentation to document
uniform passthrough(UPT) support, how to use it etc? Or other features
coming with V7?





^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH next 2/7] vmxnet3: add support for capability registers
  2023-04-12 16:26 ` [PATCH next 2/7] vmxnet3: add support for capability registers Ronak Doshi
@ 2023-04-26 16:55   ` Ferruh Yigit
  0 siblings, 0 replies; 21+ messages in thread
From: Ferruh Yigit @ 2023-04-26 16:55 UTC (permalink / raw)
  To: Ronak Doshi, Jochen Behrens, Thomas Monjalon, Andrew Rybchenko; +Cc: dev

On 4/12/2023 5:26 PM, Ronak Doshi wrote:
> This patch enhances vmxnet3 to suuport capability registers which

s/suuport/support/

> allows it to enable features selectively. The DCR register tracks
> the capabilities vmxnet3 device supports. The PTCR register states
> the capabilities that the passthrough device supports.
> 
> With the help of these registers, vmxnet3 can enable only those
> features which the passthrough device supoprts. This allows

s/supoprts/supports/

> smooth trasition to Uniform-Passthrough (UPT) mode if the virtual

s/trasition/transition/

> nic requests it. If PTCR register returns nothing or error it means

s/nic/NIC/

> UPT is not being requested and vnic will continue in emulation mode.
> 
> Signed-off-by: Ronak Doshi <doshir@vmware.com>
> Acked-by: Jochen Behrens <jbehrens@vmware.com>

<...>

> +static int
> +eth_vmxnet3_setup_capabilities(struct vmxnet3_hw *hw,
> +			       struct rte_eth_dev *eth_dev)
> +{
> +	uint32_t dcr, ptcr, value;
> +	struct rte_pci_device *pci_dev = RTE_ETH_DEV_TO_PCI(eth_dev);
> +
> +	VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_CMD,
> +			       VMXNET3_CMD_GET_MAX_CAPABILITIES);
> +	value = VMXNET3_READ_BAR1_REG(hw, VMXNET3_REG_CMD);
> +	hw->max_capabilities[0] = value;
> +	dcr = VMXNET3_READ_BAR1_REG(hw, VMXNET3_REG_DCR);
> +	hw->DCR_capabilities[0] = dcr;
> +	hw->used_DCR_capabilities[0] = 0;
> +	ptcr = VMXNET3_READ_BAR1_REG(hw, VMXNET3_REG_PTCR);
> +	hw->PTCR_capabilities[0] = ptcr;
> +	hw->used_PTCR_capabilities[0] = 0;
> +
> +	if (hw->uptv2_enabled && !(ptcr & (1 << VMXNET3_DCR_ERROR))) {
> +		PMD_DRV_LOG(NOTICE, "UPTv2 enabled");
> +		hw->used_PTCR_capabilities[0] = ptcr;
> +	} else {
> +		/* Use all DCR capabilities, but disable large bar */
> +		hw->used_DCR_capabilities[0] = dcr &
> +					(~(1UL << VMXNET3_CAP_LARGE_BAR));
> +		PMD_DRV_LOG(NOTICE, "UPTv2 disabled");
> +	}
> +	if (hw->DCR_capabilities[0] & (1UL << VMXNET3_CAP_OOORX_COMP) &&
> +	    hw->PTCR_capabilities[0] & (1UL << VMXNET3_CAP_OOORX_COMP)) {
> +		if (hw->uptv2_enabled) {
> +			hw->used_PTCR_capabilities[0] |=
> +				(1UL << VMXNET3_CAP_OOORX_COMP);
> +		}
> +	}
> +	if (hw->used_PTCR_capabilities[0]) {
> +		VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_DCR,
> +				       hw->used_PTCR_capabilities[0]);
> +	} else if (hw->used_DCR_capabilities[0]) {
> +		VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_DCR,
> +				       hw->used_DCR_capabilities[0]);
> +	}
> +	VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_CMD, VMXNET3_CMD_GET_DCR0_REG);
> +	dcr = VMXNET3_READ_BAR1_REG(hw, VMXNET3_REG_CMD);
> +	hw->used_DCR_capabilities[0] = dcr;
> +	PMD_DRV_LOG(NOTICE, "Dev "PCI_PRI_FMT", vmxnet3 v%d, UPT enabled: %s, "

Checkpatch complains about syntax:

HECK:CONCATENATED_STRING: Concatenated strings should use spaces between
elements
#200: FILE: drivers/net/vmxnet3/vmxnet3_ethdev.c:346:
+	PMD_DRV_LOG(NOTICE, "Dev "PCI_PRI_FMT", vmxnet3 v%d, UPT enabled: %s, "

> +		    "DCR0=0x%08x, used DCR=0x%08x, "
> +		    "PTCR=0x%08x, used PTCR=0x%08x",
> +		    pci_dev->addr.domain, pci_dev->addr.bus,
> +		    pci_dev->addr.devid, pci_dev->addr.function, hw->version,
> +		    hw->uptv2_enabled ? "true" : "false",
> +		    hw->DCR_capabilities[0], hw->used_DCR_capabilities[0],
> +		    hw->PTCR_capabilities[0], hw->used_PTCR_capabilities[0]);


This log level is NOTICE, making it visible by default. And this
function always called when vesion >= 7.
Are you sure to make log this verbose? Or can it be DEBUG level?

<...>

> --- a/lib/ethdev/rte_ethdev.h
> +++ b/lib/ethdev/rte_ethdev.h
> @@ -1606,6 +1606,8 @@ struct rte_eth_conf {
>  #define RTE_ETH_DEV_CAPA_FLOW_RULE_KEEP         RTE_BIT64(3)
>  /** Device supports keeping shared flow objects across restart. */
>  #define RTE_ETH_DEV_CAPA_FLOW_SHARED_OBJECT_KEEP RTE_BIT64(4)
> +/**< (vmxnet3) Device supports smart NIC pass through queues */
> +#define RTE_ETH_DEV_CAPA_PASS_THRU RTE_BIT64(5)

'dev_info->dev_capa' is for generic device capabilities, we can't have
device specific capability here.

Can you please describe why it is required to expose this capability to
user, what user should do with this information?


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH next 4/7] vmxnet3: add command to set ring buffer sizes
  2023-04-12 16:26 ` [PATCH next 4/7] vmxnet3: add command to set ring buffer sizes Ronak Doshi
@ 2023-04-26 16:58   ` Ferruh Yigit
  2023-04-26 17:27     ` Ronak Doshi
  0 siblings, 1 reply; 21+ messages in thread
From: Ferruh Yigit @ 2023-04-26 16:58 UTC (permalink / raw)
  To: Ronak Doshi, Jochen Behrens; +Cc: dev

On 4/12/2023 5:26 PM, Ronak Doshi wrote:
> This patch adds a new command to set ring buffer sizes. This is
> required to pass the buffer size information to passthrough devices.
> Also, ring sizes are round down to power of 2.
> 
> Signed-off-by: Ronak Doshi <doshir@vmware.com>
> Acked-by: Jochen Behrens <jbehrens@vmware.com>
> ---
>  drivers/net/vmxnet3/base/vmxnet3_defs.h | 15 +++++++++++++++
>  drivers/net/vmxnet3/vmxnet3_ethdev.c    | 18 ++++++++++++++++++
>  drivers/net/vmxnet3/vmxnet3_ethdev.h    |  1 +
>  drivers/net/vmxnet3/vmxnet3_rxtx.c      |  7 +++++++
>  4 files changed, 41 insertions(+)
> 
> diff --git a/drivers/net/vmxnet3/base/vmxnet3_defs.h b/drivers/net/vmxnet3/base/vmxnet3_defs.h
> index 27f35a0062..d8cc295b08 100644
> --- a/drivers/net/vmxnet3/base/vmxnet3_defs.h
> +++ b/drivers/net/vmxnet3/base/vmxnet3_defs.h
> @@ -105,6 +105,9 @@ typedef enum {
>     VMXNET3_CMD_RESERVED4,
>     VMXNET3_CMD_REGISTER_MEMREGS,
>     VMXNET3_CMD_SET_RSS_FIELDS,
> +   VMXNET3_CMD_RESERVED9,
> +   VMXNET3_CMD_RESERVED10,
> +   VMXNET3_CMD_SET_RING_BUFFER_SIZE,
>  
>     VMXNET3_CMD_FIRST_GET = 0xF00D0000,
>     VMXNET3_CMD_GET_QUEUE_STATUS = VMXNET3_CMD_FIRST_GET,
> @@ -822,6 +825,17 @@ typedef enum Vmxnet3_RSSField {
>     VMXNET3_RSS_FIELDS_ESPIP6 = 0x0020,
>  } Vmxnet3_RSSField;
>  
> +typedef
> +#include "vmware_pack_begin.h"
> +struct Vmxnet3_RingBufferSize {
> +	__le16      ring1BufSizeType0;
> +	__le16      ring1BufSizeType1;
> +	__le16      ring2BufSizeType1;
> +	__le16      pad;
> +}
> +#include "vmware_pack_end.h"
> +Vmxnet3_RingBufferSize;
> +

As far as I can see these "vmware_pack_begin.h" & "vmware_pack_end.h"
has only file license comment, and I can see this is used in a few other
type declaration.

What is the reasoning behind using these headers?


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH next 1/7] vmxnet3: prepare for version 7 changes
  2023-04-12 16:26 ` [PATCH next 1/7] vmxnet3: prepare for version 7 changes Ronak Doshi
@ 2023-04-26 16:58   ` Ferruh Yigit
  0 siblings, 0 replies; 21+ messages in thread
From: Ferruh Yigit @ 2023-04-26 16:58 UTC (permalink / raw)
  To: Ronak Doshi, Jochen Behrens; +Cc: dev

On 4/12/2023 5:26 PM, Ronak Doshi wrote:
> vmxnet3 is currently at version 6 and this patch initiates the
> preparation to accommodate changes for upto version 7. Introduced

s/upto/up to/

(this is highlighted by checkpatch, please address all checkpatch warnings)

> utility macros for vmxnet3 version 7 comparison.
> 
> Signed-off-by: Ronak Doshi <doshir@vmware.com>
> Acked-by: Jochen Behrens <jbehrens@vmware.com>

<...>


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH next 4/7] vmxnet3: add command to set ring buffer sizes
  2023-04-26 16:58   ` Ferruh Yigit
@ 2023-04-26 17:27     ` Ronak Doshi
  2023-04-27  8:50       ` Ferruh Yigit
  0 siblings, 1 reply; 21+ messages in thread
From: Ronak Doshi @ 2023-04-26 17:27 UTC (permalink / raw)
  To: Ferruh Yigit, Jochen Behrens; +Cc: dev



On 4/26/23, 9:58 AM, "Ferruh Yigit" <ferruh.yigit@amd.com <mailto:ferruh.yigit@amd.com>> wrote:

> As far as I can see these "vmware_pack_begin.h" & "vmware_pack_end.h"
> has only file license comment, and I can see this is used in a few other
> type declaration.
>
> What is the reasoning behind using these headers?

This has been the case since driver was added to dpdk. The information is present in README.
I did not want to change the format being used for the declarations in the driver.

Thanks, 
Ronak 




^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH next 0/7] vmxnet3: upgrade to version 7
  2023-04-26 16:54 ` [PATCH next 0/7] vmxnet3: upgrade " Ferruh Yigit
@ 2023-04-26 18:15   ` Ferruh Yigit
  2023-04-26 18:33     ` Ronak Doshi
  0 siblings, 1 reply; 21+ messages in thread
From: Ferruh Yigit @ 2023-04-26 18:15 UTC (permalink / raw)
  To: Ronak Doshi; +Cc: dev

On 4/26/2023 5:54 PM, Ferruh Yigit wrote:
> On 4/12/2023 5:26 PM, Ronak Doshi wrote:
>> vmxnet3 emulation has recently added several new features including
>> support for uniform passthrough(UPT). To make UPT work vmxnet3 has
>> to be enhanced as per the new specification. This patch series
>> extends the vmxnet3 driver to leverage these new features.
>>
>> Compatibility is maintained using existing vmxnet3 versioning mechanism as
>> follows:
>> - new features added to vmxnet3 emulation are associated with new vmxnet3
>>    version viz. vmxnet3 version 7.
>> - emulation advertises all the versions it supports to the driver.
>> - during initialization, vmxnet3 driver picks the highest version number
>> supported by both the emulation and the driver and configures emulation
>> to run at that version.
>>
>> In particular, following changes are introduced:
>>
>> Patch 1:
>>   This patch introduces utility macros for vmxnet3 version 7 comparison
>>   and updates Copyright information.
>>
>> Patch 2:
>>   This patch adds new capability registers to fine control enablement of
>>   individual features based on emulation and passthrough.
>>
>> Patch 3:
>>   This patch adds support for large passthrough BAR register.
>>
>> Patch 4:
>>   This patch introduces new command to set ring buffer sizes to pass this
>>   information to the hardware.
>>
>> Patch 5:
>>   For better performance, hardware has a requirement to limit number of TSO
>>   descriptors. This patch adds that support.
>>
>> Patch 6:
>>   Avoid updating rxprod register when in UPT for performance reasons.
>>
>> Patch 7:
>>   With all vmxnet3 version 7 changes incorporated in the vmxnet3 driver,
>>   with this patch, the driver can configure emulation to run at vmxnet3
>>   version 7.
>>
>> Ronak Doshi (7):
>>   vmxnet3: prepare for version 7 changes
>>   vmxnet3: add support for capability registers
>>   vmxnet3: add support for large passthrough BAR register
>>   vmxnet3: add command to set ring buffer sizes
>>   vmxnet3: limit number of TXDs used for TSO packet
>>   vmxnet3: avoid updating rxprod register frequently
>>   vmxnet3: update to version 7
>>
> 
> Can you please start the patch title with component: "net/vmxnet3: ..."
> 
>>  drivers/net/vmxnet3/base/vmxnet3_defs.h |  74 +++++++++++++++++++---
>>  drivers/net/vmxnet3/vmxnet3_ethdev.c    | 106 +++++++++++++++++++++++++++++++-
>>  drivers/net/vmxnet3/vmxnet3_ethdev.h    |  16 +++++
>>  drivers/net/vmxnet3/vmxnet3_ring.h      |   2 +-
>>  drivers/net/vmxnet3/vmxnet3_rxtx.c      |  48 +++++++++++----
>>  lib/ethdev/rte_ethdev.h                 |   2 +
>>  6 files changed, 226 insertions(+), 22 deletions(-)
>>
> 
> Can you please update release notes to document the driver update?
> 
> Also what do you think to update driver documentation to document
> uniform passthrough(UPT) support, how to use it etc? Or other features
> coming with V7?
> 


btw, while checking the driver documentation, it seems it is not updated
for a while, the paper it refers is old.
Do you have any newer version of documentation to reference?


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH next 0/7] vmxnet3: upgrade to version 7
  2023-04-26 18:15   ` Ferruh Yigit
@ 2023-04-26 18:33     ` Ronak Doshi
  2023-04-27  9:15       ` Ferruh Yigit
  0 siblings, 1 reply; 21+ messages in thread
From: Ronak Doshi @ 2023-04-26 18:33 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev


> On 4/26/23, 11:16 AM, "Ferruh Yigit" <ferruh.yigit@amd.com <mailto:ferruh.yigit@amd.com>> wrote:
>
> btw, while checking the driver documentation, it seems it is not updated
> for a while, the paper it refers is old.
> Do you have any newer version of documentation to reference?

I don’t think we have any other document for perf, but let me update the document with some
details regarding features supported. Also, I will update release notes for these patches.

Thanks, 
Ronak


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH next 4/7] vmxnet3: add command to set ring buffer sizes
  2023-04-26 17:27     ` Ronak Doshi
@ 2023-04-27  8:50       ` Ferruh Yigit
  2023-04-27 15:59         ` Ronak Doshi
  0 siblings, 1 reply; 21+ messages in thread
From: Ferruh Yigit @ 2023-04-27  8:50 UTC (permalink / raw)
  To: Ronak Doshi, Jochen Behrens; +Cc: dev, Mcnamara, John

On 4/26/2023 6:27 PM, Ronak Doshi wrote:
> 
> 
> On 4/26/23, 9:58 AM, "Ferruh Yigit" <ferruh.yigit@amd.com <mailto:ferruh.yigit@amd.com>> wrote:
> 
>> As far as I can see these "vmware_pack_begin.h" & "vmware_pack_end.h"
>> has only file license comment, and I can see this is used in a few other
>> type declaration.
>>
>> What is the reasoning behind using these headers?
> 
> This has been the case since driver was added to dpdk. The information is present in README.
> I did not want to change the format being used for the declarations in the driver.
> 

README doesn't say much.

The usage is not standard, and intention is not clear.
Can you please dig this issue more to learn the the intention, may be we
can find a better way or get rid of them completely?




Just to record, usage is:
 typedef
 #include "vmware_pack_begin.h"
 struct Vmxnet3_RingBufferSize {
 	__le16      ring1BufSizeType0;
 	__le16      ring1BufSizeType1;
 	__le16      ring2BufSizeType1;
 	__le16      pad;
 }
 #include "vmware_pack_end.h"
 Vmxnet3_RingBufferSize;


Content of "vmware_pack_begin.h":
```
/* SPDX-License-Identifier: BSD-3-Clause
 * Copyright(c) 2010-2014 Intel Corporation
 */
```

"vmware_pack_end.h":
```
/* SPDX-License-Identifier: BSD-3-Clause
 * Copyright(c) 2010-2014 Intel Corporation
 */
```

^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH next 0/7] vmxnet3: upgrade to version 7
  2023-04-26 18:33     ` Ronak Doshi
@ 2023-04-27  9:15       ` Ferruh Yigit
  2023-04-28  7:05         ` Ronak Doshi
  0 siblings, 1 reply; 21+ messages in thread
From: Ferruh Yigit @ 2023-04-27  9:15 UTC (permalink / raw)
  To: Ronak Doshi, Jochen Behrens; +Cc: dev

On 4/26/2023 7:33 PM, Ronak Doshi wrote:
> 
> > On 4/26/23, 11:16 AM, "Ferruh Yigit" <ferruh.yigit@amd.com <mailto:ferruh.yigit@amd.com>> wrote:
>>
>> btw, while checking the driver documentation, it seems it is not updated
>> for a while, the paper it refers is old.
>> Do you have any newer version of documentation to reference?
> 
> I don’t think we have any other document for perf, but let me update the document with some
> details regarding features supported. Also, I will update release notes for these patches.
> 

That document focuses on 1G and 10G network speeds, and uses "AMD
Opteron 2384 Processors" (which seems discontinued at this point).
I would expect there is an up to date version of the document, but if
there isn't is the existing one still relevant to keep?


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH next 4/7] vmxnet3: add command to set ring buffer sizes
  2023-04-27  8:50       ` Ferruh Yigit
@ 2023-04-27 15:59         ` Ronak Doshi
  2023-05-03 10:03           ` Ferruh Yigit
  0 siblings, 1 reply; 21+ messages in thread
From: Ronak Doshi @ 2023-04-27 15:59 UTC (permalink / raw)
  To: Ferruh Yigit, Jochen Behrens; +Cc: dev, Mcnamara, John


> On 4/27/23, 1:51 AM, "Ferruh Yigit" <ferruh.yigit@amd.com <mailto:ferruh.yigit@amd.com>> wrote:
>
> README doesn't say much.
>
> The usage is not standard, and intention is not clear.
> Can you please dig this issue more to learn the the intention, may be we
> can find a better way or get rid of them completely?

Sure, I can take this up, but it will be better if that is investigated and done as a separate patch
as lot of definitions include those header files. The intention of this patch series is completely different,
and I don't want to break or delay this patch series. Is that OK?


Thanks, 
Ronak






^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH next 0/7] vmxnet3: upgrade to version 7
  2023-04-27  9:15       ` Ferruh Yigit
@ 2023-04-28  7:05         ` Ronak Doshi
  2023-05-03 10:05           ` Ferruh Yigit
  0 siblings, 1 reply; 21+ messages in thread
From: Ronak Doshi @ 2023-04-28  7:05 UTC (permalink / raw)
  To: Ferruh Yigit, Jochen Behrens; +Cc: dev


> On 4/27/23, 2:16 AM, "Ferruh Yigit" <ferruh.yigit@amd.com <mailto:ferruh.yigit@amd.com>> wrote:
>
> That document focuses on 1G and 10G network speeds, and uses "AMD
> Opteron 2384 Processors" (which seems discontinued at this point).
> I would expect there is an up to date version of the document, but if
> there isn't is the existing one still relevant to keep?

I don't think there is any recent public facing performance measurement document
for vmxnet3. I will remove the reference to this old document and will update the doc
once we have new document in the future.

Thanks, 
Ronak


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH next 4/7] vmxnet3: add command to set ring buffer sizes
  2023-04-27 15:59         ` Ronak Doshi
@ 2023-05-03 10:03           ` Ferruh Yigit
  0 siblings, 0 replies; 21+ messages in thread
From: Ferruh Yigit @ 2023-05-03 10:03 UTC (permalink / raw)
  To: Ronak Doshi, Jochen Behrens; +Cc: dev, Mcnamara, John

On 4/27/2023 4:59 PM, Ronak Doshi wrote:
> 
> > On 4/27/23, 1:51 AM, "Ferruh Yigit" <ferruh.yigit@amd.com <mailto:ferruh.yigit@amd.com>> wrote:
>>
>> README doesn't say much.
>>
>> The usage is not standard, and intention is not clear.
>> Can you please dig this issue more to learn the the intention, may be we
>> can find a better way or get rid of them completely?
> 
> Sure, I can take this up, but it will be better if that is investigated and done as a separate patch
> as lot of definitions include those header files. The intention of this patch series is completely different,
> and I don't want to break or delay this patch series. Is that OK?
> 

OK to address it as a separate patch, but please follow the issue.


^ permalink raw reply	[flat|nested] 21+ messages in thread

* Re: [PATCH next 0/7] vmxnet3: upgrade to version 7
  2023-04-28  7:05         ` Ronak Doshi
@ 2023-05-03 10:05           ` Ferruh Yigit
  0 siblings, 0 replies; 21+ messages in thread
From: Ferruh Yigit @ 2023-05-03 10:05 UTC (permalink / raw)
  To: Ronak Doshi, Jochen Behrens; +Cc: dev

On 4/28/2023 8:05 AM, Ronak Doshi wrote:
> 
>> On 4/27/23, 2:16 AM, "Ferruh Yigit" <ferruh.yigit@amd.com <mailto:ferruh.yigit@amd.com>> wrote:
>>
>> That document focuses on 1G and 10G network speeds, and uses "AMD
>> Opteron 2384 Processors" (which seems discontinued at this point).
>> I would expect there is an up to date version of the document, but if
>> there isn't is the existing one still relevant to keep?
> 
> I don't think there is any recent public facing performance measurement document
> for vmxnet3. I will remove the reference to this old document and will update the doc
> once we have new document in the future.
> 

OK, it is good to keep documentation up to date.

^ permalink raw reply	[flat|nested] 21+ messages in thread

end of thread, other threads:[~2023-05-03 10:05 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-12 16:26 [PATCH next 0/7] vmxnet3: upgrade to version 7 Ronak Doshi
2023-04-12 16:26 ` [PATCH next 1/7] vmxnet3: prepare for version 7 changes Ronak Doshi
2023-04-26 16:58   ` Ferruh Yigit
2023-04-12 16:26 ` [PATCH next 2/7] vmxnet3: add support for capability registers Ronak Doshi
2023-04-26 16:55   ` Ferruh Yigit
2023-04-12 16:26 ` [PATCH next 3/7] vmxnet3: add support for large passthrough BAR register Ronak Doshi
2023-04-12 16:26 ` [PATCH next 4/7] vmxnet3: add command to set ring buffer sizes Ronak Doshi
2023-04-26 16:58   ` Ferruh Yigit
2023-04-26 17:27     ` Ronak Doshi
2023-04-27  8:50       ` Ferruh Yigit
2023-04-27 15:59         ` Ronak Doshi
2023-05-03 10:03           ` Ferruh Yigit
2023-04-12 16:26 ` [PATCH next 5/7] vmxnet3: limit number of TXDs used for TSO packet Ronak Doshi
2023-04-12 16:26 ` [PATCH next 6/7] vmxnet3: avoid updating rxprod register frequently Ronak Doshi
2023-04-12 16:26 ` [PATCH next 7/7] vmxnet3: update to version 7 Ronak Doshi
2023-04-26 16:54 ` [PATCH next 0/7] vmxnet3: upgrade " Ferruh Yigit
2023-04-26 18:15   ` Ferruh Yigit
2023-04-26 18:33     ` Ronak Doshi
2023-04-27  9:15       ` Ferruh Yigit
2023-04-28  7:05         ` Ronak Doshi
2023-05-03 10:05           ` Ferruh Yigit

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).