All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefano Brivio <sbrivio@redhat.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: "David S. Miller" <davem@davemloft.net>,
	Sabrina Dubroca <sd@queasysnail.net>,
	Xin Long <lucien.xin@gmail.com>,
	netdev@vger.kernel.org
Subject: Re: [PATCH net-next 03/11] vxlan: Allow configuration of DF behaviour
Date: Wed, 7 Nov 2018 11:35:48 +0100	[thread overview]
Message-ID: <20181107113548.17ec930d@redhat.com> (raw)
In-Reply-To: <20181106210018.08f45eb0@shemminger-XPS-13-9360>

Stephen, thanks for reviewing this.

On Tue, 6 Nov 2018 21:00:18 -0800
Stephen Hemminger <stephen@networkplumber.org> wrote:

> On Tue,  6 Nov 2018 22:38:59 +0100
> Stefano Brivio <sbrivio@redhat.com> wrote:
> 
> > 			df = htons(IP_DF);
> >  		}
> >  
> > +		if (!df) {
> > +			if (vxlan->cfg.df == VXLAN_DF_SET) {
> > +				df = htons(IP_DF);  
> 
> I am confused, this looks like this new flag is duplicating the exiting tunnel DF flag.
> (in info->key.tun.flags). Why is another flag needed?

The reason is that for non-lwt tunnels the tunnel key is not used in
VXLAN, and this patch is intended for non-lwt tunnels only, as external
control planes already have a way to set the DF bit.

But now I see that the way I wrote this is misleading: this should
really be in an if (rdst) or if (!info) clause. I'll place this into
the if (!info) block just above. TTL and TOS are handled in a similar
way, using the if (rdst) clause above.

Functionally, it's equivalent, because external control planes will
never set non-default values for vxlan->cfg.df, but still not a good
reason to write it this way.

Similar story for GENEVE, I will place that under if
(!geneve->collect_md) instead.

With a notable difference, though: GENEVE already uses struct
ip_tunnel_key for some of its interface configuration, so I had already
thought about adding a TUNNEL_DONT_FRAGMENT_INHERIT flag that could be
used in tun_flags.

However, I would use the last available bit there, and this wouldn't be
terribly useful: an external control plane already has access to the
inner DF bit, and would most likely decide on its own whether to set DF
or not, by setting that in tun_flags. So I'd rather keep that in struct
geneve_dev.

-- 
Stefano

  reply	other threads:[~2018-11-07 20:05 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-06 21:38 [PATCH net-next 00/11] ICMP error handling for UDP tunnels Stefano Brivio
2018-11-06 21:38 ` [PATCH net-next 01/11] udp: Handle ICMP errors for tunnels with same destination port on both endpoints Stefano Brivio
2018-11-06 23:25   ` David Miller
2018-11-06 21:38 ` [PATCH net-next 02/11] vxlan: ICMP error lookup handler Stefano Brivio
2018-11-06 21:38 ` [PATCH net-next 03/11] vxlan: Allow configuration of DF behaviour Stefano Brivio
2018-11-07  5:00   ` Stephen Hemminger
2018-11-07 10:35     ` Stefano Brivio [this message]
2018-11-06 21:39 ` [PATCH net-next 04/11] selftests: pmtu: Introduce tests for IPv4/IPv6 over VxLAN over IPv6 Stefano Brivio
2018-11-07 19:28   ` David Ahern
2018-11-07 19:48     ` David Miller
2018-11-07 19:54     ` Stefano Brivio
2018-11-06 21:39 ` [PATCH net-next 05/11] geneve: ICMP error lookup handler Stefano Brivio
2018-11-06 21:39 ` [PATCH net-next 06/11] geneve: Allow configuration of DF behaviour Stefano Brivio
2018-11-06 21:39 ` [PATCH net-next 07/11] selftests: pmtu: Introduce tests for IPv4/IPv6 over GENEVE over IPv6 Stefano Brivio
2018-11-07 19:28   ` David Ahern
2018-11-06 21:39 ` [PATCH net-next 08/11] net: Convert protocol error handlers from void to int Stefano Brivio
2018-11-06 21:39 ` [PATCH net-next 09/11] udp: Support for error handlers of tunnels with arbitrary destination port Stefano Brivio
2018-11-06 23:26   ` David Miller
2018-11-06 21:39 ` [PATCH net-next 10/11] fou, fou6: ICMP error handlers for FoU and GUE Stefano Brivio
2018-11-06 21:39 ` [PATCH net-next 11/11] selftests: pmtu: Introduce FoU and GUE PMTU exceptions tests Stefano Brivio
2018-11-06 23:24 ` [PATCH net-next 00/11] ICMP error handling for UDP tunnels David Miller
2018-11-07 11:09 ` Jiri Benc
2018-11-07 15:21   ` Stefano Brivio

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=20181107113548.17ec930d@redhat.com \
    --to=sbrivio@redhat.com \
    --cc=davem@davemloft.net \
    --cc=lucien.xin@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=sd@queasysnail.net \
    --cc=stephen@networkplumber.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 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.