Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp1681582rdg; Sat, 12 Aug 2023 11:20:41 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHJg7TmHzBJjEn57UMqvzFnzEz3VP5fYAzkrRYajgkduWJkUUxH7VvsLRDMTGGjJF6vqCLR X-Received: by 2002:a05:6a21:6d88:b0:140:48d4:8199 with SMTP id wl8-20020a056a216d8800b0014048d48199mr5349019pzb.24.1691864440670; Sat, 12 Aug 2023 11:20:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691864440; cv=none; d=google.com; s=arc-20160816; b=cIVoWCHNW9Z9q+j5U2zJZjCl3PAD8BOcZkzu1CjCCT7rFTbMctbdeQE7yNBbokZV+g PhI3g56eFVC7dkTUJKAGEvJyyFqZ//kVoTpe5JVEZY/pQNiNMJODu+l2uregY9+0xHvp wLIwzT1bstfeLsWjDAGAHuxuzsFcBU6EtFj2OPCYjaeN7bV945molHWdLrFwmV5a5iZO He6TPwzwkD/foLrQkwQR+gcav5SWpYSQ7w0AIPAondKlv0SwGfODzXcIuRLGTx9ZM4NH n/a9KCupW2GKZPxpqpqS6Xfip+rYjc0LzODnYjwjzyZ/xd3S9glAFSqQIpXaTsryni97 rqrQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=7qgLKqr14zHm12oIB/niDTm/bLiCdJZUprwQIV7VUOY=; fh=gXBtgxK+TVgbTEWn3KR1PBLviwdQbbcA0VBv0gQXY2M=; b=WFmZYoGfOJeLSZRO6mjS1ZiLfrTmushvz3t8TYG1QOvdaoJGCrfFOgppD3wnkAcRar 1z8pb3TRb17LiDBlIDUcA10mhZmGTPk+RTdbMssMUA5jCODf0HbMIu2Cfr/+6sm1sQOq BBr0DyV3fGojb6DUI6CPirFJG2jRA/V1poDnD4FznXNfdP4a++mjalRJIvTpcS65rqjV Y4s42X80yqCndhMsmNk+z8cn6yjJZ8CEZH3wjFxG/+z6M0nY8GkQrjY4/DE8NZFFETkh t0VJr3JkXbANOt/QetR0+X2Kqet18sYnTJBPALdap3YiBuNGMnZFA8XUbO/FilQACwLN 4tcA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=uniroma2.it Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s128-20020a637786000000b00563ef545828si5432722pgc.8.2023.08.12.11.20.29; Sat, 12 Aug 2023 11:20:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=uniroma2.it Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229626AbjHLSKX (ORCPT + 99 others); Sat, 12 Aug 2023 14:10:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229446AbjHLSKW (ORCPT ); Sat, 12 Aug 2023 14:10:22 -0400 Received: from smtp.uniroma2.it (smtp.uniroma2.it [160.80.6.23]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F5D91704; Sat, 12 Aug 2023 11:10:23 -0700 (PDT) Received: from localhost.localdomain ([160.80.103.126]) by smtp-2015.uniroma2.it (8.14.4/8.14.4/Debian-8) with ESMTP id 37CI9v8r016225 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Sat, 12 Aug 2023 20:09:57 +0200 From: Andrea Mayer To: "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , David Ahern , Shuah Khan , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-kselftest@vger.kernel.org Cc: Stefano Salsano , Paolo Lungaroni , Ahmed Abdelsalam , Hangbin Liu , Andrea Mayer Subject: [net-next v2 0/2] seg6: add NEXT-C-SID support for SRv6 End.X behavior Date: Sat, 12 Aug 2023 20:09:24 +0200 Message-Id: <20230812180926.16689-1-andrea.mayer@uniroma2.it> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Virus-Scanned: clamav-milter 0.100.0 at smtp-2015 X-Virus-Status: Clean X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org In the Segment Routing (SR) architecture a list of instructions, called segments, can be added to the packet headers to influence the forwarding and processing of the packets in an SR enabled network. Considering the Segment Routing over IPv6 data plane (SRv6) [1], the segment identifiers (SIDs) are IPv6 addresses (128 bits) and the segment list (SID List) is carried in the Segment Routing Header (SRH). A segment may correspond to a "behavior" that is executed by a node when the packet is received. The Linux kernel currently supports a large subset of the behaviors described in [2] (e.g., End, End.X, End.T and so on). In some SRv6 scenarios, the number of segments carried by the SID List may increase dramatically, reducing the MTU (Maximum Transfer Unit) size and/or limiting the processing power of legacy hardware devices (due to longer IPv6 headers). The NEXT-C-SID mechanism [3] extends the SRv6 architecture by providing several ways to efficiently represent the SID List. By leveraging the NEXT-C-SID, it is possible to encode several SRv6 segments within a single 128 bit SID address (also referenced as Compressed SID Container). In this way, the length of the SID List can be drastically reduced. The NEXT-C-SID mechanism is built upon the "flavors" framework defined in [2]. This framework is already supported by the Linux SRv6 subsystem and is used to modify and/or extend a subset of existing behaviors. In this patchset, we extend the SRv6 End.X behavior in order to support the NEXT-C-SID mechanism. In details, the patchset is made of: - patch 1/2: add NEXT-C-SID support for SRv6 End.X behavior; - patch 2/2: add selftest for NEXT-C-SID in SRv6 End.X behavior. From the user space perspective, we do not need to change the iproute2 code to support the NEXT-C-SID flavor for the SRv6 End.X behavior. However, we will update the man page considering the NEXT-C-SID flavor applied to the SRv6 End.X behavior in a separate patch. Comments, improvements and suggestions are always appreciated. Thank you all, Andrea [1] - https://datatracker.ietf.org/doc/html/rfc8754 [2] - https://datatracker.ietf.org/doc/html/rfc8986 [3] - https://datatracker.ietf.org/doc/html/draft-ietf-spring-srv6-srh-compression v1 -> v2: - Fix author tags in the commit message in patch 2/2, thanks to Paolo Abeni; - Remove unnecessary supp_ops == 0 check in patch 1/2, thanks to Hangbin Liu; - Fix 'is it possible' -> 'it is possible' in cover letter, thanks to Hangbin Liu. Andrea Mayer (1): seg6: add NEXT-C-SID support for SRv6 End.X behavior Paolo Lungaroni (1): selftests: seg6: add selftest for NEXT-C-SID flavor in SRv6 End.X behavior net/ipv6/seg6_local.c | 108 +- tools/testing/selftests/net/Makefile | 1 + .../net/srv6_end_x_next_csid_l3vpn_test.sh | 1213 +++++++++++++++++ 3 files changed, 1302 insertions(+), 20 deletions(-) create mode 100755 tools/testing/selftests/net/srv6_end_x_next_csid_l3vpn_test.sh -- 2.20.1