[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CALx6S36wkNaWhHhgkTs12Zphm+u6OZjWucrUkByYxBZA2aGE+w@mail.gmail.com>
Date: Sat, 14 Dec 2019 10:47:17 -0800
From: Tom Herbert <tom@...bertland.com>
To: Simon Horman <simon.horman@...ronome.com>
Cc: "David S. Miller" <davem@...emloft.net>,
Linux Kernel Network Developers <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 Sun, Oct 6, 2019 at 6:00 AM Simon Horman <simon.horman@...ronome.com> wrote:
>
> 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.
>
It anticipates other uses cases of extension headers, in particular
IPv4 extension headers
(https://tools.ietf.org/html/draft-herbert-ipv4-hbh-destopt-00)
> 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