lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220321230958.784fe3e4@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>
Date:   Mon, 21 Mar 2022 23:09:58 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Michael Chan <michael.chan@...adcom.com>
Cc:     davem@...emloft.net, netdev@...r.kernel.org, gospo@...adcom.com
Subject: Re: [PATCH net-next v2 11/11] bnxt: XDP multibuffer enablement

On Sun, 20 Mar 2022 15:58:04 -0400 Michael Chan wrote:
> From: Andy Gospodarek <gospo@...adcom.com>
> 
> Allow aggregation buffers to be in place in the receive path and
> allow XDP programs to be attached when using a larger than 4k MTU.
> 
> Signed-off-by: Andy Gospodarek <gospo@...adcom.com>
> Signed-off-by: Michael Chan <michael.chan@...adcom.com>
> ---
>  drivers/net/ethernet/broadcom/bnxt/bnxt.c     | 3 +--
>  drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c | 5 -----
>  2 files changed, 1 insertion(+), 7 deletions(-)
> 
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt.c b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> index 84c89ee7dc2f..4f7213af1955 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt.c
> @@ -1937,8 +1937,7 @@ static int bnxt_rx_pkt(struct bnxt *bp, struct bnxt_cp_ring_info *cpr,
>  		xdp_active = true;
>  	}
>  
> -	/* skip running XDP prog if there are aggregation bufs */
> -	if (!agg_bufs && xdp_active) {
> +	if (xdp_active) {
>  		if (bnxt_rx_xdp(bp, rxr, cons, xdp, data, &len, event)) {
>  			rc = 1;
>  			goto next_rx;
> diff --git a/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c b/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
> index adbd92971209..3780b491a1d4 100644
> --- a/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
> +++ b/drivers/net/ethernet/broadcom/bnxt/bnxt_xdp.c
> @@ -374,11 +374,6 @@ static int bnxt_xdp_set(struct bnxt *bp, struct bpf_prog *prog)
>  	int tx_xdp = 0, rc, tc;
>  	struct bpf_prog *old;
>  
> -	if (prog && bp->dev->mtu > BNXT_MAX_PAGE_MODE_MTU) {

This seems to be missing taking prog->aux->xdp_has_frags into account.

> -		netdev_warn(dev, "MTU %d larger than largest XDP supported MTU %d.\n",
> -			    bp->dev->mtu, BNXT_MAX_PAGE_MODE_MTU);
> -		return -EOPNOTSUPP;
> -	}
>  	if (!(bp->flags & BNXT_FLAG_SHARED_RINGS)) {
>  		netdev_warn(dev, "ethtool rx/tx channels must be combined to support XDP.\n");
>  		return -EOPNOTSUPP;

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ