* [PATCH net ] vmxnet3: move rss code block under eop descriptor
@ 2023-02-07 19:28 Ronak Doshi
2023-02-07 19:34 ` kernel test robot
2023-02-08 6:12 ` Jakub Kicinski
0 siblings, 2 replies; 8+ messages in thread
From: Ronak Doshi @ 2023-02-07 19:28 UTC (permalink / raw)
To: netdev
Cc: stable, Ronak Doshi, VMware PV-Drivers Reviewers,
David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni,
open list
Commit b3973bb40041 ("vmxnet3: set correct hash type based on
rss information") added hashType information into skb. However,
rssType field is populated for eop descriptor.
This patch moves the RSS codeblock under eop descritor.
Signed-off-by: Ronak Doshi <doshir@vmware.com>
Acked-by: Peng Li <lpeng@vmware.com>
Acked-by: Guolin Yang <gyang@vmware.com>
---
drivers/net/vmxnet3/vmxnet3_drv.c | 50 +++++++++++++++++++--------------------
1 file changed, 25 insertions(+), 25 deletions(-)
diff --git a/drivers/net/vmxnet3/vmxnet3_drv.c b/drivers/net/vmxnet3/vmxnet3_drv.c
index 56267c327f0b..682987040ea8 100644
--- a/drivers/net/vmxnet3/vmxnet3_drv.c
+++ b/drivers/net/vmxnet3/vmxnet3_drv.c
@@ -1546,31 +1546,6 @@ vmxnet3_rq_rx_complete(struct vmxnet3_rx_queue *rq,
rxd->len = rbi->len;
}
-#ifdef VMXNET3_RSS
- if (rcd->rssType != VMXNET3_RCD_RSS_TYPE_NONE &&
- (adapter->netdev->features & NETIF_F_RXHASH)) {
- enum pkt_hash_types hash_type;
-
- switch (rcd->rssType) {
- case VMXNET3_RCD_RSS_TYPE_IPV4:
- case VMXNET3_RCD_RSS_TYPE_IPV6:
- hash_type = PKT_HASH_TYPE_L3;
- break;
- case VMXNET3_RCD_RSS_TYPE_TCPIPV4:
- case VMXNET3_RCD_RSS_TYPE_TCPIPV6:
- case VMXNET3_RCD_RSS_TYPE_UDPIPV4:
- case VMXNET3_RCD_RSS_TYPE_UDPIPV6:
- hash_type = PKT_HASH_TYPE_L4;
- break;
- default:
- hash_type = PKT_HASH_TYPE_L3;
- break;
- }
- skb_set_hash(ctx->skb,
- le32_to_cpu(rcd->rssHash),
- hash_type);
- }
-#endif
skb_record_rx_queue(ctx->skb, rq->qid);
skb_put(ctx->skb, rcd->len);
@@ -1653,6 +1628,31 @@ vmxnet3_rq_rx_complete(struct vmxnet3_rx_queue *rq,
u32 mtu = adapter->netdev->mtu;
skb->len += skb->data_len;
+#ifdef VMXNET3_RSS
+ if (rcd->rssType != VMXNET3_RCD_RSS_TYPE_NONE &&
+ (adapter->netdev->features & NETIF_F_RXHASH)) {
+ enum pkt_hash_types hash_type;
+
+ switch (rcd->rssType) {
+ case VMXNET3_RCD_RSS_TYPE_IPV4:
+ case VMXNET3_RCD_RSS_TYPE_IPV6:
+ hash_type = PKT_HASH_TYPE_L3;
+ break;
+ case VMXNET3_RCD_RSS_TYPE_TCPIPV4:
+ case VMXNET3_RCD_RSS_TYPE_TCPIPV6:
+ case VMXNET3_RCD_RSS_TYPE_UDPIPV4:
+ case VMXNET3_RCD_RSS_TYPE_UDPIPV6:
+ hash_type = PKT_HASH_TYPE_L4;
+ break;
+ default:
+ hash_type = PKT_HASH_TYPE_L3;
+ break;
+ }
+ skb_set_hash(skb,
+ le32_to_cpu(rcd->rssHash),
+ hash_type);
+ }
+#endif
vmxnet3_rx_csum(adapter, skb,
(union Vmxnet3_GenericDesc *)rcd);
skb->protocol = eth_type_trans(skb, adapter->netdev);
--
2.11.0
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH net ] vmxnet3: move rss code block under eop descriptor
2023-02-07 19:28 [PATCH net ] vmxnet3: move rss code block under eop descriptor Ronak Doshi
@ 2023-02-07 19:34 ` kernel test robot
2023-02-08 6:12 ` Jakub Kicinski
1 sibling, 0 replies; 8+ messages in thread
From: kernel test robot @ 2023-02-07 19:34 UTC (permalink / raw)
To: Ronak Doshi; +Cc: stable, oe-kbuild-all
Hi,
Thanks for your patch.
FYI: kernel test robot notices the stable kernel rule is not satisfied.
Rule: 'Cc: stable@vger.kernel.org' or 'commit <sha1> upstream.'
Subject: [PATCH net ] vmxnet3: move rss code block under eop descriptor
Link: https://lore.kernel.org/stable/20230207192849.2732-1-doshir%40vmware.com
The check is based on https://www.kernel.org/doc/html/latest/process/stable-kernel-rules.html
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net ] vmxnet3: move rss code block under eop descriptor
2023-02-07 19:28 [PATCH net ] vmxnet3: move rss code block under eop descriptor Ronak Doshi
2023-02-07 19:34 ` kernel test robot
@ 2023-02-08 6:12 ` Jakub Kicinski
2023-02-08 7:25 ` Greg KH
2023-02-08 18:48 ` Ronak Doshi
1 sibling, 2 replies; 8+ messages in thread
From: Jakub Kicinski @ 2023-02-08 6:12 UTC (permalink / raw)
To: Ronak Doshi
Cc: netdev, stable, VMware PV-Drivers Reviewers, David S. Miller,
Eric Dumazet, Paolo Abeni, open list
On Tue, 7 Feb 2023 11:28:49 -0800 Ronak Doshi wrote:
> Commit b3973bb40041 ("vmxnet3: set correct hash type based on
> rss information") added hashType information into skb. However,
> rssType field is populated for eop descriptor.
>
> This patch moves the RSS codeblock under eop descritor.
Does it mean it always fails, often fails or occasionally fails
to provide the right hash?
Please add a Fixes tag so that the patch is automatically pulled
into the stable releases.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net ] vmxnet3: move rss code block under eop descriptor
2023-02-08 6:12 ` Jakub Kicinski
@ 2023-02-08 7:25 ` Greg KH
2023-02-08 7:36 ` Jakub Kicinski
2023-02-08 18:48 ` Ronak Doshi
1 sibling, 1 reply; 8+ messages in thread
From: Greg KH @ 2023-02-08 7:25 UTC (permalink / raw)
To: Jakub Kicinski
Cc: Ronak Doshi, netdev, stable, VMware PV-Drivers Reviewers,
David S. Miller, Eric Dumazet, Paolo Abeni, open list
On Tue, Feb 07, 2023 at 10:12:21PM -0800, Jakub Kicinski wrote:
> On Tue, 7 Feb 2023 11:28:49 -0800 Ronak Doshi wrote:
> > Commit b3973bb40041 ("vmxnet3: set correct hash type based on
> > rss information") added hashType information into skb. However,
> > rssType field is populated for eop descriptor.
> >
> > This patch moves the RSS codeblock under eop descritor.
>
> Does it mean it always fails, often fails or occasionally fails
> to provide the right hash?
>
> Please add a Fixes tag so that the patch is automatically pulled
> into the stable releases.
Fixes: is not the way to do this, you need a cc: stable in the
signed-off-by area please as the documentation has stated for 16+ years :)
thanks,
greg k-h
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net ] vmxnet3: move rss code block under eop descriptor
2023-02-08 7:25 ` Greg KH
@ 2023-02-08 7:36 ` Jakub Kicinski
0 siblings, 0 replies; 8+ messages in thread
From: Jakub Kicinski @ 2023-02-08 7:36 UTC (permalink / raw)
To: Greg KH
Cc: Ronak Doshi, netdev, stable, VMware PV-Drivers Reviewers,
David S. Miller, Eric Dumazet, Paolo Abeni, open list
On Wed, 8 Feb 2023 08:25:29 +0100 Greg KH wrote:
> > Does it mean it always fails, often fails or occasionally fails
> > to provide the right hash?
> >
> > Please add a Fixes tag so that the patch is automatically pulled
> > into the stable releases.
>
> Fixes: is not the way to do this, you need a cc: stable in the
> signed-off-by area please as the documentation has stated for 16+ years :)
Ah, I have been caught! :]
I may have started telling people "to put the Fixes tag on for stable"
because it seems most succinct and understandable.
I'll go back to saying "for the benefit of the backporters", or some
such, sorry..
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net ] vmxnet3: move rss code block under eop descriptor
2023-02-08 6:12 ` Jakub Kicinski
2023-02-08 7:25 ` Greg KH
@ 2023-02-08 18:48 ` Ronak Doshi
2023-02-08 19:18 ` Jakub Kicinski
1 sibling, 1 reply; 8+ messages in thread
From: Ronak Doshi @ 2023-02-08 18:48 UTC (permalink / raw)
To: Jakub Kicinski
Cc: netdev, stable, Pv-drivers, David S. Miller, Eric Dumazet,
Paolo Abeni, open list
> On 2/7/23, 10:12 PM, "Jakub Kicinski" <kuba@kernel.org <mailto:kuba@kernel.org>> wrote:
>
> On Tue, 7 Feb 2023 11:28:49 -0800 Ronak Doshi wrote:
> > Commit b3973bb40041 ("vmxnet3: set correct hash type based on
> > rss information") added hashType information into skb. However,
> > rssType field is populated for eop descriptor.
> >
> > This patch moves the RSS codeblock under eop descritor.
>
>
> Does it mean it always fails, often fails or occasionally fails
> to provide the right hash?
This will cause issues mostly for cases which require multiple rx descriptors.
For single rx descriptor packet, eop and sop will be same, so no issue.
Thanks,
Ronak
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net ] vmxnet3: move rss code block under eop descriptor
2023-02-08 18:48 ` Ronak Doshi
@ 2023-02-08 19:18 ` Jakub Kicinski
2023-02-08 22:34 ` Ronak Doshi
0 siblings, 1 reply; 8+ messages in thread
From: Jakub Kicinski @ 2023-02-08 19:18 UTC (permalink / raw)
To: Ronak Doshi
Cc: netdev, stable, Pv-drivers, David S. Miller, Eric Dumazet,
Paolo Abeni, open list
On Wed, 8 Feb 2023 18:48:42 +0000 Ronak Doshi wrote:
> > On Tue, 7 Feb 2023 11:28:49 -0800 Ronak Doshi wrote:
> > > Commit b3973bb40041 ("vmxnet3: set correct hash type based on
> > > rss information") added hashType information into skb. However,
> > > rssType field is populated for eop descriptor.
> > >
> > > This patch moves the RSS codeblock under eop descritor.
> >
> > Does it mean it always fails, often fails or occasionally fails
> > to provide the right hash?
>
> This will cause issues mostly for cases which require multiple rx descriptors.
> For single rx descriptor packet, eop and sop will be same, so no issue.
Could you add to the commit message when user will most likely
encounter that situation? With high MTUs? Depending on the
underlying HW/NIC?
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH net ] vmxnet3: move rss code block under eop descriptor
2023-02-08 19:18 ` Jakub Kicinski
@ 2023-02-08 22:34 ` Ronak Doshi
0 siblings, 0 replies; 8+ messages in thread
From: Ronak Doshi @ 2023-02-08 22:34 UTC (permalink / raw)
To: Jakub Kicinski
Cc: netdev, stable, Pv-drivers, David S. Miller, Eric Dumazet,
Paolo Abeni, open list
> On 2/8/23, 11:18 AM, "Jakub Kicinski" <kuba@kernel.org <mailto:kuba@kernel.org>> wrote:
>
> Could you add to the commit message when user will most likely
> encounter that situation? With high MTUs? Depending on the
> underlying HW/NIC?
Sure, let me add it.
Thanks,
Ronak
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2023-02-08 22:34 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-02-07 19:28 [PATCH net ] vmxnet3: move rss code block under eop descriptor Ronak Doshi
2023-02-07 19:34 ` kernel test robot
2023-02-08 6:12 ` Jakub Kicinski
2023-02-08 7:25 ` Greg KH
2023-02-08 7:36 ` Jakub Kicinski
2023-02-08 18:48 ` Ronak Doshi
2023-02-08 19:18 ` Jakub Kicinski
2023-02-08 22:34 ` Ronak Doshi
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.