[PATCH 0/2] bnxt_en: Add XDP RSS hash metadata

Chris J Arges posted 2 patches 1 month, 2 weeks ago
drivers/net/ethernet/broadcom/bnxt/bnxt.c     | 29 ++++++++----
drivers/net/ethernet/broadcom/bnxt/bnxt.h     |  2 +
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 47 +++++++++++++++++++
drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h |  9 ++++
4 files changed, 77 insertions(+), 10 deletions(-)
[PATCH 0/2] bnxt_en: Add XDP RSS hash metadata
Posted by Chris J Arges 1 month, 2 weeks ago
This patchset adds the ability to use an XDP program to extract the RSS
hash of a given an xdp_md context.

For example this XDP program extracts hash and rss_type:
```
        ret = bpf_xdp_metadata_rx_hash(ctx, &hash, &rss_type);
        if (ret == 0) {
                bpf_printk("XDP: RX hash=0x%x type=%02x", hash, rss_type);
        }
```

I was able to test this with a Broadcom BCM57414 NIC and verify that the
rss_type and hash were correct for IPv4/6 TCP/UDP and ICMP traffic.

Chris J Arges (2):
  bnxt_en: use bnxt_xdp_buff for xdp context
  bnxt_en: Implement XDP RSS hash metadata extraction

 drivers/net/ethernet/broadcom/bnxt/bnxt.c     | 29 ++++++++----
 drivers/net/ethernet/broadcom/bnxt/bnxt.h     |  2 +
 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 47 +++++++++++++++++++
 drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h |  9 ++++
 4 files changed, 77 insertions(+), 10 deletions(-)

-- 
2.43.0
Re: [PATCH 0/2] bnxt_en: Add XDP RSS hash metadata
Posted by Chris Arges 1 month, 2 weeks ago
On 2026-02-13 13:24:26, Chris J Arges wrote:
> This patchset adds the ability to use an XDP program to extract the RSS
> hash of a given an xdp_md context.
>

I see net-next is closed: https://netdev.bots.linux.dev/net-next.html
I'll re-send with proper target after Feb 23rd.
--chris


 
> For example this XDP program extracts hash and rss_type:
> ```
>         ret = bpf_xdp_metadata_rx_hash(ctx, &hash, &rss_type);
>         if (ret == 0) {
>                 bpf_printk("XDP: RX hash=0x%x type=%02x", hash, rss_type);
>         }
> ```
> 
> I was able to test this with a Broadcom BCM57414 NIC and verify that the
> rss_type and hash were correct for IPv4/6 TCP/UDP and ICMP traffic.
> 
> Chris J Arges (2):
>   bnxt_en: use bnxt_xdp_buff for xdp context
>   bnxt_en: Implement XDP RSS hash metadata extraction
> 
>  drivers/net/ethernet/broadcom/bnxt/bnxt.c     | 29 ++++++++----
>  drivers/net/ethernet/broadcom/bnxt/bnxt.h     |  2 +
>  drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 47 +++++++++++++++++++
>  drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.h |  9 ++++
>  4 files changed, 77 insertions(+), 10 deletions(-)
> 
> -- 
> 2.43.0
Re: [PATCH 0/2] bnxt_en: Add XDP RSS hash metadata
Posted by Jakub Kicinski 1 month, 2 weeks ago
On Fri, 13 Feb 2026 13:37:58 -0600 Chris Arges wrote:
> On 2026-02-13 13:24:26, Chris J Arges wrote:
> > This patchset adds the ability to use an XDP program to extract the RSS
> > hash of a given an xdp_md context.
> 
> I see net-next is closed: https://netdev.bots.linux.dev/net-next.html
> I'll re-send with proper target after Feb 23rd.

Would you be willing to add a test as well?

https://github.com/linux-netdev/nipa/wiki/Running-driver-tests
existing tests in tools/testing/selftests/drivers/net/
Re: [PATCH 0/2] bnxt_en: Add XDP RSS hash metadata
Posted by Chris Arges 1 month, 1 week ago
On 2026-02-13 12:09:15, Jakub Kicinski wrote:
> On Fri, 13 Feb 2026 13:37:58 -0600 Chris Arges wrote:
> > On 2026-02-13 13:24:26, Chris J Arges wrote:
> > > This patchset adds the ability to use an XDP program to extract the RSS
> > > hash of a given an xdp_md context.
> > 
> > I see net-next is closed: https://netdev.bots.linux.dev/net-next.html
> > I'll re-send with proper target after Feb 23rd.
> 
> Would you be willing to add a test as well?
> 
> https://github.com/linux-netdev/nipa/wiki/Running-driver-tests
> existing tests in tools/testing/selftests/drivers/net/

Sure, I'll add this and kbot test fixes when I re-submit the patches.
Thanks,
--chris