All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mateusz Polchlopek <mateusz.polchlopek@intel.com>
To: Eric Dumazet <edumazet@google.com>,
	"David S . Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>
Cc: <netdev@vger.kernel.org>, Simon Horman <horms@kernel.org>,
	"Willem de Bruijn" <willemb@google.com>,
	Sabrina Dubroca <sd@queasysnail.net>,
	"Neal Cardwell" <ncardwell@google.com>,
	Kuniyuki Iwashima <kuniyu@amazon.com>, <eric.dumazet@gmail.com>
Subject: Re: [PATCH v2 net-next 1/4] net: introduce EXPORT_IPV6_MOD() and EXPORT_IPV6_MOD_GPL()
Date: Thu, 13 Feb 2025 08:26:22 +0100	[thread overview]
Message-ID: <8baf9307-daaa-4e0d-b89a-21403019ab2b@intel.com> (raw)
In-Reply-To: <20250212132418.1524422-2-edumazet@google.com>



On 2/12/2025 2:24 PM, Eric Dumazet wrote:
> We have many EXPORT_SYMBOL(x) in networking tree because IPv6
> can be built as a module.
> 
> CONFIG_IPV6=y is becoming the norm.
> 
> Define a EXPORT_IPV6_MOD(x) which only exports x
> for modular IPv6.
> 
> Same principle applies to EXPORT_IPV6_MOD_GPL()
> 
> Signed-off-by: Eric Dumazet <edumazet@google.com>
> ---
>   include/net/ip.h | 8 ++++++++
>   1 file changed, 8 insertions(+)
> 
> diff --git a/include/net/ip.h b/include/net/ip.h
> index 9f5e33e371fcdd8ea88c54584b8d4b6c50e7d0c9..1e40c5ac53a74e1c20157709e49edf2271e44fe3 100644
> --- a/include/net/ip.h
> +++ b/include/net/ip.h
> @@ -666,6 +666,14 @@ static inline void ip_ipgre_mc_map(__be32 naddr, const unsigned char *broadcast,
>   		memcpy(buf, &naddr, sizeof(naddr));
>   }
>   
> +#if IS_MODULE(CONFIG_IPV6)
> +#define EXPORT_IPV6_MOD(X) EXPORT_SYMBOL(X)
> +#define EXPORT_IPV6_MOD_GPL(X) EXPORT_SYMBOL_GPL(X)
> +#else
> +#define EXPORT_IPV6_MOD(X)
> +#define EXPORT_IPV6_MOD_GPL(X)
> +#endif
> +
>   #if IS_ENABLED(CONFIG_IPV6)
>   #include <linux/ipv6.h>
>   #endif

Reviewed-by: Mateusz Polchlopek <mateusz.polchlopek@intel.com>

  parent reply	other threads:[~2025-02-13  7:27 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-12 13:24 [PATCH v2 net-next 0/4] net: add EXPORT_IPV6_MOD() Eric Dumazet
2025-02-12 13:24 ` [PATCH v2 net-next 1/4] net: introduce EXPORT_IPV6_MOD() and EXPORT_IPV6_MOD_GPL() Eric Dumazet
2025-02-13  3:51   ` Kuniyuki Iwashima
2025-02-13  7:26   ` Mateusz Polchlopek [this message]
2025-02-12 13:24 ` [PATCH v2 net-next 2/4] inetpeer: use EXPORT_IPV6_MOD[_GPL]() Eric Dumazet
2025-02-13  3:53   ` Kuniyuki Iwashima
2025-02-13  7:26   ` Mateusz Polchlopek
2025-02-12 13:24 ` [PATCH v2 net-next 3/4] tcp: " Eric Dumazet
2025-02-13  4:20   ` Kuniyuki Iwashima
2025-02-13  7:27   ` Mateusz Polchlopek
2025-02-12 13:24 ` [PATCH v2 net-next 4/4] udp: " Eric Dumazet
2025-02-12 17:11   ` Willem de Bruijn
2025-02-13  7:28   ` Mateusz Polchlopek
2025-02-14 21:30 ` [PATCH v2 net-next 0/4] net: add EXPORT_IPV6_MOD() patchwork-bot+netdevbpf

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=8baf9307-daaa-4e0d-b89a-21403019ab2b@intel.com \
    --to=mateusz.polchlopek@intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=eric.dumazet@gmail.com \
    --cc=horms@kernel.org \
    --cc=kuba@kernel.org \
    --cc=kuniyu@amazon.com \
    --cc=ncardwell@google.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sd@queasysnail.net \
    --cc=willemb@google.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.