diff mbox series

[net] vmxnet3: move rss code block under eop descriptor

Message ID 20230207192849.2732-1-doshir@vmware.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series [net] vmxnet3: move rss code block under eop descriptor | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present fail Series targets non-next tree, but doesn't contain any Fixes tags
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 14 this patch: 14
netdev/cc_maintainers success CCed 7 of 7 maintainers
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 14 this patch: 14
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 62 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Ronak Doshi Feb. 7, 2023, 7:28 p.m. UTC
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(-)

Comments

Jakub Kicinski Feb. 8, 2023, 6:12 a.m. UTC | #1
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.
Greg KH Feb. 8, 2023, 7:25 a.m. UTC | #2
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
Jakub Kicinski Feb. 8, 2023, 7:36 a.m. UTC | #3
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..
Ronak Doshi Feb. 8, 2023, 6:48 p.m. UTC | #4
> 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
Jakub Kicinski Feb. 8, 2023, 7:18 p.m. UTC | #5
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?
Ronak Doshi Feb. 8, 2023, 10:34 p.m. UTC | #6
> 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
diff mbox series

Patch

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);