From: Ahmed Abdelsalam <ahabdels@gmail.com>
To: David Miller <davem@davemloft.net>
Cc: kuznet@ms2.inr.ac.ru, yoshfuji@linux-ipv6.org,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
andrea.mayer@uniroma2.it
Subject: Re: [PATCH] seg6: using DSCP of inner IPv4 packets
Date: Thu, 6 Aug 2020 08:43:06 +0200 [thread overview]
Message-ID: <7f8b1def-0a65-d2a4-577e-5f928cee0617@gmail.com> (raw)
In-Reply-To: <20200805.174049.1470539179902962793.davem@davemloft.net>
Hi David,
SRv6 as defined in [1][2] does not mandate that the hop_limit of the
outer IPv6 header has to be copied from the inner packet.
The only thing that is mandatory is that the hop_limit of the inner
packet has to be decremented [3]. This complies with the specification
defined in the Generic Packet Tunneling in IPv6 [4]. This part is
actually missing in the kernel.
For the hop_limit of the outer IPv6 header, the other SRv6
implementations [5][6] by default uses the default ipv6 hop_limit. But
they allow also to use a configurable hop_limit for the outer header.
In conclusion the hop limit behavior in this patch is intentional and in
my opnion correct.
If you agree I can send two patches to:
- decrement hop_limit of inner packet
- allow a configurable hop limit of outer IPv6 header
[1] https://tools.ietf.org/html/rfc8754
[2]
https://tools.ietf.org/html/draft-ietf-spring-srv6-network-programming-16
[3]
https://tools.ietf.org/html/draft-ietf-spring-srv6-network-programming-16#section-5
[4] https://tools.ietf.org/html/rfc2473#section-3.1
[5]https://github.com/FDio/vpp/blob/8bf80a3ddae7733925a757cb1710e25776eea01c/src/vnet/srv6/sr_policy_rewrite.c#L110
[6]
https://www.cisco.com/c/en/us/td/docs/routers/asr9000/software/asr9k-r6-6/segment-routing/configuration/guide/b-segment-routing-cg-asr9000-66x/b-segment-routing-cg-asr9000-66x_chapter_011.html#id_94209
On 06/08/2020 02:40, David Miller wrote:
> From: Ahmed Abdelsalam <ahabdels@gmail.com>
> Date: Tue, 4 Aug 2020 07:40:30 +0000
>
>> This patch allows copying the DSCP from inner IPv4 header to the
>> outer IPv6 header, when doing SRv6 Encapsulation.
>>
>> This allows forwarding packet across the SRv6 fabric based on their
>> original traffic class.
>>
>> Signed-off-by: Ahmed Abdelsalam <ahabdels@gmail.com>
>
> You have changed the hop limit behavior here and that neither seems
> intentional nor correct.
>
> When encapsulating ipv6 inside of ipv6 the inner hop limit should be
> inherited. You should only use the DST hop limit when encapsulating
> ipv4.
>
> And that's what the existing code did.
>
next prev parent reply other threads:[~2020-08-06 11:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-04 7:40 [PATCH] seg6: using DSCP of inner IPv4 packets Ahmed Abdelsalam
2020-08-04 20:08 ` David Miller
2020-08-06 0:40 ` David Miller
2020-08-06 6:43 ` Ahmed Abdelsalam [this message]
2020-08-08 0:43 ` David Miller
2020-08-15 9:47 ` Ahmed Abdelsalam
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=7f8b1def-0a65-d2a4-577e-5f928cee0617@gmail.com \
--to=ahabdels@gmail.com \
--cc=andrea.mayer@uniroma2.it \
--cc=davem@davemloft.net \
--cc=kuznet@ms2.inr.ac.ru \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--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).