[dpdk-dev] [PATCH 7/7] vmxnet3: update to version 3
Shrikrishna Khare
skhare at vmware.com
Sat Feb 25 22:59:49 CET 2017
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.
Signed-off-by: Shrikrishna Khare <skhare at vmware.com>
Acked-by: Yong Wang <yongwang at vmware.com>
Acked-by: Jin Heo <heoj at vmware.com>
---
drivers/net/vmxnet3/vmxnet3_ethdev.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/net/vmxnet3/vmxnet3_ethdev.c b/drivers/net/vmxnet3/vmxnet3_ethdev.c
index a4fc14d..21a78f6 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;
--
2.6.2
More information about the dev
mailing list