From: Kuniyuki Iwashima <kuniyu@amazon.com>
To: <pabeni@redhat.com>
Cc: <davem@davemloft.net>, <dsahern@kernel.org>,
<edumazet@google.com>, <horms@kernel.org>, <kuba@kernel.org>,
<kuniyu@amazon.com>, <netdev@vger.kernel.org>,
<willemdebruijn.kernel@gmail.com>
Subject: Re: [PATCH v3 net-next 2/2] udp_tunnel: use static call for GRO hooks when possible
Date: Mon, 10 Mar 2025 22:49:41 -0700 [thread overview]
Message-ID: <20250311054957.81048-1-kuniyu@amazon.com> (raw)
In-Reply-To: <b65c13770225f4a655657373f5ad90bcef3f57c9.1741632298.git.pabeni@redhat.com>
From: Paolo Abeni <pabeni@redhat.com>
Date: Mon, 10 Mar 2025 20:09:49 +0100
> diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c
> index 054d4d4a8927f..500b2a20053cd 100644
> --- a/net/ipv4/udp_offload.c
> +++ b/net/ipv4/udp_offload.c
> @@ -15,6 +15,39 @@
> #include <net/udp_tunnel.h>
>
> #if IS_ENABLED(CONFIG_NET_UDP_TUNNEL)
> +
> +/*
> + * Dummy GRO tunnel callback; should never be invoked, exists
> + * mainly to avoid dangling/NULL values for the udp tunnel
> + * static call.
> + */
> +static struct sk_buff *dummy_gro_rcv(struct sock *sk,
> + struct list_head *head,
> + struct sk_buff *skb)
> +{
> + WARN_ON_ONCE(1);
> + NAPI_GRO_CB(skb)->flush = 1;
> + return NULL;
> +}
> +
> +typedef struct sk_buff *(*udp_tunnel_gro_rcv_t)(struct sock *sk,
> + struct list_head *head,
> + struct sk_buff *skb);
> +
> +struct udp_tunnel_type_entry {
> + udp_tunnel_gro_rcv_t gro_receive;
> + refcount_t count;
> +};
> +
> +#define UDP_MAX_TUNNEL_TYPES (IS_ENABLED(CONFIG_GENEVE) + \
> + IS_ENABLED(CONFIG_VXLAN) * 2 + \
> + IS_ENABLED(CONFIG_FOE) * 2)
I guess this is CONFIG_NET_FOU ?
prev parent reply other threads:[~2025-03-11 5:50 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-03-10 19:09 [PATCH v3 net-next 0/2] udp_tunnel: GRO optimizations Paolo Abeni
2025-03-10 19:09 ` [PATCH v3 net-next 1/2] udp_tunnel: create a fastpath GRO lookup Paolo Abeni
2025-03-11 2:32 ` Willem de Bruijn
2025-03-11 16:38 ` Paolo Abeni
2025-03-11 17:29 ` Willem de Bruijn
2025-03-11 17:37 ` Paolo Abeni
2025-03-11 17:55 ` Willem de Bruijn
2025-03-10 19:09 ` [PATCH v3 net-next 2/2] udp_tunnel: use static call for GRO hooks when possible Paolo Abeni
2025-03-11 2:51 ` Willem de Bruijn
2025-03-11 17:24 ` Paolo Abeni
2025-03-11 17:30 ` Willem de Bruijn
2025-03-11 5:49 ` Kuniyuki Iwashima [this message]
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=20250311054957.81048-1-kuniyu@amazon.com \
--to=kuniyu@amazon.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=willemdebruijn.kernel@gmail.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 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).