Received: by 2002:a05:6358:c692:b0:131:369:b2a3 with SMTP id fe18csp4748925rwb; Mon, 31 Jul 2023 11:31:21 -0700 (PDT) X-Google-Smtp-Source: APBJJlHrOd6iMsujU1YW+Hu+AaiHBxVvKjBt8ZQH248Ga8mrht0sP9O7sQOSj7l5n7BpXr9so5mx X-Received: by 2002:a17:906:3152:b0:974:55ea:1ad8 with SMTP id e18-20020a170906315200b0097455ea1ad8mr462426eje.63.1690828280996; Mon, 31 Jul 2023 11:31:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1690828280; cv=none; d=google.com; s=arc-20160816; b=ZAi5q+c1Y5j3ujtX8MtYSK2aDW9xO0yWVmJDBm7dQvIaXUHfaa1HchuRt9ZygPb2AD HIh0neuNh39FKpOc82yViA6GcEm36+9IY6mOr4we530VSRSAuGt2lK79aI8qZDSHhiVu /kxVE5IBiRh1AGY2UhmC13oZlIbIlOnTvFC7AO8AGKeVO4noyvc6RYROdxUkjfH+fM6e lz3klJkB7ek4SzPq24HnSRTmtIK9cOPJR3CRtNXiOjkHzDrICvx2vCvPqAcuStP/pexU SlkIheyFQeoEs7CXLq9nTA84CvydH9SXBlMPkQRe+ZwT+qQtjbYeBkFARPh7wph+DYpw eFsQ== 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=16zVxKBIwUuP9g5S+m71auP9K1+DiHuvza6WKsV4wKY=; fh=gXBtgxK+TVgbTEWn3KR1PBLviwdQbbcA0VBv0gQXY2M=; b=CMSShETG9DNHOJY2EDEdqh0/DC2BxuJRYyKYzz/gJXQPNg1HUfAhhF87fPEyEKHnIa 8huMBor1RYsCu1CW6/yt9IwUaFx11fzf7WJYURky3lcDps8PiI8GOBNN68fTSGWzMQ+F DmWMlyl12xrGGLF+8+C+aT92eHVja+6FsW+Ir4ZxX10V8+6l9qBVnOoswv1qtl2nyjVk YDbC8n09tA7fs3I4xcOsorz9MQZFOqhnubYxhaxEaMaN5+HbK4dvJ0AADHChh8EtZU9u R53Vf632UI244DOU0dKm4dxTufIHQuu4VYZr2d5XCbaGygSmBdrP1VO4nmDUKdmn2uYC wOQg== 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 gl23-20020a170906e0d700b00992437c5881si3835566ejb.198.2023.07.31.11.30.56; Mon, 31 Jul 2023 11:31:20 -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 S230020AbjGaR6y (ORCPT + 99 others); Mon, 31 Jul 2023 13:58:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37328 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229604AbjGaR6x (ORCPT ); Mon, 31 Jul 2023 13:58:53 -0400 X-Greylist: delayed 402 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Mon, 31 Jul 2023 10:58:50 PDT Received: from smtp.uniroma2.it (smtp.uniroma2.it [160.80.6.23]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E06BE4E; Mon, 31 Jul 2023 10:58:50 -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 36VHpZNe005077 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NOT); Mon, 31 Jul 2023 19:51:36 +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 0/2] seg6: add NEXT-C-SID support for SRv6 End.X behavior Date: Mon, 31 Jul 2023 19:51:15 +0200 Message-Id: <20230731175117.17376-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,T_SCC_BODY_TEXT_LINE 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, is it 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 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