From: Jakub Kicinski <jakub.kicinski@netronome•com>
To: Lorenzo Bianconi <lorenzo@kernel•org>
Cc: netdev@vger•kernel.org, lorenzo.bianconi@redhat•com,
davem@davemloft•net, thomas.petazzoni@bootlin•com,
brouer@redhat•com, ilias.apalodimas@linaro•org,
matteo.croce@redhat•com, mw@semihalf•com
Subject: Re: [PATCH v3 net-next 7/8] net: mvneta: make tx buffer array agnostic
Date: Tue, 15 Oct 2019 17:03:53 -0700 [thread overview]
Message-ID: <20191015170353.1f4fbbbb@cakuba.netronome.com> (raw)
In-Reply-To: <d233782c20a6d64f39c9d28fd321fc07fcc8b65e.1571049326.git.lorenzo@kernel.org>
On Mon, 14 Oct 2019 12:49:54 +0200, Lorenzo Bianconi wrote:
> Allow tx buffer array to contain both skb and xdp buffers in order to
> enable xdp frame recycling adding XDP_TX verdict support
>
> Signed-off-by: Lorenzo Bianconi <lorenzo@kernel•org>
> ---
> drivers/net/ethernet/marvell/mvneta.c | 66 +++++++++++++++++----------
> 1 file changed, 43 insertions(+), 23 deletions(-)
>
> diff --git a/drivers/net/ethernet/marvell/mvneta.c b/drivers/net/ethernet/marvell/mvneta.c
> index a79d81c9be7a..477ae6592fa3 100644
> --- a/drivers/net/ethernet/marvell/mvneta.c
> +++ b/drivers/net/ethernet/marvell/mvneta.c
> @@ -561,6 +561,20 @@ struct mvneta_rx_desc {
> };
> #endif
>
> +enum mvneta_tx_buf_type {
> + MVNETA_TYPE_SKB,
> + MVNETA_TYPE_XDP_TX,
> + MVNETA_TYPE_XDP_NDO,
> +};
> +
> +struct mvneta_tx_buf {
> + enum mvneta_tx_buf_type type;
I'd be tempted to try to encode type on the low bits of the pointer,
otherwise you're increasing the cache pressure here. I'm not 100% sure
it's worth the hassle, perhaps could be a future optimization.
> + union {
> + struct xdp_frame *xdpf;
> + struct sk_buff *skb;
> + };
> +};
next prev parent reply other threads:[~2019-10-16 0:04 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-14 10:49 [PATCH v3 net-next 0/8] add XDP support to mvneta driver Lorenzo Bianconi
2019-10-14 10:49 ` [PATCH v3 net-next 1/8] net: mvneta: introduce mvneta_update_stats routine Lorenzo Bianconi
2019-10-14 10:49 ` [PATCH v3 net-next 2/8] net: mvneta: introduce page pool API for sw buffer manager Lorenzo Bianconi
2019-10-15 22:41 ` Jakub Kicinski
2019-10-16 8:32 ` Lorenzo Bianconi
2019-10-14 10:49 ` [PATCH v3 net-next 3/8] net: mvneta: rely on build_skb in mvneta_rx_swbm poll routine Lorenzo Bianconi
2019-10-14 10:49 ` [PATCH v3 net-next 4/8] net: mvneta: sync dma buffers before refilling hw queues Lorenzo Bianconi
2019-10-15 23:01 ` Jakub Kicinski
2019-10-16 9:09 ` Lorenzo Bianconi
2019-10-14 10:49 ` [PATCH v3 net-next 5/8] net: mvneta: add basic XDP support Lorenzo Bianconi
2019-10-14 12:48 ` Jesper Dangaard Brouer
2019-10-14 13:27 ` Lorenzo Bianconi
2019-10-15 23:20 ` Jakub Kicinski
2019-10-16 8:39 ` Lorenzo Bianconi
2019-10-14 10:49 ` [PATCH v3 net-next 6/8] net: mvneta: move header prefetch in mvneta_swbm_rx_frame Lorenzo Bianconi
2019-10-14 10:49 ` [PATCH v3 net-next 7/8] net: mvneta: make tx buffer array agnostic Lorenzo Bianconi
2019-10-16 0:03 ` Jakub Kicinski [this message]
2019-10-16 8:18 ` Ilias Apalodimas
2019-10-14 10:49 ` [PATCH v3 net-next 8/8] net: mvneta: add XDP_TX support Lorenzo Bianconi
2019-10-16 0:11 ` Jakub Kicinski
2019-10-16 10:09 ` Lorenzo Bianconi
2019-10-16 10:55 ` Ilias Apalodimas
2019-10-16 11:16 ` Jesper Dangaard Brouer
2019-10-16 12:00 ` Lorenzo Bianconi
2019-10-16 16:27 ` 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=20191015170353.1f4fbbbb@cakuba.netronome.com \
--to=jakub.kicinski@netronome$(echo .)com \
--cc=brouer@redhat$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=ilias.apalodimas@linaro$(echo .)org \
--cc=lorenzo.bianconi@redhat$(echo .)com \
--cc=lorenzo@kernel$(echo .)org \
--cc=matteo.croce@redhat$(echo .)com \
--cc=mw@semihalf$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
--cc=thomas.petazzoni@bootlin$(echo .)com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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