netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Michael Chan <michael.chan@broadcom.com>
Cc: davem@davemloft.net, netdev@vger.kernel.org, edumazet@google.com,
	pabeni@redhat.com, andrew+netdev@lunn.ch, horms@kernel.org,
	donald.hunter@gmail.com, pavan.chebbi@broadcom.com,
	gal@nvidia.com, andrew@lunn.ch, willemdebruijn.kernel@gmail.com
Subject: Re: [PATCH net-next v2 3/4] eth: bnxt: support RSS on IPv6 Flow Label
Date: Wed, 23 Jul 2025 10:30:01 -0700	[thread overview]
Message-ID: <20250723103001.79eb35fa@kernel.org> (raw)
In-Reply-To: <CACKFLi=EdZ1zisGZHZYQzqttQZx+8-vnoq5==mD98Tv80d1qxA@mail.gmail.com>

On Tue, 22 Jul 2025 00:57:14 -0700 Michael Chan wrote:
> Here, it needs to be something like this so that we only set the flag
> for 2-tuple or 3-tuple.  The FW call will fail if both flags are set:
> 
> if (!tuple || tuple == 2)
>         rss_hash_cfg &= ~VNIC_RSS_CFG_REQ_HASH_TYPE_IPV6;
> if (tuple == 2) {
>         if (cmd->data & RXH_IP6_FL)
>                 rss_hash_cfg |=
>                         VNIC_RSS_CFG_REQ_HASH_TYPE_IPV6_FLOW_LABEL;
>         else
>                 rss_hash_cfg |= VNIC_RSS_CFG_REQ_HASH_TYPE_IPV6;
> }

Thanks for the help! Thinking thru this carefully I'm worried this will
leave the FLOW_LABEL bit in place if we switch from FL to 4-tuple.
Tho, I'm not clear on how 0-tuple to 4-tuple switch works at present.

Would this look good to you?

	case TCP_V6_FLOW:
	case UDP_V6_FLOW:
	case SCTP_V6_FLOW:
	case AH_ESP_V6_FLOW:
	case AH_V6_FLOW:
	case ESP_V6_FLOW:
	case IPV6_FLOW:
		rss_hash_cfg &= ~(VNIC_RSS_CFG_REQ_HASH_TYPE_IPV6 |
				  VNIC_RSS_CFG_REQ_HASH_TYPE_IPV6_FLOW_LABEL);
		if (!tuple)
			break;
		if (cmd->data & RXH_IP6_FL)
			rss_hash_cfg |=
				VNIC_RSS_CFG_REQ_HASH_TYPE_IPV6_FLOW_LABEL;
		else
			rss_hash_cfg |= VNIC_RSS_CFG_REQ_HASH_TYPE_IPV6;
		break;

or should the else branch have 

	else if (tuple == 2)

?

  reply	other threads:[~2025-07-23 17:30 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-22  1:49 [PATCH net-next v2 0/4] net: ethtool: support including Flow Label in the flow hash for RSS Jakub Kicinski
2025-07-22  1:49 ` [PATCH net-next v2 1/4] " Jakub Kicinski
2025-07-22  1:49 ` [PATCH net-next v2 2/4] eth: fbnic: support RSS on IPv6 Flow Label Jakub Kicinski
2025-07-22  1:49 ` [PATCH net-next v2 3/4] eth: bnxt: " Jakub Kicinski
2025-07-22  7:57   ` Michael Chan
2025-07-23 17:30     ` Jakub Kicinski [this message]
2025-07-22  1:49 ` [PATCH net-next v2 4/4] selftests: drv-net: add test for RSS on flow label Jakub Kicinski
2025-07-23 13:49   ` Willem de Bruijn

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=20250723103001.79eb35fa@kernel.org \
    --to=kuba@kernel.org \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=donald.hunter@gmail.com \
    --cc=edumazet@google.com \
    --cc=gal@nvidia.com \
    --cc=horms@kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=pavan.chebbi@broadcom.com \
    --cc=willemdebruijn.kernel@gmail.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).