From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Martin Varghese <martinvarghesenokia@gmail.com>
Cc: Willem de Bruijn <willemdebruijn.kernel@gmail.com>,
Network Development <netdev@vger.kernel.org>,
David Miller <davem@davemloft.net>,
Jonathan Corbet <corbet@lwn.net>,
Alexey Kuznetsov <kuznet@ms2.inr.ac.ru>,
Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>,
scott.drennan@nokia.com, Jiri Benc <jbenc@redhat.com>,
martin.varghese@nokia.com
Subject: Re: [PATCH net-next v7 1/2] net: UDP tunnel encapsulation module for tunnelling different protocols like MPLS,IP,NSH etc.
Date: Sun, 16 Feb 2020 21:19:24 -0800 [thread overview]
Message-ID: <CA+FuTSd=x3TDKjmtZZv3Hv1L=zMKSoSc4nt3wgcFhvJc-KB+tA@mail.gmail.com> (raw)
In-Reply-To: <20200217024943.GA11700@martin-VirtualBox>
> > > diff --git a/include/net/ipv6.h b/include/net/ipv6.h
> > > index cec1a54..1bf8065 100644
> > > --- a/include/net/ipv6.h
> > > +++ b/include/net/ipv6.h
> > > @@ -1027,6 +1027,12 @@ struct dst_entry *ip6_dst_lookup_flow(struct net *net, const struct sock *sk, st
> > > struct dst_entry *ip6_sk_dst_lookup_flow(struct sock *sk, struct flowi6 *fl6,
> > > const struct in6_addr *final_dst,
> > > bool connected);
> > > +struct dst_entry *ip6_dst_lookup_tunnel(struct sk_buff *skb,
> > > + struct net_device *dev,
> > > + struct net *net, struct socket *sock,
> > > + struct in6_addr *saddr,
> > > + const struct ip_tunnel_info *info,
> > > + u8 protocol, bool use_cache);
> > > struct dst_entry *ip6_blackhole_route(struct net *net,
> > > struct dst_entry *orig_dst);
> > >
> > > diff --git a/include/net/route.h b/include/net/route.h
> > > index a9c60fc..81750ae 100644
> > > --- a/include/net/route.h
> > > +++ b/include/net/route.h
> > > @@ -128,6 +128,12 @@ static inline struct rtable *__ip_route_output_key(struct net *net,
> > >
> > > struct rtable *ip_route_output_flow(struct net *, struct flowi4 *flp,
> > > const struct sock *sk);
> > > +struct rtable *ip_route_output_tunnel(struct sk_buff *skb,
> > > + struct net_device *dev,
> > > + struct net *net, __be32 *saddr,
> > > + const struct ip_tunnel_info *info,
> > > + u8 protocol, bool use_cache);
> > > +
> > > struct dst_entry *ipv4_blackhole_route(struct net *net,
> > > struct dst_entry *dst_orig);
> > >
> >
> > Ah, I now see where the difference between net/ipv4/route.c and
> > net/ipv6/ip6_output.c come from. It follows from existing locations of
> > ip6_sk_dst_lookup_flow and ip_route_output_flow.
> >
> > Looking for the ipv6 analog of ip_route_output_flow, I see that, e.g.,
> > ipvlan uses ip6_route_output from net/ipv6/route.c without a NULL sk.
> > But ping calls ip6_sk_dst_lookup_flow.
> >
> > It might be a better fit behind ip6_route_output_flags, but it's
> > probably moot, really.
>
> Actually i considered both the files but i felt this function
> should naturally sit with ip6_sk_dst_lookup_flow.
> If you dont have strong objection i would like to keep the
> function in ip6_output.c
Yes, sounds good, thanks. The difference stood out to me in an initial
git show --stat, but on closer reading both choices can be argued for.
next prev parent reply other threads:[~2020-02-17 5:20 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-02-15 6:19 [PATCH net-next v7 0/2] Bare UDP L3 Encapsulation Module Martin Varghese
2020-02-15 6:20 ` [PATCH net-next v7 1/2] net: UDP tunnel encapsulation module for tunnelling different protocols like MPLS,IP,NSH etc Martin Varghese
2020-02-16 16:58 ` Willem de Bruijn
2020-02-17 2:43 ` Martin Varghese
2020-02-17 5:16 ` Willem de Bruijn
2020-02-23 16:14 ` Martin Varghese
2020-02-24 2:19 ` Willem de Bruijn
2020-02-16 18:26 ` Willem de Bruijn
2020-02-17 2:49 ` Martin Varghese
2020-02-17 5:19 ` Willem de Bruijn [this message]
2020-02-15 6:20 ` [PATCH net-next v7 2/2] net: Special handling for IP & MPLS Martin Varghese
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='CA+FuTSd=x3TDKjmtZZv3Hv1L=zMKSoSc4nt3wgcFhvJc-KB+tA@mail.gmail.com' \
--to=willemdebruijn.kernel@gmail.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=jbenc@redhat.com \
--cc=kuznet@ms2.inr.ac.ru \
--cc=martin.varghese@nokia.com \
--cc=martinvarghesenokia@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=scott.drennan@nokia.com \
--cc=yoshfuji@linux-ipv6.org \
/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).