From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Alexander Lobakin <aleksander.lobakin@intel.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: Alexander Lobakin <aleksander.lobakin@intel.com>,
Lorenzo Bianconi <lorenzo@kernel.org>, Daniel Xu <dxu@dxuuu.xyz>,
Alexei Starovoitov <ast@kernel.org>,
Daniel Borkmann <daniel@iogearbox.net>,
Andrii Nakryiko <andrii@kernel.org>,
John Fastabend <john.fastabend@gmail.com>,
Jesper Dangaard Brouer <hawk@kernel.org>,
Martin KaFai Lau <martin.lau@linux.dev>,
netdev@vger.kernel.org, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v3 1/8] net: gro: decouple GRO from the NAPI layer
Date: Fri, 17 Jan 2025 13:43:36 +0100 [thread overview]
Message-ID: <87ikqdobk7.fsf@toke.dk> (raw)
In-Reply-To: <20250115151901.2063909-2-aleksander.lobakin@intel.com>
Alexander Lobakin <aleksander.lobakin@intel.com> writes:
> In fact, these two are not tied closely to each other. The only
> requirements to GRO are to use it in the BH context and have some
> sane limits on the packet batches, e.g. NAPI has a limit of its
> budget (64/8/etc.).
> Move purely GRO fields into a new tagged group, &gro_node. Embed it
> into &napi_struct and adjust all the references. napi_id doesn't
> really belong to GRO, but:
>
> 1. struct gro_node has a 4-byte padding at the end anyway. If you
> leave napi_id outside, struct napi_struct takes additional 8 bytes
> (u32 napi_id + another 4-byte padding).
> 2. gro_receive_skb() uses it to mark skbs. We don't want to split it
> into two functions or add an `if`, as this would be less efficient,
> but we need it to be NAPI-independent. The current approach doesn't
> change anything for NAPI-backed GROs; for standalone ones (which
> are less important currently), the embedded napi_id will be just
> zero => no-op.
>
> Three Ethernet drivers use napi_gro_flush() not really meant to be
> exported, so move it to <net/gro.h> and add that include there.
> napi_gro_receive() is used in more than 100 drivers, keep it
> in <linux/netdevice.h>.
> This does not make GRO ready to use outside of the NAPI context
> yet.
>
> Signed-off-by: Alexander Lobakin <aleksander.lobakin@intel.com>
> Tested-by: Daniel Xu <dxu@dxuuu.xyz>
Reviewed-by: Toke Høiland-Jørgensen <toke@redhat.com>
next prev parent reply other threads:[~2025-01-17 12:43 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-15 15:18 [PATCH net-next v3 0/8] bpf: cpumap: enable GRO for XDP_PASS frames Alexander Lobakin
2025-01-15 15:18 ` [PATCH net-next v3 1/8] net: gro: decouple GRO from the NAPI layer Alexander Lobakin
2025-01-17 1:11 ` Jakub Kicinski
2025-01-17 12:43 ` Toke Høiland-Jørgensen [this message]
2025-01-15 15:18 ` [PATCH net-next v3 2/8] net: gro: expose GRO init/cleanup to use outside of NAPI Alexander Lobakin
2025-01-17 1:14 ` Jakub Kicinski
2025-01-17 12:43 ` Toke Høiland-Jørgensen
2025-01-15 15:18 ` [PATCH net-next v3 3/8] bpf: cpumap: switch to GRO from netif_receive_skb_list() Alexander Lobakin
2025-01-15 17:52 ` Jesper Dangaard Brouer
2025-01-17 1:16 ` Jakub Kicinski
2025-01-17 12:45 ` Toke Høiland-Jørgensen
2025-01-15 15:18 ` [PATCH net-next v3 4/8] bpf: cpumap: reuse skb array instead of a linked list to chain skbs Alexander Lobakin
2025-01-17 12:53 ` Toke Høiland-Jørgensen
2025-01-15 15:18 ` [PATCH net-next v3 5/8] net: skbuff: introduce napi_skb_cache_get_bulk() Alexander Lobakin
2025-01-17 12:56 ` Toke Høiland-Jørgensen
2025-01-15 15:18 ` [PATCH net-next v3 6/8] bpf: cpumap: switch to napi_skb_cache_get_bulk() Alexander Lobakin
2025-01-17 12:58 ` Toke Høiland-Jørgensen
2025-01-15 15:19 ` [PATCH net-next v3 7/8] veth: use napi_skb_cache_get_bulk() instead of xdp_alloc_skb_bulk() Alexander Lobakin
2025-01-17 12:58 ` Toke Høiland-Jørgensen
2025-01-15 15:19 ` [PATCH net-next v3 8/8] xdp: remove xdp_alloc_skb_bulk() Alexander Lobakin
2025-01-17 12:58 ` Toke Høiland-Jørgensen
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=87ikqdobk7.fsf@toke.dk \
--to=toke@redhat.com \
--cc=aleksander.lobakin@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=dxu@dxuuu.xyz \
--cc=edumazet@google.com \
--cc=hawk@kernel.org \
--cc=john.fastabend@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lorenzo@kernel.org \
--cc=martin.lau@linux.dev \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.