From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.8 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C9E27C606B0 for ; Tue, 9 Jul 2019 04:25:29 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 509162166E for ; Tue, 9 Jul 2019 04:25:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="ifypz7iJ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 509162166E Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=mellanox.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 061F2325F; Tue, 9 Jul 2019 06:25:28 +0200 (CEST) Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-eopbgr150044.outbound.protection.outlook.com [40.107.15.44]) by dpdk.org (Postfix) with ESMTP id 562483237 for ; Tue, 9 Jul 2019 06:25:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Mellanox.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=RhwRA4wzOnmI22im2wzooDfHsJ4PB5cPu3obnwNCuv8=; b=ifypz7iJxsnwzoQp5oTM78/9fzvqYON5HEagFlGDZfnTweAF+SRDfqeMmhQ0VAXDPOUcRnUEMURhBeUnidXrgkFv1GD9GGhgaUK3b4IvhEXzFNnyHRiffr5sL6Tm7Q6QLKLdS+Bucbbo9BKbfeZMNhiC3W7xOHeHohtsBSCY2Cc= Received: from AM6PR05MB6567.eurprd05.prod.outlook.com (20.179.6.215) by AM6PR05MB6133.eurprd05.prod.outlook.com (20.179.3.144) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2052.18; Tue, 9 Jul 2019 04:25:23 +0000 Received: from AM6PR05MB6567.eurprd05.prod.outlook.com ([fe80::496b:bd1c:863a:ed47]) by AM6PR05MB6567.eurprd05.prod.outlook.com ([fe80::496b:bd1c:863a:ed47%3]) with mapi id 15.20.2073.008; Tue, 9 Jul 2019 04:25:23 +0000 From: Jack Min To: Ferruh Yigit CC: Wenzhuo Lu , Jingjing Wu , Bernard Iremonger , Adrien Mazarguil , John McNamara , Marko Kovacevic , "dev@dpdk.org" Thread-Topic: [dpdk-dev] [PATCH v2 1/3] app/testpmd: support raw encap/decap actions Thread-Index: AQHVNbReCkD6pvfaWUSI+cCNlRsLK6bBsTSA Date: Tue, 9 Jul 2019 04:25:23 +0000 Message-ID: <20190709042515.slczqdzqwhagrftu@mellanox.com> References: <20190624153736.127968-1-jackmin@mellanox.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HK2PR04CA0078.apcprd04.prod.outlook.com (2603:1096:202:15::22) To AM6PR05MB6567.eurprd05.prod.outlook.com (2603:10a6:20b:bc::23) authentication-results: spf=none (sender IP is ) smtp.mailfrom=jackmin@mellanox.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [183.54.42.134] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: aab43941-c148-4f73-43bb-08d704257595 x-ms-office365-filtering-ht: Tenant x-microsoft-antispam: BCL:0; PCL:0; RULEID:(2390118)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600148)(711020)(4605104)(1401327)(4618075)(2017052603328)(7193020); SRVR:AM6PR05MB6133; x-ms-traffictypediagnostic: AM6PR05MB6133: x-ms-exchange-purlcount: 1 x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 0093C80C01 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(346002)(396003)(39860400002)(136003)(376002)(189003)(199004)(53936002)(3846002)(478600001)(6116002)(3716004)(6246003)(4326008)(45080400002)(25786009)(6916009)(8676002)(66946007)(64756008)(66476007)(73956011)(14454004)(5660300002)(1076003)(66556008)(66446008)(54906003)(6306002)(6512007)(316002)(6486002)(6436002)(229853002)(386003)(81166006)(81156014)(256004)(446003)(71190400001)(26005)(6506007)(2906002)(186003)(52116002)(76176011)(102836004)(53546011)(68736007)(66066001)(86362001)(14444005)(71200400001)(8936002)(36756003)(305945005)(966005)(486006)(476003)(7736002)(2616005)(11346002)(99286004); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6PR05MB6133; H:AM6PR05MB6567.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; received-spf: None (protection.outlook.com: mellanox.com does not designate permitted sender hosts) x-ms-exchange-senderadcheck: 1 x-microsoft-antispam-message-info: 6nR5I6Q24ZwClaibViA92WaWpxiZ3Jilr5PKKufP9AIoLzGwQu2AD8zIF1Tj58sofXmz+2ZyFogX3PbiBz8wVvOtHWdK6JLKGsxDtAecd5NdIi7vCrPCD8DzVjnNQ9+0BQjePNOrC3qUoYZp3W4EACEKKCNJoDAH/YDtCVceOvBhMU8s4H5zCBar+9zem15vyI61zlKddS4ZE7aO+F/jtqY1/sZYrImjBFDdiq8l4GVFv+oKOyv+iMxDtCWJPCXm8nfqi87q3IDSMkR2M6QdBWSTQ72TuIudR2NqLZQta8wYShJeor0whllZp6pMqiD44eAQ3mVfPISzb84g+YdCHck+rvdYV8uQuj9YGKdDEnOMo6XKjdfpKIyPkvAwzuq6onKZ8hp5sNVQXEbprkC816PR+JALuWEdIvGC/dVyUsU= Content-Type: text/plain; charset="us-ascii" Content-ID: Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: aab43941-c148-4f73-43bb-08d704257595 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Jul 2019 04:25:23.3069 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: a652971c-7d2e-4d9b-a6a4-d149256f461b X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: jackmin@mellanox.com X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB6133 Subject: Re: [dpdk-dev] [PATCH v2 1/3] app/testpmd: support raw encap/decap actions X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Mon, 19-07-08, 18:41, Ferruh Yigit wrote: > On 7/2/2019 2:53 PM, Xiaoyu Min wrote: > > This patch intend to support > > action_raw_encap/decap [1] in a generic and convenient way. > >=20 > > Two new commands - set raw_encap, set raw_decap are introduced just > > like the other commands for encap/decap, i.e. set vxlan. > >=20 > > These two commands have corresponding global buffers > > which can be used by PMD as the input buffer for raw encap/decap. > >=20 > > The commands use the rte_flow pattern syntax to help user build the > > raw buffer in a convenient way. > >=20 > > A common way to use it: > >=20 > > - encap matched egress packet with VxLAN tunnel: > > testpmd> set raw_encap eth src is 10:11:22:33:44:55 / vlan tci is 1 > > inner_type is 0x0800 / ipv4 / udp dst is 4789 / vxlan vni > > is 2 / end_set > > testpmd> flow create 0 egress pattern eth / ipv4 / end actions > > raw_encap / end > >=20 > > - decap l2 header and encap GRE tunnel on matched egress packet: > > testpmd> set raw_decap eth / end_set > > testpmd> set raw_encap eth dst is 10:22:33:44:55:66 / ipv4 / gre > > protocol is 0x0800 / end_set > > testpmd> flow create 0 egress pattern eth / ipv4 / end actions > > raw_decap / raw_encap / end > >=20 > > - decap VxLAN tunnel and encap l2 header on matched ingress packet: > > testpmd> set raw_encap eth src is 10:11:22:33:44:55 type is 0x0800 / > > end_set > > testpmd> set raw_decap eth / ipv4 / udp / vxlan / end_set > > testpmd> flow create 0 ingress pattern eth / ipv4 / udp dst is 250 / > > vxlan vni is 0x1234 / ipv4 / end actions raw_decap / > > raw_encap / queue index 1 / mark id 0x1234 / end > >=20 > > [1] https://eur03.safelinks.protection.outlook.com/?url=3Dhttp%3A%2F%2F= mails.dpdk.org%2Farchives%2Fdev%2F2018-October%2F116092.html&data=3D02%= 7C01%7Cjackmin%40mellanox.com%7Ca837e3b62aff4a3c829f08d703cb7f54%7Ca652971c= 7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636982044863183774&sdata=3Dpu8j7tq%2= FwEpY5dEJ80FtQboyHnfqttLID0syQzC40Sc%3D&reserved=3D0 > >=20 > > Signed-off-by: Xiaoyu Min > > --- > > app/test-pmd/cmdline.c | 13 + > > app/test-pmd/cmdline_flow.c | 536 +++++++++++++++++++- > > app/test-pmd/testpmd.h | 2 + > > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 48 ++ > > 4 files changed, 598 insertions(+), 1 deletion(-) > >=20 > > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > > index e7c4beecc2..ec4ea2f125 100644 > > --- a/app/test-pmd/cmdline.c > > +++ b/app/test-pmd/cmdline.c > > @@ -760,6 +760,12 @@ static void cmd_help_long_parsed(void *parsed_resu= lt, > > " eth-src (eth-src) eth-dst (eth-dst)\n" > > " Configure the NVGRE encapsulation for flows.\n\n" > > =20 > > + "raw_encap {flow items}" > > + " Configure the encapsulation with raw data.\n\n" > > + > > + "raw_decap {flow items}" > > + " Configure the decapsulation with raw data.\n\n" > > + > > , list_pkt_forwarding_modes() > > ); > > } > > @@ -1137,6 +1143,12 @@ static void cmd_help_long_parsed(void *parsed_re= sult, > > "flow isolate {port_id} {boolean}\n" > > " Restrict ingress traffic to the defined" > > " flow rules\n\n" > > + > > + "set raw_encap {flow items}\n" > > + " Config encap with raw data.\n\n" > > + > > + "set raw_decap {flow items}\n" > > + " Config decap with raw data.\n\n" > > ); > > } > > =20 >=20 > help string adds two set of commands, "set raw_encap/raw_decap" & > "raw_encap/raw_decap", but from documentation and commit log it seems onl= y first > one added, can you please check? >=20 Thinks like I should not put help string (set raw_encap/ set raw_decap) in filters section (help filters). I will remove them and only keep help string in `help config` >=20