From: Guillaume Nault <gnault@redhat.com>
To: Hangbin Liu <liuhangbin@gmail.com>
Cc: netdev@vger.kernel.org, Petr Machata <pmachata@gmail.com>,
"David S . Miller" <davem@davemloft.net>,
Roopa Prabhu <roopa@cumulusnetworks.com>,
David Ahern <dsahern@kernel.org>,
Eelco Chaudron <echaudro@redhat.com>
Subject: Re: [PATCH net-next 2/2] vxlan: fix getting tos value from DSCP field
Date: Mon, 3 Aug 2020 11:30:39 +0200 [thread overview]
Message-ID: <20200803093039.GB3827@linux.home> (raw)
In-Reply-To: <20200803080217.391850-3-liuhangbin@gmail.com>
On Mon, Aug 03, 2020 at 04:02:17PM +0800, Hangbin Liu wrote:
> In commit 71130f29979c ("vxlan: fix tos value before xmit") we strict
> the vxlan tos value before xmit. But as IP tos field has been obsoleted
> by RFC2474, and updated by RFC3168 later. We should use new DSCP field,
> or we will lost the first 3 bits value when xmit.
>
Why sending this patch to net-next? Commit 71130f29979c ("vxlan: fix
tos value before xmit") broke setups where the high TOS bits were used.
This needs to be fixed in net (and probably pushed to -stable too).
> Fixes: 71130f29979c ("vxlan: fix tos value before xmit")
> Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
> ---
> drivers/net/vxlan.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c
> index 77658425db8a..fe051ed0f6db 100644
> --- a/drivers/net/vxlan.c
> +++ b/drivers/net/vxlan.c
> @@ -2722,7 +2722,7 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
> ndst = &rt->dst;
> skb_tunnel_check_pmtu(skb, ndst, VXLAN_HEADROOM);
>
> - tos = ip_tunnel_ecn_encap(RT_TOS(tos), old_iph, skb);
> + tos = ip_tunnel_ecn_encap(RT_DSCP(tos), old_iph, skb);
> ttl = ttl ? : ip4_dst_hoplimit(&rt->dst);
> err = vxlan_build_skb(skb, ndst, sizeof(struct iphdr),
> vni, md, flags, udp_sum);
> @@ -2762,7 +2762,7 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev,
>
> skb_tunnel_check_pmtu(skb, ndst, VXLAN6_HEADROOM);
>
> - tos = ip_tunnel_ecn_encap(RT_TOS(tos), old_iph, skb);
> + tos = ip_tunnel_ecn_encap(RT_DSCP(tos), old_iph, skb);
> ttl = ttl ? : ip6_dst_hoplimit(ndst);
> skb_scrub_packet(skb, xnet);
> err = vxlan_build_skb(skb, ndst, sizeof(struct ipv6hdr),
> --
> 2.25.4
>
next prev parent reply other threads:[~2020-08-03 9:30 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-03 8:02 [PATCH net-next 0/2] Add IP_DSCP_MASK and fix vxlan tos value before xmit Hangbin Liu
2020-08-03 8:02 ` [PATCH net-next 1/2] net: add IP_DSCP_MASK Hangbin Liu
2020-08-03 9:26 ` Guillaume Nault
2020-08-03 8:02 ` [PATCH net-next 2/2] vxlan: fix getting tos value from DSCP field Hangbin Liu
2020-08-03 9:30 ` Guillaume Nault [this message]
2020-08-04 1:43 ` [PATCHv2 net 0/2] Add IP_DSCP_MASK and fix vxlan tos value before xmit Hangbin Liu
2020-08-04 1:43 ` [PATCHv2 net 1/2] net: add IP_DSCP_MASK Hangbin Liu
2020-08-04 1:43 ` [PATCHv2 net 2/2] vxlan: fix getting tos value from DSCP field Hangbin Liu
2020-08-04 19:47 ` David Miller
2020-08-05 2:20 ` Hangbin Liu
2020-08-04 7:47 ` [PATCHv2 net 0/2] Add IP_DSCP_MASK and fix vxlan tos value before xmit Guillaume Nault
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=20200803093039.GB3827@linux.home \
--to=gnault@redhat.com \
--cc=davem@davemloft.net \
--cc=dsahern@kernel.org \
--cc=echaudro@redhat.com \
--cc=liuhangbin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pmachata@gmail.com \
--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).