[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CACKFLikqObM2A6vDs2+ixq3pvJScdCGV+VkqubhxR6pmYw2TFQ@mail.gmail.com>
Date: Wed, 23 Jul 2025 20:36:00 -0700
From: Michael Chan <michael.chan@...adcom.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org,
donald.hunter@...il.com, pavan.chebbi@...adcom.com, andrew@...n.ch,
willemdebruijn.kernel@...il.com
Subject: Re: [PATCH net-next v3 3/4] eth: bnxt: support RSS on IPv6 Flow Label
On Wed, Jul 23, 2025 at 6:51 PM Jakub Kicinski <kuba@...nel.org> wrote:
>
> It appears that the bnxt FW API has the relevant bit for Flow Label
> hashing. Plumb in the support. Obey the capability bit.
>
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
> v2:
> - update the logic to pick the 2 tuple *OR* the FL bit
> v1: https://lore.kernel.org/20250722014915.3365370-4-kuba@kernel.org
>
> CC: michael.chan@...adcom.com
> CC: pavan.chebbi@...adcom.com
> @@ -1662,13 +1664,18 @@ static int bnxt_set_rxfh_fields(struct net_device *dev,
>
> if (cmd->data == RXH_4TUPLE)
> tuple = 4;
> - else if (cmd->data == RXH_2TUPLE)
> + else if (cmd->data == RXH_2TUPLE ||
> + cmd->data == (RXH_2TUPLE | RXH_IP6_FL))
> tuple = 2;
> else if (!cmd->data)
> tuple = 0;
> else
> return -EINVAL;
>
> + if (cmd->data & RXH_IP6_FL &&
> + !(bp->rss_cap & BNXT_RSS_CAP_IPV6_FLOW_LABEL_RSS_CAP))
> + return -EINVAL;
> +
> if (cmd->flow_type == TCP_V4_FLOW) {
> rss_hash_cfg &= ~VNIC_RSS_CFG_REQ_HASH_TYPE_TCP_IPV4;
> if (tuple == 4)
> @@ -1732,10 +1739,15 @@ static int bnxt_set_rxfh_fields(struct net_device *dev,
> case AH_V6_FLOW:
> case ESP_V6_FLOW:
> case IPV6_FLOW:
> - if (tuple == 2)
> + 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
I think else if (tuple == 2) here is more correct as you were asking
earlier. Here tuple can be 2 or 4 and I think we only want to set
this flag when it is 2 tuple. This will preserve the existing
behavior.
> rss_hash_cfg |= VNIC_RSS_CFG_REQ_HASH_TYPE_IPV6;
> - else if (!tuple)
> - rss_hash_cfg &= ~VNIC_RSS_CFG_REQ_HASH_TYPE_IPV6;
> break;
> }
>
> --
> 2.50.1
>
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4196 bytes)
Powered by blists - more mailing lists