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 2E57142BA3; Fri, 26 May 2023 05:21:56 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 11B2B40A89; Fri, 26 May 2023 05:21:56 +0200 (CEST) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2056.outbound.protection.outlook.com [40.107.243.56]) by mails.dpdk.org (Postfix) with ESMTP id 9924A40A87 for ; Fri, 26 May 2023 05:21:54 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Qla1GV5E7p7n/L2W3w+2gKtxN2ke7bpGobVOcdPwcctgIf0LdLs7yOp79DaLdn4dayLxIoW/yav0Ec7+6p+Kn71WD/DY4arNgJ7qSEbf/q8Y2lpGzwbIHNCfS0a4DlN0pVwo69Vs2UC6MMrYW94naiO54IVJJaj2rpf74JCfk2NcjL6VY6r8DTQBF0gUy/85pGwjMMCyKbOjFhXwgUozmLmsMaWQFj9uh5PYE4orgngBXqn0bhNJSFDqHAQIh+/sAqdKTO5YD5VgAGMGRrGkIBbSahhVTuW3v5RP2f2oXKogp1IW3ah2/PsG2mFku/5a6VGwNBDKBa9RqY9m1SsSSA== 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=K6XSXdxYsb5Xzc25e5Lrdni48FKw+WbA9zoQyibdcSk=; b=ei2iFGBbwK/Y3yzGGLiOcrZ+dJDDUX0diQswkaxUPD5ux/3THPAdPvIbfaVImj1XTYEUUTah5dLA6TfrtYAFq3QBqlB+AhbwMbg3dX2eMD3KQIGFkOJK1UzkZSZi6G33JZSWRuzGTJgX8OvUf3qbeC1HiL/B6UHS0bzo+EQ1WeGfcZD25GPa7xD7hnh7tmwlScbIa3Rb61c1kSBEKSBihvVPMlqehdCBfEM8bi0pSMWTW18viQDUPPnwlm0iew42Dw32aGFOCKwGcQ69F1bABhNZAIr3JB9MAupxjMLsRhRMka26GC55jz6hJuHAikxvh3SFcajv+dM0KwwUUK/NuQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; 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=K6XSXdxYsb5Xzc25e5Lrdni48FKw+WbA9zoQyibdcSk=; b=eKFXu9CicgY2NGg84FhzyXIypTNYWHiXoSnRHW+2q902ylMM2HrM8ACqu36F2LONcgiwTNuobEGNx8eOd6sfyj4VVljCwnw3BDTHBJwCGcjKS6QhuWdOUcEt0RZDYY53stq/E2JA20atYzvNR01+aXykA/3v+NhO9N9ohInELjNKPKh2IPDXSZvMbTLqCcneWPkB3y2U+JA8ELrtxkYb6mF4gZ2rXDQ5sCb1GqQozG/qA3jRDko4CJ3rc/P+vH+bw+bz/OStl2QAQpg/V5yZ89lXr4dqv0vK/75sDalXG7eIJQ01iNtF2RzCtMfyJky+5iV00GQrYAmTj7oZgNP+Iw== Received: from BN9PR12MB5273.namprd12.prod.outlook.com (2603:10b6:408:11e::22) by DM4PR12MB6256.namprd12.prod.outlook.com (2603:10b6:8:a3::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6433.18; Fri, 26 May 2023 03:21:52 +0000 Received: from BN9PR12MB5273.namprd12.prod.outlook.com ([fe80::eaa2:6e82:eb24:e6e1]) by BN9PR12MB5273.namprd12.prod.outlook.com ([fe80::eaa2:6e82:eb24:e6e1%4]) with mapi id 15.20.6433.018; Fri, 26 May 2023 03:21:52 +0000 From: Rongwei Liu To: Rongwei Liu , "dev@dpdk.org" , Matan Azrad , Slava Ovsiienko , Ori Kam , "NBU-Contact-Thomas Monjalon (EXTERNAL)" , Andrew Rybchenko CC: Aman Singh , Yuying Zhang , Olivier Matz Subject: RE: [PATCH v2] app/testpmd: set srv6 header without any TLV Thread-Topic: [PATCH v2] app/testpmd: set srv6 header without any TLV Thread-Index: AQHZYXDJouXp5MnIj0yHXwB+EsPb8a9sPz9Q Date: Fri, 26 May 2023 03:21:52 +0000 Message-ID: References: <10910654.BaYr0rKQ5T@thomas> <20230328122742.738048-1-rongweil@nvidia.com> In-Reply-To: <20230328122742.738048-1-rongweil@nvidia.com> Accept-Language: zh-CN, en-US Content-Language: en-US X-Mentions: orika@nvidia.com, thomas@monjalon.net, andrew.rybchenko@oktetlabs.ru X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: BN9PR12MB5273:EE_|DM4PR12MB6256:EE_ x-ms-office365-filtering-correlation-id: 5e062af4-2458-42f6-527c-08db5d9859cb 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: Vv/w+QL5MWQT+4Lg/feKW1whaQhdpH1KAZrFwyaDeU10kDTAdRTEMMXM2KXUN3R6KoQ2TAOtGi/0Zqxf1nlW4Qi2CTA9q7yDvCHJk8D/lUUKzUPF+YTJ0+x8oOoMw67OQkzEQisgHb9DT2hFyaAYcbQ1hMg9By6wkE1fDEmPjXOsyMcuNRNreZv/SDF2fe0n9KhuC8CxC3B541gJPuS7YiVS+I+R8/u8X5c/rTIA6+GXdq033EfzgiLW4nDZONsM+jkBmJ49Z2ZjYfvVErJAyo1t3VKyjcCo1nlBmG0Yc4X3yDhyhEX8IHeOv8yyn/BJ+/9E58zanTdUmMJJM8YdybRAaBKQ9ETcg9mWKzu+o46qON1IZg4RRjuwuVRzTSNiLC3400YRaybxducHFyqPOCBlxLAStuL7K+BjMpfIJxw2xYq82vVSZeqyshikM0aWQuXeYp2sNOs+UNS7rGg85eNm3tGcdAvdR5cZmjS2uPGk2RU+y9rycBf5Ow69BZQnBM/DJYOa4U8nmMtdnXXdQNqw5y/DotTk05XcotXb5pcd+ZXt363FDQvE4g0Jhjvsd8D/u6XQUl+e9jhktMHCa5NEjYvBui8JDQLuD4dXwf7APl8eADmSihhzKT1Icrji x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BN9PR12MB5273.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(4636009)(396003)(346002)(136003)(366004)(39860400002)(376002)(451199021)(110136005)(54906003)(186003)(86362001)(83380400001)(478600001)(38070700005)(2906002)(64756008)(66446008)(66946007)(66476007)(4326008)(66556008)(316002)(71200400001)(52536014)(122000001)(76116006)(6506007)(53546011)(9686003)(26005)(5660300002)(55016003)(33656002)(8936002)(8676002)(41300700001)(7696005)(38100700002); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?fq/tHozk5Zou8x7BOFDkv8wk2nYZ8ZVNyDpLTQ2hmUULlD1GD20R/ZlC6dG8?= =?us-ascii?Q?+efCHbois28yUS9bti4G7DFcYOSPgvlYb7D4XOebyNs5KpA9EY5u2sgQOfnY?= =?us-ascii?Q?V6pFFXdpe2UNzKTutbYpm68T/ED0nqzeyMhTFFHuF487prE3yXy8XyCNUk8Z?= =?us-ascii?Q?153qVT84T8YqYR4XOgE6I4BJ2WMM9lskZO9/brDkyEPYxaSa9/BDwTOC28Sv?= =?us-ascii?Q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FtzAc88tGFJjpb?= =?us-ascii?Q?M9IJd9+1+JIBY+nS2oy7Pmk+fwumq2pqfK3S7emVliF48aWu4yDitCwPtJxj?= =?us-ascii?Q?YHLGTUThtpa0Bha6vbe7Sx5vwdNnEO8igf8cTlhd1BaJTGyTx+scmFrOgqgl?= =?us-ascii?Q?mj0t0cyLnyZYvJ+iMCd84WhYeXo+h6lpEUiYaZuSiB2VksDNj9poT/TXtJMK?= =?us-ascii?Q?1kpbFBwNsNSSv/FT1OyEb2m28IIwbX5bAh/LMaTzJycbriqR0fdXgvkWtrHH?= =?us-ascii?Q?u0M71KIk7qLlxWdCYtQatg7qThyouW3Doc6nItKnFfk/zr9UoCu8LB0gMPA9?= =?us-ascii?Q?LNddPVMCqvIWKL0o8nAxGrSGfgWc4GjuAe84zmYVt4e7y0KEtfb99pWhhlao?= =?us-ascii?Q?rkd/SlxceRJDeLxRqDV42lzQVgGmdmjX/oPliSVRKC9p4YOl7UW4/EHlQX4F?= =?us-ascii?Q?iH7CKikDHzcleKpiJnk=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN9PR12MB5273.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 5e062af4-2458-42f6-527c-08db5d9859cb X-MS-Exchange-CrossTenant-originalarrivaltime: 26 May 2023 03:21:52.5669 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: +z6JJfc0LFNQu31Q9NizDCcuzt1TM3WAyeKogebKVU0cPxreUfjvjSwxIbZrumn45GF9ItC19jB2l/DUQZzF2Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB6256 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 HI @Ori Kam @NBU-Contact-Thomas Monjalon (EXTERNAL) @Andrew Rybchenko Can you share some comments on this? Thanks. BR Rongwei > -----Original Message----- > From: Rongwei Liu > Sent: Tuesday, March 28, 2023 20:28 > To: dev@dpdk.org; Matan Azrad ; Slava Ovsiienko > ; Ori Kam ; NBU-Contact- > Thomas Monjalon (EXTERNAL) > Cc: Aman Singh ; Yuying Zhang > ; Olivier Matz > Subject: [PATCH v2] app/testpmd: set srv6 header without any TLV >=20 > External email: Use caution opening links or attachments >=20 >=20 > When the type field of the IPv6 routing extension is 4, it means segment > routing header. >=20 > In this case, set the last_entry to be segment_left minus 1 if the user d= oesn't > specify the header length explicitly. >=20 > Signed-off-by: Rongwei Liu >=20 > v2: add macro definition for segment routing header. > --- > app/test-pmd/cmdline_flow.c | 3 +++ > lib/net/rte_ip.h | 3 +++ > 2 files changed, 6 insertions(+) >=20 > diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c > index 5fbc450849..09f417b76e 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 =3D sizeof(struct rte_ipv6_routing_e= xt) + > (ext->hdr.segments_left << 4); > ext->hdr.hdr_len =3D ext->hdr.segments_le= ft << 1; > + /* Srv6 without TLV. */ > + if (ext->hdr.type =3D=3D RTE_IPV6_SRCRT_T= YPE_4) > + ext->hdr.last_entry =3D > + ext->hdr.segments_left - 1; > } else { > size =3D sizeof(struct rte_ipv6_routing_e= xt) + > (ext->hdr.hdr_len << 3); diff --g= it a/lib/net/rte_ip.h > b/lib/net/rte_ip.h index 337fad15d7..cfdbfb86ba 100644 > --- a/lib/net/rte_ip.h > +++ b/lib/net/rte_ip.h > @@ -540,6 +540,9 @@ struct rte_ipv6_hdr { > uint8_t dst_addr[16]; /**< IP address of destination host(s). *= / } > __rte_packed; >=20 > +/* IPv6 routing extension type definition. */ #define > +RTE_IPV6_SRCRT_TYPE_4 4 > + > /** > * IPv6 Routing Extension Header > */ > -- > 2.27.0