From: Ronak Doshi <doshir@vmware.com>
To: <doshir@vmware.com>
Cc: VMware PV-Drivers Reviewers <pv-drivers@vmware.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Guolin Yang <gyang@vmware.com>,
"open list:VMWARE VMXNET3 ETHERNET DRIVER"
<netdev@vger.kernel.org>,
open list <linux-kernel@vger.kernel.org>
Subject: [PATCH v1 net 2/2] vmxnet3: use correct intrConf reference when using extended queues
Date: Mon, 28 Nov 2022 11:31:03 -0800 [thread overview]
Message-ID: <20221128193103.3742-3-doshir@vmware.com> (raw)
In-Reply-To: <20221128193103.3742-1-doshir@vmware.com>
'Commit 39f9895a00f4 ("vmxnet3: add support for 32 Tx/Rx queues")'
added support for 32Tx/Rx queues. As a part of this patch, intrConf
structure was extended to incorporate increased queues.
This patch fixes the issue where incorrect reference is being used.
Fixes: 39f9895a00f4 ("vmxnet3: add support for 32 Tx/Rx queues")
Signed-off-by: Ronak Doshi <doshir@vmware.com>
Acked-by: Guolin Yang <gyang@vmware.com>
---
drivers/net/vmxnet3/vmxnet3_drv.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index 611e8a85de17..39a7e90d4254 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -75,8 +75,14 @@ vmxnet3_enable_all_intrs(struct vmxnet3_adapter *adapter)
for (i = 0; i < adapter->intr.num_intrs; i++)
vmxnet3_enable_intr(adapter, i);
- adapter->shared->devRead.intrConf.intrCtrl &=
+ if (!VMXNET3_VERSION_GE_6(adapter) ||
+ !adapter->queuesExtEnabled) {
+ adapter->shared->devRead.intrConf.intrCtrl &=
cpu_to_le32(~VMXNET3_IC_DISABLE_ALL);
+ } else {
+ adapter->shared->devReadExt.intrConfExt.intrCtrl &=
+ cpu_to_le32(~VMXNET3_IC_DISABLE_ALL);
+ }
}
@@ -85,8 +91,14 @@ vmxnet3_disable_all_intrs(struct vmxnet3_adapter *adapter)
{
int i;
- adapter->shared->devRead.intrConf.intrCtrl |=
+ if (!VMXNET3_VERSION_GE_6(adapter) ||
+ !adapter->queuesExtEnabled) {
+ adapter->shared->devRead.intrConf.intrCtrl |=
cpu_to_le32(VMXNET3_IC_DISABLE_ALL);
+ } else {
+ adapter->shared->devReadExt.intrConfExt.intrCtrl |=
+ cpu_to_le32(VMXNET3_IC_DISABLE_ALL);
+ }
for (i = 0; i < adapter->intr.num_intrs; i++)
vmxnet3_disable_intr(adapter, i);
}
--
2.11.0
next prev parent reply other threads:[~2022-11-28 19:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-28 19:31 [PATCH v1 net 0/2] vmxnet3: couple of fixes Ronak Doshi
2022-11-28 19:31 ` [PATCH v1 net 1/2] vmxnet3: correctly report encapsulated LRO packet Ronak Doshi
2022-11-28 19:31 ` Ronak Doshi [this message]
-- strict thread matches above, loose matches on Subject: below --
2022-11-28 19:32 [PATCH v1 net 0/2] vmxnet3: couple of fixes Ronak Doshi
2022-11-28 19:32 ` [PATCH v1 net 2/2] vmxnet3: use correct intrConf reference when using extended queues Ronak Doshi
2022-11-28 23:49 ` Jacob Keller
2022-11-29 0:35 ` Ronak Doshi
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=20221128193103.3742-3-doshir@vmware.com \
--to=doshir@vmware.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gyang@vmware.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=pv-drivers@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).