[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20191006130030.rv4tjcu2qkk7baf6@netronome.com>
Date: Sun, 6 Oct 2019 15:00:32 +0200
From: Simon Horman <simon.horman@...ronome.com>
To: Tom Herbert <tom@...bertland.com>
Cc: davem@...emloft.net, netdev@...r.kernel.org,
Tom Herbert <tom@...ntonium.net>
Subject: Re: [PATCH v5 net-next 2/7] ipeh: Move generic EH functions to
exthdrs_common.c
On Thu, Oct 03, 2019 at 02:57:59PM -0700, Tom Herbert wrote:
> From: Tom Herbert <tom@...ntonium.net>
>
> Move generic functions in exthdrs.c to new exthdrs_common.c so that
> exthdrs.c only contains functions that are specific to IPv6 processing,
> and exthdrs_common.c contains functions that are generic. These
> functions include those that will be used with IPv4 extension headers.
> Generic extension header related functions are prefixed by ipeh_.
>
> Signed-off-by: Tom Herbert <tom@...bertland.com>
...
> diff --git a/net/dccp/ipv6.c b/net/dccp/ipv6.c
> index 25aab67..b8843c1 100644
> --- a/net/dccp/ipv6.c
> +++ b/net/dccp/ipv6.c
> @@ -515,7 +515,7 @@ static struct sock *dccp_v6_request_recv_sock(const struct sock *sk,
> if (!opt)
> opt = rcu_dereference(np->opt);
> if (opt) {
> - opt = ipv6_dup_options(newsk, opt);
> + opt = ipeh_dup_options(newsk, opt);
> RCU_INIT_POINTER(newnp->opt, opt);
> }
> inet_csk(newsk)->icsk_ext_hdr_len = 0;
> diff --git a/net/ipv6/Kconfig b/net/ipv6/Kconfig
> index ae1344e..700fcea 100644
> --- a/net/ipv6/Kconfig
> +++ b/net/ipv6/Kconfig
> @@ -3,9 +3,13 @@
> # IPv6 configuration
> #
>
> +config EXTHDRS
> + bool
> +
> # IPv6 as module will cause a CRASH if you try to unload it
> menuconfig IPV6
> tristate "The IPv6 protocol"
> + select EXTHDRS
> default y
> ---help---
> Support for IP version 6 (IPv6).
Hi Tom,
could you expand on the motivation for this new Kconfig symbol.
It seems that at this time exthdrs_common.o could simply depend on IPV6.
Otherwise this patch seems fine to me.
> diff --git a/net/ipv6/Makefile b/net/ipv6/Makefile
> index df3919b..0bcab81 100644
> --- a/net/ipv6/Makefile
> +++ b/net/ipv6/Makefile
> @@ -44,6 +44,7 @@ obj-$(CONFIG_IPV6_SIT) += sit.o
> obj-$(CONFIG_IPV6_TUNNEL) += ip6_tunnel.o
> obj-$(CONFIG_IPV6_GRE) += ip6_gre.o
> obj-$(CONFIG_IPV6_FOU) += fou6.o
> +obj-$(CONFIG_EXTHDRS) += exthdrs_common.o
>
> obj-y += addrconf_core.o exthdrs_core.o ip6_checksum.o ip6_icmp.o
> obj-$(CONFIG_INET) += output_core.o protocol.o $(ipv6-offload)
...
Powered by blists - more mailing lists