From: Lorenzo Bianconi <lorenzo@kernel.org>
To: Jesper Dangaard Brouer <brouer@redhat.com>
Cc: netdev@vger.kernel.org, bpf@vger.kernel.org, davem@davemloft.net,
kuba@kernel.org, lorenzo.bianconi@redhat.com,
ilias.apalodimas@linaro.org
Subject: Re: [RFC 1/2] net: xdp: introduce bulking for xdp tx return path
Date: Tue, 20 Oct 2020 12:34:00 +0200 [thread overview]
Message-ID: <20201020103400.GA186228@lore-desk> (raw)
In-Reply-To: <20201020114613.752a979c@carbon>
[-- Attachment #1: Type: text/plain, Size: 1574 bytes --]
> On Tue, 20 Oct 2020 11:33:37 +0200
> Lorenzo Bianconi <lorenzo@kernel.org> wrote:
>
> > diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
> > index 54b0bf574c05..af33cc62ed4c 100644
> > --- a/drivers/net/ethernet/marvell/mvneta.c
> > +++ b/drivers/net/ethernet/marvell/mvneta.c
> > @@ -663,6 +663,8 @@ struct mvneta_tx_queue {
> >
> > /* Affinity mask for CPUs*/
> > cpumask_t affinity_mask;
> > +
> > + struct xdp_frame_bulk bq;
> > };
> >
> > struct mvneta_rx_queue {
> > @@ -1854,12 +1856,10 @@ static void mvneta_txq_bufs_free(struct mvneta_port *pp,
> > dev_kfree_skb_any(buf->skb);
> > } else if (buf->type == MVNETA_TYPE_XDP_TX ||
> > buf->type == MVNETA_TYPE_XDP_NDO) {
> > - if (napi && buf->type == MVNETA_TYPE_XDP_TX)
> > - xdp_return_frame_rx_napi(buf->xdpf);
> > - else
> > - xdp_return_frame(buf->xdpf);
> > + xdp_return_frame_bulk(buf->xdpf, &txq->bq, napi);
>
> Hmm, I don't think you can use 'napi' directly here.
>
> You are circumventing check (buf->type == MVNETA_TYPE_XDP_TX), and will
> now also allow XDP_NDO (XDP_REDIRECT) to basically use xdp_return_frame_rx_napi().
ack, right. I will fix it.
Regards,
Lorenzo
>
>
> > }
> > }
> > + xdp_flush_frame_bulk(&txq->bq, napi);
> >
> > netdev_tx_completed_queue(nq, pkts_compl, bytes_compl);
> > }
>
>
>
> --
> Best regards,
> Jesper Dangaard Brouer
> MSc.CS, Principal Kernel Engineer at Red Hat
> LinkedIn: http://www.linkedin.com/in/brouer
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2020-10-20 10:34 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-20 9:33 [RFC 0/2] xdp: introduce bulking for page_pool tx return path Lorenzo Bianconi
2020-10-20 9:33 ` [RFC 1/2] net: xdp: introduce bulking for xdp " Lorenzo Bianconi
2020-10-20 9:46 ` Jesper Dangaard Brouer
2020-10-20 10:34 ` Lorenzo Bianconi [this message]
2020-10-20 9:33 ` [RFC 2/2] net: page_pool: add bulk support for ptr_ring Lorenzo Bianconi
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=20201020103400.GA186228@lore-desk \
--to=lorenzo@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=brouer@redhat.com \
--cc=davem@davemloft.net \
--cc=ilias.apalodimas@linaro.org \
--cc=kuba@kernel.org \
--cc=lorenzo.bianconi@redhat.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;
as well as URLs for NNTP newsgroup(s).