Netdev List
 help / color / mirror / Atom feed
From: Andy Gospodarek <andrew.gospodarek@broadcom.com>
To: Jakub Kicinski <kuba@kernel.org>
Cc: Michael Chan <michael.chan@broadcom.com>,
	davem@davemloft.net, netdev@vger.kernel.org
Subject: Re: [PATCH net-next v2 11/11] bnxt: XDP multibuffer enablement
Date: Tue, 22 Mar 2022 06:26:36 -0400	[thread overview]
Message-ID: <YjmkXC0rLxsihCMx@C02YVCJELVCG> (raw)
In-Reply-To: <20220321230958.784fe3e4@kicinski-fedora-pc1c0hjn.dhcp.thefacebook.com>

[-- Attachment #1: Type: text/plain, Size: 2252 bytes --]

On Mon, Mar 21, 2022 at 11:09:58PM -0700, Jakub Kicinski wrote:
> On Sun, 20 Mar 2022 15:58:04 -0400 Michael Chan wrote:
> > From: Andy Gospodarek <gospo@broadcom.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@broadcom.com>
> > Signed-off-by: Michael Chan <michael.chan@broadcom.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.
> 

Thanks for the review!  I've sent Michael an updated patch and we should be
able to get a v3 out this morning to cover this.

> > -		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;
> 

[-- Attachment #2: S/MIME Cryptographic Signature --]
[-- Type: application/pkcs7-signature, Size: 4222 bytes --]

  reply	other threads:[~2022-03-22 10:26 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-20 19:57 [PATCH net-next v2 00/11] bnxt: Support XDP multi buffer Michael Chan
2022-03-20 19:57 ` [PATCH net-next v2 01/11] bnxt: refactor bnxt_rx_xdp to separate xdp_init_buff/xdp_prepare_buff Michael Chan
2022-03-20 19:57 ` [PATCH net-next v2 02/11] bnxt: add flag to denote that an xdp program is currently attached Michael Chan
2022-03-20 19:57 ` [PATCH net-next v2 03/11] bnxt: refactor bnxt_rx_pages operate on skb_shared_info Michael Chan
2022-03-20 19:57 ` [PATCH net-next v2 04/11] bnxt: rename bnxt_rx_pages to bnxt_rx_agg_pages_skb Michael Chan
2022-03-20 19:57 ` [PATCH net-next v2 05/11] bnxt: adding bnxt_rx_agg_pages_xdp for aggregated xdp Michael Chan
2022-03-20 19:57 ` [PATCH net-next v2 06/11] bnxt: set xdp_buff pfmemalloc flag if needed Michael Chan
2022-03-20 19:58 ` [PATCH net-next v2 07/11] bnxt: change receive ring space parameters Michael Chan
2022-03-20 19:58 ` [PATCH net-next v2 08/11] bnxt: add page_pool support for aggregation ring when using xdp Michael Chan
2022-03-20 19:58 ` [PATCH net-next v2 09/11] bnxt: adding bnxt_xdp_build_skb to build skb from multibuffer xdp_buff Michael Chan
2022-03-20 19:58 ` [PATCH net-next v2 10/11] bnxt: support transmit and free of aggregation buffers Michael Chan
2022-03-20 19:58 ` [PATCH net-next v2 11/11] bnxt: XDP multibuffer enablement Michael Chan
2022-03-22  6:09   ` Jakub Kicinski
2022-03-22 10:26     ` Andy Gospodarek [this message]
2022-03-22 18:04       ` Michael Chan
2022-03-22  6:11 ` [PATCH net-next v2 00/11] bnxt: Support XDP multi buffer Jakub Kicinski

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=YjmkXC0rLxsihCMx@C02YVCJELVCG \
    --to=andrew.gospodarek@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=kuba@kernel.org \
    --cc=michael.chan@broadcom.com \
    --cc=netdev@vger.kernel.org \
    /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