netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: David Ahern <dsahern@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Florian Westphal <fw@strlen.de>,
	Aaron Conole <aconole@redhat.com>,
	Numan Siddique <nusiddiq@redhat.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Pravin B Shelar <pshelar@ovn.org>,
	Roopa Prabhu <roopa@cumulusnetworks.com>,
	Nikolay Aleksandrov <nikolay@cumulusnetworks.com>,
	Lourdes Pedrajas <lu@pplo.net>,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next 2/6] tunnels: PMTU discovery support for directly bridged IP packets
Date: Tue, 4 Aug 2020 07:53:14 +0200	[thread overview]
Message-ID: <20200804075314.3a45558d@elisabeth> (raw)
In-Reply-To: <b6978999-4f05-5e87-2964-bec444221cf5@gmail.com>

On Mon, 3 Aug 2020 17:44:16 -0600
David Ahern <dsahern@gmail.com> wrote:

> On 8/3/20 2:52 PM, Stefano Brivio wrote:
> > @@ -461,6 +464,91 @@ static inline void iptunnel_xmit_stats(struct net_device *dev, int pkt_len)
> > [...]
> >
> > +static inline int skb_tunnel_check_pmtu(struct sk_buff *skb,
> > +					struct dst_entry *encap_dst,
> > +					int headroom, bool reply)  
> 
> Given its size, this is probably better as a function. I believe it can
> go into net/ipv4/ip_tunnel_core.c like you have iptunnel_pmtud_build_icmp.

Right, moved in v2.

> > [...]
> > +	if (skb->protocol == htons(ETH_P_IP) && mtu > 576) {  
> 
> I am surprised the 576 does not have an existing macro.

I guess that comes from how RFC 791 picks this "512 plus something
reasonable" value. I'll think of a name and propose as a later patch,
it's used in a number of places.

> > [...]
> > +		return iptunnel_pmtud_build_icmp(skb, mtu);
> > +	}
> > +#endif  
> 
> separate v4 and v6 code into helpers based on skb->protocol; the mtu
> check then becomes part of the version specific helpers.

Done.

> > +EXPORT_SYMBOL(iptunnel_pmtud_build_icmp);  
> 
> I think separate v4 and v6 versions would be more readable; the
> duplication is mostly skb manipulation.

Yes, way more readable, changed in v2.

-- 
Stefano


  reply	other threads:[~2020-08-04  5:53 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-03 20:52 [PATCH net-next 0/6] Support PMTU discovery with bridged UDP tunnels Stefano Brivio
2020-08-03 20:52 ` [PATCH net-next 1/6] ipv4: route: Ignore output interface in FIB lookup for PMTU route Stefano Brivio
2020-08-03 23:30   ` David Ahern
2020-08-04  5:52     ` Stefano Brivio
2020-08-03 20:52 ` [PATCH net-next 2/6] tunnels: PMTU discovery support for directly bridged IP packets Stefano Brivio
2020-08-03 23:44   ` David Ahern
2020-08-04  5:53     ` Stefano Brivio [this message]
2020-08-03 20:52 ` [PATCH net-next 3/6] vxlan: Support for PMTU discovery on directly bridged links Stefano Brivio
2020-08-03 23:48   ` David Ahern
2020-08-04  5:53     ` Stefano Brivio
2020-08-03 20:52 ` [PATCH net-next 4/6] geneve: " Stefano Brivio
2020-08-03 20:52 ` [PATCH net-next 5/6] selftests: pmtu.sh: Add tests for bridged UDP tunnels Stefano Brivio
2020-08-03 20:52 ` [PATCH net-next 6/6] selftests: pmtu.sh: Add tests for UDP tunnels handled by Open vSwitch Stefano Brivio
2020-08-03 23:28 ` [PATCH net-next 0/6] Support PMTU discovery with bridged UDP tunnels Florian Westphal
2020-08-03 23:46   ` David Ahern
2020-08-04  1:25 ` David Miller

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=20200804075314.3a45558d@elisabeth \
    --to=sbrivio@redhat.com \
    --cc=aconole@redhat.com \
    --cc=davem@davemloft.net \
    --cc=dsahern@gmail.com \
    --cc=fw@strlen.de \
    --cc=kuba@kernel.org \
    --cc=lu@pplo.net \
    --cc=netdev@vger.kernel.org \
    --cc=nikolay@cumulusnetworks.com \
    --cc=nusiddiq@redhat.com \
    --cc=pshelar@ovn.org \
    --cc=roopa@cumulusnetworks.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).