From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id CB90B42858; Tue, 28 Mar 2023 11:37:02 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BAAC0427F2; Tue, 28 Mar 2023 11:37:02 +0200 (CEST) Received: from NAM02-BN1-obe.outbound.protection.outlook.com (mail-bn1nam02on2061.outbound.protection.outlook.com [40.107.212.61]) by mails.dpdk.org (Postfix) with ESMTP id 57F3E42686 for ; Tue, 28 Mar 2023 11:37:01 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=czVTT1lgtPV8SOhOgIDkXBjfaSMDMyXRXwEtQkatBHSpo0c6DorDBRadtQX7cnuLcNDEJdwU7GaV7JB79lB7RNMMJcVJ5vPdcoSGJ4AUrBi1oUwBbnPQMBE72SAP5uj/o/AlRW/7Fn49nXltTTz86f+xdwaC/Fr/HHNcSyuzIjxL7nZ3r7288G7oKioUKctAXo2eJPk3WfBZ5baVVzSxdg1+JSP444UvMjQn9kux8J1jqXn3k8z13Q5cGlOs9u1PaeYTcXNj+DKlYZJcRXDzwbB5AW6nnq6gfAumrCAuI+LGyvYG7UpHqpaBUduyuWqmV96drMjbKlw/hLUNRtjVmw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=KcvEyh0v+U/a78tQx/TlopFeTwBlIT2dLL+PaZ+i4vM=; b=MrPjKyNePgvgxQwAMYKwS9qYWHTZzUzBcEPYbSckthg95kqU7CRQnz1eCoIfuaHW5VMsRrInpc/Vas9bDRdFaQl8tHprWqidURm+On3UtgHUFTohSfqFdpEwIH5sxJ5Pp19VAOqCNrBYy2ztx6O5l4tryipJUC6Hf3D/1pW2oqhU/d/mtbxePrs2ZYkDccjcKnhUw9uiow+0Y0yD5HHzUvCPfTt4hJkCdl9IfeAHBFcD9f9Nk96fEMqhb9Z5N9kJwrYRUMyXq4WzPHOXLwC8YcssM7+y4442k5ReAUXmdJ4qePPXAJphx2OgDkabyh0dxVO89AG6mhEVBbZi6mlcGQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KcvEyh0v+U/a78tQx/TlopFeTwBlIT2dLL+PaZ+i4vM=; b=q1MA+yHYAj4gAe+cMjFSM31BOUiiJ90Adk0w/V5tdcbqPQuOrd1kvor7cziYPy6yO9ZUHogPFkbUYOVL94JdtuJkUe7jpj1IttzXrco/A2Jt7bAzoVLhcoX6pOEbSkJYGDru2+favDxormy/Z/kvMm5WYx7R/hXCJye0ulKGL23r06dQrgXgkAjBky3DxzZ68ILNXL32ufF14lMiWN8HPHQ5QyjU1t76lxIWETak8bnhe8JE+W/rA8VrR5jBdVxc5PhE77Zg3d+hxVF5tnul4jR1tiPp414e51QJnhGMeee4VGPTBLf8ClGxvt1YcQ0bYeVMYUiEw1rVQXzhnvL4Dw== Received: from DS7PR03CA0235.namprd03.prod.outlook.com (2603:10b6:5:3ba::30) by SA1PR12MB6969.namprd12.prod.outlook.com (2603:10b6:806:24c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.33; Tue, 28 Mar 2023 09:36:59 +0000 Received: from DM6NAM11FT009.eop-nam11.prod.protection.outlook.com (2603:10b6:5:3ba:cafe::a1) by DS7PR03CA0235.outlook.office365.com (2603:10b6:5:3ba::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6178.43 via Frontend Transport; Tue, 28 Mar 2023 09:36:59 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by DM6NAM11FT009.mail.protection.outlook.com (10.13.173.20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.22 via Frontend Transport; Tue, 28 Mar 2023 09:36:59 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Tue, 28 Mar 2023 02:36:48 -0700 Received: from nvidia.com (10.126.230.37) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Tue, 28 Mar 2023 02:36:46 -0700 From: Rongwei Liu To: , , , , CC: Aman Singh , Yuying Zhang Subject: [PATCH v1] app/testpmd: set srv6 header without any TLV Date: Tue, 28 Mar 2023 12:36:32 +0300 Message-ID: <20230328093633.619965-1-rongweil@nvidia.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.126.230.37] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM6NAM11FT009:EE_|SA1PR12MB6969:EE_ X-MS-Office365-Filtering-Correlation-Id: b94a857e-20a5-4f45-d952-08db2f6ffac3 X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: cuMPt0wv5wUH+y59K9X5Wwm1YUd54uPTe1c9gXR4IzQYuEEnBGreRackQd3f/kwpdR7gFUt+1CSZQgI5C+GUVXblRGr15cD/wspXtlFebtZt028vLHodLDKxvfwnk3wo1Z4NOepclGJheNagQugRqpJaBDkRZzoTr5ma1QN8egiRNhmVsabAGufHkYQPWowEhcOuf7ZXSuVhPbE+buTjUDeolRrXZTCc7qJZFRMU5jo7sKQbiirbo5WbbAP8zQislne51/lkw7Zh4vcnRXZHKtYdlJeh6+S+joM6azL4KnYzBw32Eqfg1ySOf1RFW07djQRYoAi/pSG7wcyPuxOwL05uDhCpazZsbo/yPW3TmIADYkqtqk7IRr0MJiQyEtjZBt4mctPebXTSHfd2ICxxEzI4LnOCfyY5c7MhO/LWweamK3cbsbRxixOKYsetBQekZRQTTixjlQksnjyBB65wr87NAoaWmKPKw89OVuHnfgJlW4i9Lc683wX+cg1ojeQ6Enqq/57Czt+tK8FVgAaXj9HzQ/QJAl5/L4eKxepiN76YdE2j8K4AtSwnWRNpb/HuQviCkP/dFvV+Od0g3xMm+8uHqXjquuEkQ+tFaUUQ4wJoforO9zyAB+AEa8QYpftKx/v8JdpWkFtcv0Fu2ouyxvra6fBfr4Ybh4ZTl8Ek46CiO7afR9LakG7YqZsfEi5ZysOC3+MMzYPCEySbQCdEBuMiz9IDQaeJj5VMweqmr4FLFe9NWdBBVLCxwrUnfWRuLBR36ey1gvFu9r+wQO9XWFvkkxsu2kuyHh4WpsSGlSU= X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(346002)(136003)(376002)(39860400002)(396003)(451199021)(36840700001)(46966006)(40470700004)(40460700003)(7696005)(47076005)(186003)(6286002)(16526019)(82310400005)(6666004)(36756003)(1076003)(26005)(86362001)(40480700001)(55016003)(8676002)(4326008)(2906002)(36860700001)(316002)(336012)(41300700001)(426003)(110136005)(8936002)(356005)(70206006)(70586007)(7636003)(4744005)(54906003)(5660300002)(478600001)(82740400003)(2616005)(34020700004); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Mar 2023 09:36:59.6665 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b94a857e-20a5-4f45-d952-08db2f6ffac3 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT009.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR12MB6969 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org When the type field of the IPv6 routing extension is 4, it means segment routing header. In this case, set the last_entry to be segment_left minus 1 if the user doesn't specify the header length explicitly. Signed-off-by: Rongwei Liu --- app/test-pmd/cmdline_flow.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c index 5fbc450849..64549c037d 100644 --- a/app/test-pmd/cmdline_flow.c +++ b/app/test-pmd/cmdline_flow.c @@ -12817,6 +12817,9 @@ cmd_set_raw_parsed(const struct buffer *in) size = sizeof(struct rte_ipv6_routing_ext) + (ext->hdr.segments_left << 4); ext->hdr.hdr_len = ext->hdr.segments_left << 1; + /* Srv6 without TLV. */ + if (ext->hdr.type == 4) + ext->hdr.last_entry = ext->hdr.segments_left - 1; } else { size = sizeof(struct rte_ipv6_routing_ext) + (ext->hdr.hdr_len << 3); -- 2.27.0