* [PATCH v1 net 0/2] vmxnet3: couple of fixes
@ 2022-11-28 19:32 Ronak Doshi
2022-11-28 19:32 ` [PATCH v1 net 1/2] vmxnet3: correctly report encapsulated LRO packet Ronak Doshi
2022-11-28 19:32 ` [PATCH v1 net 2/2] vmxnet3: use correct intrConf reference when using extended queues Ronak Doshi
0 siblings, 2 replies; 9+ messages in thread
From: Ronak Doshi @ 2022-11-28 19:32 UTC (permalink / raw)
To: netdev
Cc: Ronak Doshi, VMware PV-Drivers Reviewers, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, open list
This series fixes following issues:
Patch 1:
This patch provides a fix to correctly report encapsulated LRO'ed
packet.
Patch 2:
This patch provides a fix to use correct intrConf reference.
Changes in v2:
- declare generic descriptor to be used
Ronak Doshi (2):
vmxnet3: correctly report encapsulated LRO packet
vmxnet3: use correct intrConf reference when using extended queues
drivers/net/vmxnet3/vmxnet3_drv.c | 28 ++++++++++++++++++++++++----
1 file changed, 24 insertions(+), 4 deletions(-)
--
2.11.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v1 net 1/2] vmxnet3: correctly report encapsulated LRO packet
2022-11-28 19:32 [PATCH v1 net 0/2] vmxnet3: couple of fixes Ronak Doshi
@ 2022-11-28 19:32 ` Ronak Doshi
2022-11-30 5:30 ` Jakub Kicinski
2022-11-28 19:32 ` [PATCH v1 net 2/2] vmxnet3: use correct intrConf reference when using extended queues Ronak Doshi
1 sibling, 1 reply; 9+ messages in thread
From: Ronak Doshi @ 2022-11-28 19:32 UTC (permalink / raw)
To: netdev
Cc: Ronak Doshi, VMware PV-Drivers Reviewers, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, open list
Commit dacce2be3312 ("vmxnet3: add geneve and vxlan tunnel offload
support") added support for encapsulation offload. However, the
pathc did not report correctly the encapsulated packet which is
LRO'ed by the hypervisor.
This patch fixes this issue by using correct callback for the LRO'ed
encapsulated packet.
Fixes: dacce2be3312 ("vmxnet3: add geneve and vxlan tunnel offload support")
Signed-off-by: Ronak Doshi <doshir@vmware.com>
Acked-by: Guolin Yang <gyang@vmware.com>
---
drivers/net/vmxnet3/vmxnet3_drv.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index d3e7b27eb933..611e8a85de17 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -1396,6 +1396,7 @@ vmxnet3_rq_rx_complete(struct vmxnet3_rx_queue *rq,
};
u32 num_pkts = 0;
bool skip_page_frags = false;
+ bool encap_lro = false;
struct Vmxnet3_RxCompDesc *rcd;
struct vmxnet3_rx_ctx *ctx = &rq->rx_ctx;
u16 segCnt = 0, mss = 0;
@@ -1556,13 +1557,18 @@ vmxnet3_rq_rx_complete(struct vmxnet3_rx_queue *rq,
if (VMXNET3_VERSION_GE_2(adapter) &&
rcd->type == VMXNET3_CDTYPE_RXCOMP_LRO) {
struct Vmxnet3_RxCompDescExt *rcdlro;
+ union Vmxnet3_GenericDesc *gdesc;
+
rcdlro = (struct Vmxnet3_RxCompDescExt *)rcd;
+ gdesc = (union Vmxnet3_GenericDesc *)rcd;
segCnt = rcdlro->segCnt;
WARN_ON_ONCE(segCnt == 0);
mss = rcdlro->mss;
if (unlikely(segCnt <= 1))
segCnt = 0;
+ encap_lro = (le32_to_cpu(gdesc->dword[0]) &
+ (1UL << VMXNET3_RCD_HDR_INNER_SHIFT));
} else {
segCnt = 0;
}
@@ -1630,7 +1636,7 @@ vmxnet3_rq_rx_complete(struct vmxnet3_rx_queue *rq,
vmxnet3_rx_csum(adapter, skb,
(union Vmxnet3_GenericDesc *)rcd);
skb->protocol = eth_type_trans(skb, adapter->netdev);
- if (!rcd->tcp ||
+ if ((!rcd->tcp && !encap_lro) ||
!(adapter->netdev->features & NETIF_F_LRO))
goto not_lro;
@@ -1639,7 +1645,7 @@ vmxnet3_rq_rx_complete(struct vmxnet3_rx_queue *rq,
SKB_GSO_TCPV4 : SKB_GSO_TCPV6;
skb_shinfo(skb)->gso_size = mss;
skb_shinfo(skb)->gso_segs = segCnt;
- } else if (segCnt != 0 || skb->len > mtu) {
+ } else if ((segCnt != 0 || skb->len > mtu) && !encap_lro) {
u32 hlen;
hlen = vmxnet3_get_hdr_len(adapter, skb,
@@ -1668,6 +1674,8 @@ vmxnet3_rq_rx_complete(struct vmxnet3_rx_queue *rq,
napi_gro_receive(&rq->napi, skb);
ctx->skb = NULL;
+ if (encap_lro)
+ encap_lro = false;
num_pkts++;
}
--
2.11.0
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH v1 net 2/2] vmxnet3: use correct intrConf reference when using extended queues
2022-11-28 19:32 [PATCH v1 net 0/2] vmxnet3: couple of fixes Ronak Doshi
2022-11-28 19:32 ` [PATCH v1 net 1/2] vmxnet3: correctly report encapsulated LRO packet Ronak Doshi
@ 2022-11-28 19:32 ` Ronak Doshi
2022-11-28 23:49 ` Jacob Keller
1 sibling, 1 reply; 9+ messages in thread
From: Ronak Doshi @ 2022-11-28 19:32 UTC (permalink / raw)
To: netdev
Cc: Ronak Doshi, VMware PV-Drivers Reviewers, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, Guolin Yang,
open list
'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
^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH v1 net 2/2] vmxnet3: use correct intrConf reference when using extended queues
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
0 siblings, 1 reply; 9+ messages in thread
From: Jacob Keller @ 2022-11-28 23:49 UTC (permalink / raw)
To: Ronak Doshi, netdev
Cc: VMware PV-Drivers Reviewers, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, Guolin Yang, open list
On 11/28/2022 11:32 AM, Ronak Doshi wrote:
> '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.
>
Nit: no need to quote around the commit reference here.
I don't personally think its worth a re-roll to fix that, but good to be
aware of in future submission.
The patch itself makes sense.
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
> 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);
> }
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v1 net 2/2] vmxnet3: use correct intrConf reference when using extended queues
2022-11-28 23:49 ` Jacob Keller
@ 2022-11-29 0:35 ` Ronak Doshi
0 siblings, 0 replies; 9+ messages in thread
From: Ronak Doshi @ 2022-11-29 0:35 UTC (permalink / raw)
To: Jacob Keller, netdev
Cc: Pv-drivers, David S. Miller, Eric Dumazet, Jakub Kicinski,
Paolo Abeni, Guolin Yang, open list
On 11/28/22, 3:49 PM, "Jacob Keller" <jacob.e.keller@intel.com> wrote:
> !! External Email
>
> On 11/28/2022 11:32 AM, Ronak Doshi wrote:
> > '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.
> >
>
> Nit: no need to quote around the commit reference here.
>
> I don't personally think its worth a re-roll to fix that, but good to be
> aware of in future submission.
>
> The patch itself makes sense.
>
> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
Thanks, Jacob, for the review.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v1 net 1/2] vmxnet3: correctly report encapsulated LRO packet
2022-11-28 19:32 ` [PATCH v1 net 1/2] vmxnet3: correctly report encapsulated LRO packet Ronak Doshi
@ 2022-11-30 5:30 ` Jakub Kicinski
0 siblings, 0 replies; 9+ messages in thread
From: Jakub Kicinski @ 2022-11-30 5:30 UTC (permalink / raw)
To: Ronak Doshi
Cc: netdev, VMware PV-Drivers Reviewers, David S. Miller,
Eric Dumazet, Paolo Abeni, open list
On Mon, 28 Nov 2022 11:32:03 -0800 Ronak Doshi wrote:
> + union Vmxnet3_GenericDesc *gdesc;
> +
Trailing white space here.
Please use checkpatch.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH v1 net 0/2] vmxnet3: couple of fixes
2022-11-28 19:50 [PATCH v1 net 0/2] vmxnet3: couple of fixes Ronak Doshi
@ 2022-11-28 23:52 ` Jacob Keller
0 siblings, 0 replies; 9+ messages in thread
From: Jacob Keller @ 2022-11-28 23:52 UTC (permalink / raw)
To: Ronak Doshi, netdev
Cc: VMware PV-Drivers Reviewers, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni, open list
On 11/28/2022 11:50 AM, Ronak Doshi wrote:
> This series fixes following issues:
>
> Patch 1:
> This patch provides a fix to correctly report encapsulated LRO'ed
> packet.
>
> Patch 2:
> This patch provides a fix to use correct intrConf reference.
>
> Changes in v1:
> - declare generic descriptor to be used
>
> Ronak Doshi (2):
> vmxnet3: correctly report encapsulated LRO packet
> vmxnet3: use correct intrConf reference when using extended queues
>
> drivers/net/vmxnet3/vmxnet3_drv.c | 28 ++++++++++++++++++++++++----
> 1 file changed, 24 insertions(+), 4 deletions(-)
>
It looks like you sent a bunch of versions rapidly, and you submitted an
unversioned series followed by one with v1. That can make it difficult
to track which is the most recent version and which one a reviewer
should leave feedback on.
Typically it is assumed that the first submission is "v1" even if it
doesn't include "v1" in its title. Thus your second submission would
normally be "v2".
Thanks,
Jake
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v1 net 0/2] vmxnet3: couple of fixes
@ 2022-11-28 19:50 Ronak Doshi
2022-11-28 23:52 ` Jacob Keller
0 siblings, 1 reply; 9+ messages in thread
From: Ronak Doshi @ 2022-11-28 19:50 UTC (permalink / raw)
To: netdev
Cc: Ronak Doshi, VMware PV-Drivers Reviewers, David S. Miller,
Eric Dumazet, Jakub Kicinski, Paolo Abeni, open list
This series fixes following issues:
Patch 1:
This patch provides a fix to correctly report encapsulated LRO'ed
packet.
Patch 2:
This patch provides a fix to use correct intrConf reference.
Changes in v1:
- declare generic descriptor to be used
Ronak Doshi (2):
vmxnet3: correctly report encapsulated LRO packet
vmxnet3: use correct intrConf reference when using extended queues
drivers/net/vmxnet3/vmxnet3_drv.c | 28 ++++++++++++++++++++++++----
1 file changed, 24 insertions(+), 4 deletions(-)
--
2.11.0
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH v1 net 0/2] vmxnet3: couple of fixes
@ 2022-11-28 19:31 Ronak Doshi
0 siblings, 0 replies; 9+ messages in thread
From: Ronak Doshi @ 2022-11-28 19:31 UTC (permalink / raw)
To: doshir
Cc: VMware PV-Drivers Reviewers, David S. Miller, Eric Dumazet,
Jakub Kicinski, Paolo Abeni,
open list:VMWARE VMXNET3 ETHERNET DRIVER, open list
This series fixes following issues:
Patch 1:
This patch provides a fix to correctly report encapsulated LRO'ed
packet.
Patch 2:
This patch provides a fix to use correct intrConf reference.
Changes in v2:
- declare generic descriptor to be used
Ronak Doshi (2):
vmxnet3: correctly report encapsulated LRO packet
vmxnet3: use correct intrConf reference when using extended queues
drivers/net/vmxnet3/vmxnet3_drv.c | 28 ++++++++++++++++++++++++----
1 file changed, 24 insertions(+), 4 deletions(-)
--
2.11.0
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2022-11-30 5:30 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-28 19:32 [PATCH v1 net 0/2] vmxnet3: couple of fixes Ronak Doshi
2022-11-28 19:32 ` [PATCH v1 net 1/2] vmxnet3: correctly report encapsulated LRO packet Ronak Doshi
2022-11-30 5:30 ` Jakub Kicinski
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
-- strict thread matches above, loose matches on Subject: below --
2022-11-28 19:50 [PATCH v1 net 0/2] vmxnet3: couple of fixes Ronak Doshi
2022-11-28 23:52 ` Jacob Keller
2022-11-28 19:31 Ronak Doshi
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).