[dpdk-dev,v3,7/7] net/vmxnet3: update to version 3

Message ID 1488840907-17441-8-git-send-email-skhare@vmware.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Shrikrishna Khare March 6, 2017, 10:55 p.m. UTC
  With all vmxnet3 version 3 changes incorporated in the vmxnet3 driver,
the driver can configure emulation to run at vmxnet3 version 3, provided
the emulation advertises support for version 3.

This patch also updates release notes.

Signed-off-by: Shrikrishna Khare <skhare@vmware.com>
Acked-by: Yong Wang <yongwang@vmware.com>
Acked-by: Jin Heo <heoj@vmware.com>
---
 doc/guides/rel_notes/release_17_05.rst | 6 ++++++
 drivers/net/vmxnet3/vmxnet3_ethdev.c   | 6 +++++-
 2 files changed, 11 insertions(+), 1 deletion(-)
  

Patch

diff --git a/doc/guides/rel_notes/release_17_05.rst b/doc/guides/rel_notes/release_17_05.rst
index e25ea9f..cbe6233 100644
--- a/doc/guides/rel_notes/release_17_05.rst
+++ b/doc/guides/rel_notes/release_17_05.rst
@@ -41,6 +41,12 @@  New Features
      Also, make sure to start the actual text at the margin.
      =========================================================
 
+   * **Added vmxnet3 version 3 support.**
+
+     Added support for vmxnet3 version 3 which includes several
+     performance enhancements viz. configurable TX data ring, Receive
+     Data Ring, ability to register memory regions.
+
 
 Resolved Issues
 ---------------
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index 96f1585..01da7e3 100644
--- a/drivers/net/vmxnet3/vmxnet3_ethdev.c
+++ b/drivers/net/vmxnet3/vmxnet3_ethdev.c
@@ -284,7 +284,11 @@  eth_vmxnet3_dev_init(struct rte_eth_dev *eth_dev)
 	ver = VMXNET3_READ_BAR1_REG(hw, VMXNET3_REG_VRRS);
 	PMD_INIT_LOG(DEBUG, "Hardware version : %d", ver);
 
-	if (ver & (1 << VMXNET3_REV_2)) {
+	if (ver & (1 << VMXNET3_REV_3)) {
+		VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_VRRS,
+				       1 << VMXNET3_REV_3);
+		hw->version = VMXNET3_REV_3 + 1;
+	} else if (ver & (1 << VMXNET3_REV_2)) {
 		VMXNET3_WRITE_BAR1_REG(hw, VMXNET3_REG_VRRS,
 				       1 << VMXNET3_REV_2);
 		hw->version = VMXNET3_REV_2 + 1;