DPDK patches and discussions
 help / color / mirror / Atom feed
From: Shrikrishna Khare <skhare@vmware.com>
To: <yongwang@vmware.com>
Cc: <dev@dpdk.org>, Shrikrishna Khare <skhare@vmware.com>
Subject: [dpdk-dev]  [PATCH 7/7] vmxnet3: update to version 3
Date: Sat, 25 Feb 2017 13:59:49 -0800	[thread overview]
Message-ID: <1488059989-6930-8-git-send-email-skhare@vmware.com> (raw)
In-Reply-To: <1488059989-6930-1-git-send-email-skhare@vmware.com>

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@vmware.com>
Acked-by: Yong Wang <yongwang@vmware.com>
Acked-by: Jin Heo <heoj@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

  parent reply	other threads:[~2017-02-25 22:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-25 21:59 [dpdk-dev] [PATCH 0/7] vmxnet3: upgrade " Shrikrishna Khare
2017-02-25 21:59 ` [dpdk-dev] [PATCH 1/7] vmxnet3: prepare for version 3 changes Shrikrishna Khare
2017-02-25 21:59 ` [dpdk-dev] [PATCH 2/7] vmxnet3: introduce generalized command interface to configure the device Shrikrishna Khare
2017-02-25 21:59 ` [dpdk-dev] [PATCH 3/7] vmxnet3: allow variable length transmit data ring buffer Shrikrishna Khare
2017-02-25 21:59 ` [dpdk-dev] [PATCH 4/7] vmxnet3: add receive data ring support Shrikrishna Khare
2017-02-25 21:59 ` [dpdk-dev] [PATCH 5/7] vmxnet3: add reserved version 3 command Shrikrishna Khare
2017-02-25 21:59 ` [dpdk-dev] [PATCH 6/7] vmxnet3: introduce command to register memory region Shrikrishna Khare
2017-03-03 10:46   ` Ferruh Yigit
2017-03-03 10:51   ` Ferruh Yigit
2017-02-25 21:59 ` Shrikrishna Khare [this message]
2017-03-03 10:57 ` [dpdk-dev] [PATCH 0/7] vmxnet3: upgrade to version 3 Ferruh Yigit
2017-03-06 17:25   ` Shrikrishna Khare
2017-03-07 12:17     ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1488059989-6930-8-git-send-email-skhare@vmware.com \
    --to=skhare@vmware.com \
    --cc=dev@dpdk.org \
    --cc=yongwang@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).