[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <w3kr4zyocloibq6mniumhtcbp6hqfur6uzqeem6hpoe76t2gqr@4jmz72w3wrw3>
Date: Wed, 19 Feb 2025 18:58:02 -0700
From: Daniel Xu <dxu@...uu.xyz>
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, daniel@...earbox.net,
hawk@...nel.org, john.fastabend@...il.com, michael.chan@...adcom.com,
pavan.chebbi@...adcom.com, ap420073@...il.com
Subject: Re: [PATCH net 1/2] bnxt: don't reject XDP installation when HDS
isn't forced on
On Wed, Feb 19, 2025 at 04:53:17PM -0800, Jakub Kicinski wrote:
> HDS flag is often set because GRO-HW is enabled. But we call
> bnxt_set_rx_skb_mode() later, which will clear it. So make
> sure we reject XDP when user asked for HDS, not when it's
> enabled for other reasons.
>
> Fixes: 87c8f8496a05 ("bnxt_en: add support for tcp-data-split ethtool command")
> Signed-off-by: Jakub Kicinski <kuba@...nel.org>
> ---
> CC: daniel@...earbox.net
> CC: hawk@...nel.org
> CC: john.fastabend@...il.com
> CC: michael.chan@...adcom.com
> CC: pavan.chebbi@...adcom.com
> CC: ap420073@...il.com
> ---
> drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 4 +++-
> 1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
> index e6c64e4bd66c..ff208c4b7d70 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
> @@ -11,10 +11,12 @@
> #include <linux/pci.h>
> #include <linux/netdevice.h>
> #include <linux/etherdevice.h>
> +#include <linux/ethtool_netlink.h>
> #include <linux/if_vlan.h>
> #include <linux/bpf.h>
> #include <linux/bpf_trace.h>
> #include <linux/filter.h>
> +#include <net/netdev_queues.h>
> #include <net/page_pool/helpers.h>
> #include "bnxt_hsi.h"
> #include "bnxt.h"
> @@ -395,7 +397,7 @@ static int bnxt_xdp_set(struct bnxt *bp, struct bpf_prog *prog)
> bp->dev->mtu, BNXT_MAX_PAGE_MODE_MTU);
> return -EOPNOTSUPP;
> }
> - if (prog && bp->flags & BNXT_FLAG_HDS) {
> + if (prog && dev->cfg->hds_config == ETHTOOL_TCP_DATA_SPLIT_ENABLED) {
> netdev_warn(dev, "XDP is disallowed when HDS is enabled.\n");
> return -EOPNOTSUPP;
> }
> --
> 2.48.1
>
Nice, that fixed it.
Tested-by: Daniel Xu <dxu@...uu.xyz>
Powered by blists - more mailing lists