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.5 required=3.0 tests=DKIM_INVALID,DKIM_SIGNED, 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 55D85C76195 for ; Wed, 17 Jul 2019 01:24:13 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id CEA78217D9 for ; Wed, 17 Jul 2019 01:24:12 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=Mellanox.com header.i=@Mellanox.com header.b="OxAGODDx" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CEA78217D9 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 533D32C18; Wed, 17 Jul 2019 03:24:11 +0200 (CEST) Received: from EUR03-VE1-obe.outbound.protection.outlook.com (mail-eopbgr50041.outbound.protection.outlook.com [40.107.5.41]) by dpdk.org (Postfix) with ESMTP id 903A81D7 for ; Wed, 17 Jul 2019 03:24:09 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MIQ1iIi9XJ9TSdYZRDWG4CfTVd6y/n1T/ikg+OX3q8HUpMGCLmNJeigBgDN4tGR0CLuhtPsUq1jpja6dEmcwKs1oynD3QrifkYL+9ldgvO3Nj75Pl3AGc4zwCwL4lppeAwA9f28ovooIjwryw2JOB30M7yKXYliH70Ay9ea4H/NzHqGAY04yosE8adIQtRt7CSBbjTntDkT0rU4rnnCllL3/jGGe1g7iiVRdVGMALafVbc0hlYlJpWb81o++SR6yS3RM9RgMwStcTPyqChGkBwMtZmIRWEM2UGSziIg01JX3Gzw9b0VkNcttH85xzdmGDIH6xvhjC/BT2XM/ynhNYQ== 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-SenderADCheck; bh=R7jPolP/GpwpKBw51qyRYUIjq1VtX+UBkUy8JE7y7J0=; b=USMinmanR9BUWnDc8ztnzAFz+dKG3kG8VPiHnXNIhJkN1BeiXa7XVLplchtqjvaajayXlBhNl235ffnLqTUK6MmSF4NU4ltwj0caB6hFqVgVzqZ7wOZpn0hsP0B6hG3YR+BAqAEeQE+ch01nSKyYRnXC5FDD+1Y1X0bQjMlenQDEPemSnwOOzzUuRCmLnA8EvF6IvwcXFVKUHOE1Y8h1DD1m9dPu/UkX0zCh8Rq/ynYBqJkbvPyMylGhq+uGD6LCon+UjaVtnIXfi76mO8wxtA4ZODJx1R+6jpndxtgI89amr2oneyWVHRveCV5OpXPdABx63kM74yXRREJRvsjA8Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1;spf=pass smtp.mailfrom=mellanox.com;dmarc=pass action=none header.from=mellanox.com;dkim=pass header.d=mellanox.com;arc=none 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=R7jPolP/GpwpKBw51qyRYUIjq1VtX+UBkUy8JE7y7J0=; b=OxAGODDxaQafgtj4GQhV9u3J7NLgvYE9XMlspNIpk3y1rHWLRgptU0fRbXVJ/MidfiNfUbySG6a8JAuhOhGy+FjAMDFrYfGaoZsnsQqxuIpvmO5Ot/dGfk40ylE/qlvHoLmBdLxevU3ForiMoBqIdcbnoFAnyu9hB/B+hu4ajkc= Received: from AM6PR05MB6567.eurprd05.prod.outlook.com (20.179.6.215) by AM6SPR01MB0028.eurprd05.prod.outlook.com (20.177.116.159) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2073.14; Wed, 17 Jul 2019 01:24:08 +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.2094.011; Wed, 17 Jul 2019 01:24:08 +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: [PATCH v3 1/3] app/testpmd: support raw encap/decap actions Thread-Index: AQHVO/28YMBP+/HUFkC47/o7DNH+AabOBKCA Date: Wed, 17 Jul 2019 01:24:07 +0000 Message-ID: <20190717012357.hiw5z3pgn2plgs7l@mellanox.com> References: <20190624153736.127968-1-jackmin@mellanox.com> <89bad2e391ed6275fcfc89e43cc27106107bfbd9.1562754908.git.jackmin@mellanox.com> <7dfd0a52-40ca-0d3f-a991-49760c99d3e1@intel.com> In-Reply-To: <7dfd0a52-40ca-0d3f-a991-49760c99d3e1@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: HK0PR03CA0015.apcprd03.prod.outlook.com (2603:1096:203:2e::27) 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: [139.227.41.236] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 799194b1-aa55-4344-4c66-08d70a5576ad 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:AM6SPR01MB0028; x-ms-traffictypediagnostic: AM6SPR01MB0028: x-ms-exchange-purlcount: 1 x-ld-processed: a652971c-7d2e-4d9b-a6a4-d149256f461b,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; x-forefront-prvs: 01018CB5B3 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(346002)(396003)(136003)(39860400002)(366004)(376002)(199004)(189003)(76176011)(186003)(11346002)(52116002)(26005)(53936002)(1076003)(102836004)(6512007)(2616005)(476003)(6116002)(3846002)(386003)(2906002)(53546011)(6506007)(446003)(71190400001)(8936002)(54906003)(14444005)(71200400001)(6306002)(7736002)(6486002)(305945005)(66476007)(6436002)(81166006)(68736007)(81156014)(6246003)(66556008)(99286004)(45080400002)(66066001)(66446008)(25786009)(478600001)(229853002)(86362001)(36756003)(316002)(4326008)(486006)(256004)(14454004)(8676002)(66946007)(6916009)(64756008)(5660300002)(966005); DIR:OUT; SFP:1101; SCL:1; SRVR:AM6SPR01MB0028; H:AM6PR05MB6567.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX: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: jPdqOV02HzjJZG8ymeal7lUXRH+eAtYs4h+Yja3v8z3awh7nTeorGZoUz473pvIZ0kI3tS4Pov96aYy7CXFYL8GnZwS77nf4X/MpNjxhErVT+OWTM6W4439F6XxiwWphg3ktEvhGbSb0E9DacjmI51JzJKdFZ1VZCYeSefnj5nacBPcmv+4o2CaW75m+213s69tqUGXxtHI2uPbxrquUjVsDTWk5OLUvT39ieeSbBhh+rsppEZXP8+PTeBhkercI7C3Hit32snaYOLXFyDKNuTyeNS/UZ1BfOBOQ/yp048tCRzdtV+ttyxfzdmravGnTG6GB0MxeP1ydEwzj0qeRkz973xDqUZJByDDQ9PackmkK59HUyd9axYo7IY7ByvaZr/8HzN8WKCqRGYnbuQC8TVpt4sU3BfqFRhye6ZKJGm0= Content-Type: text/plain; charset="us-ascii" Content-ID: <0A4C8F87C47B714DB3A6BCC440777734@eurprd05.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 799194b1-aa55-4344-4c66-08d70a5576ad X-MS-Exchange-CrossTenant-originalarrivaltime: 17 Jul 2019 01:24:07.9259 (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: AM6SPR01MB0028 Subject: Re: [dpdk-dev] [PATCH v3 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 Tue, 19-07-16, 18:41, Ferruh Yigit wrote: > On 7/10/2019 11:43 AM, 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%7C70ecd953302c47ac8c6a08d70a14dd70%7Ca652971c= 7d2e4d9ba6a4d149256f461b%7C0%7C0%7C636988957053156948&sdata=3Djbpk3oPLW= 8XQcS1aUxESwVkqaGzzumRObaFwh2%2BAxbA%3D&reserved=3D0 > >=20 > > Signed-off-by: Xiaoyu Min > > --- > > app/test-pmd/cmdline.c | 7 + > > app/test-pmd/cmdline_flow.c | 535 +++++++++++++++++++- > > app/test-pmd/testpmd.h | 2 + > > doc/guides/testpmd_app_ug/testpmd_funcs.rst | 48 ++ > > 4 files changed, 591 insertions(+), 1 deletion(-) > >=20 > > diff --git a/app/test-pmd/cmdline.c b/app/test-pmd/cmdline.c > > index 01dd45f27c..69c5d9e8f6 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() > > ); > > } >=20 > I think the exact command is "set raw_encap {flow items}" && "set raw_dec= ap > {flow items}", Yes, this is the exact one. I'll update it. > also can you please move them "filters" section, from current > "config" section? Sorry, I don't understand. Why "set raw_encap/ set raw_decap" should belong to the "filter" setion? I think these commands are as same as "set vxlan"s which are listed in "config" section. Should we, at least, align with them? Or I miss something? >=20 > Overall these dynamic commands nice from user perspective, thanks to Adri= en, but > the amount of code it brings and complexity a little worries me for long = term... +1 >=20