mbox series

[net-next,v3,0/4] seg6: add support for SRv6 Headend Reduced Encapsulation

Message ID 20220628113642.3223-1-andrea.mayer@uniroma2.it (mailing list archive)
Headers show
Series seg6: add support for SRv6 Headend Reduced Encapsulation | expand

Message

Andrea Mayer June 28, 2022, 11:36 a.m. UTC
This patchset adds support for SRv6 Headend behavior with Reduced
Encapsulation. It introduces the H.Encaps.Red and H.L2Encaps.Red versions
of the SRv6 H.Encaps and H.L2Encaps behaviors, according to RFC 8986 [1].

In details, the patchset is made of:
 - patch 1/4: add support for SRv6 H.Encaps.Red behavior;
 - Patch 2/4: add support for SRv6 H.L2Encaps.Red behavior;
 - patch 2/4: add selftest for SRv6 H.Encaps.Red behavior;
 - patch 3/4: add selftest for SRv6 H.L2Encaps.Red behavior.

The corresponding iproute2 patch for supporting SRv6 H.Encaps.Red and
H.L2Encaps.Red behaviors is provided in a separated patchset.

[1] - https://datatracker.ietf.org/doc/html/rfc8986

v2 -> v3:
 - Keep SRH when HMAC TLV is present;

 - Split the support for H.Encaps.Red and H.L2Encaps.Red behaviors in two
   patches (respectively, patch 1/4 and patch 2/4);

 - Add selftests for SRv6 H.Encaps.Red and H.L2Encaps.Red.

v1 -> v2:
 - Fixed sparse warnings;

 - memset now uses sizeof() instead of hardcoded value;

 - Removed EXPORT_SYMBOL_GPL.

Andrea Mayer (4):
  seg6: add support for SRv6 H.Encaps.Red behavior
  seg6: add support for SRv6 H.L2Encaps.Red behavior
  selftests: seg6: add selftest for SRv6 H.Encaps.Red behavior
  selftests: seg6: add selftest for SRv6 H.L2Encaps.Red behavior

 include/uapi/linux/seg6_iptunnel.h            |   2 +
 net/ipv6/seg6_iptunnel.c                      | 138 +++-
 .../net/srv6_hencap_red_l3vpn_test.sh         | 742 ++++++++++++++++++
 .../net/srv6_hl2encap_red_l2vpn_test.sh       | 674 ++++++++++++++++
 4 files changed, 1554 insertions(+), 2 deletions(-)
 create mode 100755 tools/testing/selftests/net/srv6_hencap_red_l3vpn_test.sh
 create mode 100755 tools/testing/selftests/net/srv6_hl2encap_red_l2vpn_test.sh

Comments

Jakub Kicinski June 29, 2022, 5:10 a.m. UTC | #1
On Tue, 28 Jun 2022 13:36:38 +0200 Andrea Mayer wrote:
>  - patch 2/4: add selftest for SRv6 H.Encaps.Red behavior;
>  - patch 3/4: add selftest for SRv6 H.L2Encaps.Red behavior.

Always great to see selftests. Should they be added to the Makefile?
Otherwise they won't run unless someone manually executes them.
Andrea Mayer June 29, 2022, 11:25 a.m. UTC | #2
Hi Jakub,
please see below, thanks.

On Tue, 28 Jun 2022 22:10:56 -0700
Jakub Kicinski <kuba@kernel.org> wrote:

> On Tue, 28 Jun 2022 13:36:38 +0200 Andrea Mayer wrote:
> >  - patch 2/4: add selftest for SRv6 H.Encaps.Red behavior;
> >  - patch 3/4: add selftest for SRv6 H.L2Encaps.Red behavior.
> 
> Always great to see selftests. Should they be added to the Makefile?
> Otherwise they won't run unless someone manually executes them.

Yes, you are absolutely right. I will send a v4 with the correction shortly.

Andrea