From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 35163A04DD; Thu, 19 Nov 2020 17:50:52 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1E2A1DED; Thu, 19 Nov 2020 17:50:50 +0100 (CET) Received: from hqnvemgate24.nvidia.com (hqnvemgate24.nvidia.com [216.228.121.143]) by dpdk.org (Postfix) with ESMTP id 6D79F3B5 for ; Thu, 19 Nov 2020 17:50:48 +0100 (CET) Received: from hqmail.nvidia.com (Not Verified[216.228.121.13]) by hqnvemgate24.nvidia.com (using TLS: TLSv1.2, AES256-SHA) id ; Thu, 19 Nov 2020 08:50:57 -0800 Received: from HQMAIL109.nvidia.com (172.20.187.15) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1473.3; Thu, 19 Nov 2020 16:50:45 +0000 Received: from NAM10-MW2-obe.outbound.protection.outlook.com (104.47.55.107) by HQMAIL109.nvidia.com (172.20.187.15) with Microsoft SMTP Server (TLS) id 15.0.1473.3 via Frontend Transport; Thu, 19 Nov 2020 16:50:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=VzCw18G2oAx05NnxidfxrQD3MKR8bh/IRbrx+rF6ZVe5gE1zyUQmaNhFPu5ylB2tjj4kCdrNz1DhIA5ea9WQF2XET258AU20buPVsNXNl2n0qK52hrYdDP9JK0PrCDrZxVblWBaBVddggCGUSodYw3UvxkaUlC3PuFdVCQhyoKzjl9MjvDF/ZzdJhif2RaZhI+Jbypcwn5EkOH4CXP0zSaFsVy+yVwim2FPVZ77pintF8XBVTalNbx/R285OCfbAd+eINxekKTOt2AKor30n+vjD1qKitq9Tfc3lO3EBgoPRB2Is+MMPl3V7SBwRtwZ8QkMYS4/XlP7gVDJx3iEr2A== 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=Bbty9hzlyy3CmsHuMQghjRAE4htrqQL83Sj5nd7bJ3Q=; b=XTj+xw/vZNOGZSdH+3GQ7cP9H/rJtAywYv2cBOJ3eDWYzkXTjl1QKkWwRaBf7KOhCWTNX9RXOaDFe89Vpov/RHU94FI7Mwi0CzZfBd6D2FWnqSQ/9ghl5OY25zAlKd57Xip8Y89lT7gL1nRtZGZZYJfY4Fkx+wU7qTmWjIVq08t/yewVREHvXk8/GkbPMsFCT9dHPFAxTanNNeXJfKvHZXmmKtYqDJu81nGZuXByw7ijhrmep062dyF/rR9fcowL1RgjFOFUIt5R7xPSVvfkjoRRyReGxUYTNre0sI9vkDsUAzL1rf3TRRoD40D2/2kEj00oaWSR8OtU4M8HtVUD7g== 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 Received: from BYAPR12MB4983.namprd12.prod.outlook.com (2603:10b6:a03:102::18) by BYAPR12MB3622.namprd12.prod.outlook.com (2603:10b6:a03:d9::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3564.28; Thu, 19 Nov 2020 16:50:42 +0000 Received: from BYAPR12MB4983.namprd12.prod.outlook.com ([fe80::5445:6b81:fd9c:8622]) by BYAPR12MB4983.namprd12.prod.outlook.com ([fe80::5445:6b81:fd9c:8622%3]) with mapi id 15.20.3564.034; Thu, 19 Nov 2020 16:50:42 +0000 From: Ori Kam To: Gregory Etelson , "dev@dpdk.org" CC: Matan Azrad , Raslan Darawsheh , "ferruh.yigit@intel.com" , Wenzhuo Lu , Beilei Xing , "Bernard Iremonger" Thread-Topic: [PATCH v2] app/testpmd: fix flow tunnel commands Thread-Index: AQHWvmShREUmkQM1rEOa1fGNV67GKKnPq1cA Date: Thu, 19 Nov 2020 16:50:42 +0000 Message-ID: References: <20201115112341.30617-1-getelson@nvidia.com> <20201119111024.7989-1-getelson@nvidia.com> In-Reply-To: <20201119111024.7989-1-getelson@nvidia.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: nvidia.com; dkim=none (message not signed) header.d=none;nvidia.com; dmarc=none action=none header.from=nvidia.com; x-originating-ip: [147.236.152.129] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 6f2bdf8f-61d8-4654-938b-08d88cab40b8 x-ms-traffictypediagnostic: BYAPR12MB3622: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2150; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: MrGQ2jnkMrESgxWrC2CoStujmutaVNKS4lBCBJp227udXPgv+mXbGxREHuw7SjNxl+d1cfb3AhZl6KxjCHLPMCoxtFiOu9FL51kl4lNO5qqUiQkZCTzatQv/lxScsP6PcOW4AI4BFjQXoiWVOckVReuorpXD5RaynuXJLD8CkJ1az2kgy6AfvWt7GlxadcsZaNofk0YIsca/46J/3q3gwSR7WcBDsnGJDm+KRrxS/AcoNhVD2K8seWulHJhZJaNgRAimM2OR3OUhS484xJf/4IW8b4puKi3V/kNHXtN1/wSTrcjYmS/cMNiACpVNxx5x5DyOo/9rNw5YCUZRkWKkvg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BYAPR12MB4983.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(39860400002)(396003)(376002)(366004)(346002)(136003)(8936002)(53546011)(8676002)(55016002)(6506007)(26005)(7696005)(186003)(4326008)(478600001)(71200400001)(66446008)(52536014)(83380400001)(2906002)(64756008)(33656002)(86362001)(66556008)(110136005)(5660300002)(66946007)(76116006)(66476007)(316002)(9686003)(54906003); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: UL6X6uxEatZxXaWl6ioPo7bqop0koybMTK+hvQEUU/cDdMpR6VPATbm4sT+xnnBhUUHRvdFAAFkC3PfDP/guC/mYYw9u71kEvZRh/DSIwQo1Uz1Fv0fTPX2tSRCNM9UrODHHylmScOJZIwOUON4JS5hpLTrQZ1HuswoYYU6m3njKRsJOBFDQqTp1IotqGX2EdYKwrfHbj4/w6BL3StpcPxFQBRqnda3K+iCMnasAu3eowxkMJc1zUTgN7U+3X05JxtG1YlfZiWaong+D9Pfujy4JoIoI1QDNK8gurAC9n9FE5XBcJhtRY7lqgSbcap8I+EL7lhX9m9TDLSir13LaU2neAzYWN22aoflfijOd4kb5JzvXHxdfn3gnwclk6dQqFwNrXxXrNNbqbHWd/7ifUqGbXutnzrtqVxg2gYf8Ydieh3QxOG4PBXTZWYGK8TEq9+ZFX4iaof/jEagyW8MxSLFoutd4AyKhRvWTCmXlDHtQE84sUFhlt6GOItLXNtNYkD3fYyKHrmSJlwRDM7I4cOSxmhbkO2+K0wrDepkLOYR+bb9tti69q9Wnvfi+rao52AsDNzvXyaPwUNXD5BbGF4wQDS1Y/1L5uK650aPzHD7XEGNKrgzsYHSjgJin93ZNPUQdhwjszzCfG4MciOpMXw== Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BYAPR12MB4983.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6f2bdf8f-61d8-4654-938b-08d88cab40b8 X-MS-Exchange-CrossTenant-originalarrivaltime: 19 Nov 2020 16:50:42.4840 (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: jCuOG3TmTndb3XIzZxLSVxlIKHyh5FZRWM6FNDN1290UoRMmi7MXYUodxk3uCs9Z/Tl4s75YESnOTvMxUmIAjA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR12MB3622 X-OriginatorOrg: Nvidia.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nvidia.com; s=n1; t=1605804657; bh=Bbty9hzlyy3CmsHuMQghjRAE4htrqQL83Sj5nd7bJ3Q=; h=ARC-Seal:ARC-Message-Signature:ARC-Authentication-Results:From:To: CC:Subject:Thread-Topic:Thread-Index:Date:Message-ID:References: In-Reply-To:Accept-Language:Content-Language:X-MS-Has-Attach: X-MS-TNEF-Correlator:authentication-results:x-originating-ip: x-ms-publictraffictype:x-ms-office365-filtering-correlation-id: x-ms-traffictypediagnostic:x-ms-exchange-transport-forked: x-microsoft-antispam-prvs:x-ms-oob-tlc-oobclassifiers: x-ms-exchange-senderadcheck:x-microsoft-antispam: x-microsoft-antispam-message-info:x-forefront-antispam-report: x-ms-exchange-antispam-messagedata:Content-Type: Content-Transfer-Encoding:MIME-Version: X-MS-Exchange-CrossTenant-AuthAs: X-MS-Exchange-CrossTenant-AuthSource: X-MS-Exchange-CrossTenant-Network-Message-Id: X-MS-Exchange-CrossTenant-originalarrivaltime: X-MS-Exchange-CrossTenant-fromentityheader: X-MS-Exchange-CrossTenant-id:X-MS-Exchange-CrossTenant-mailboxtype: X-MS-Exchange-CrossTenant-userprincipalname: X-MS-Exchange-Transport-CrossTenantHeadersStamped:X-OriginatorOrg; b=OKd2LYZyGNVBQ7b5N5W/dqcZSTGaG+DNEUxWQZllkECaiMPFMHyqxcMcya4ZlZV7j Pog8wTG197RTcg1QV8LOhi82YhSRD/aj47k9rUcIP8fzoV9CQTaXJFKH4krFS1idhE Fchou0CNZGKP62EYuG0FTcI7vg67L2bekU2cDuS1fh/5Z/JFPBVx2pS06XHckG5G6H zaoSLWQwt7/KEPmgqXtYDrZcigF5+belgmcpXzol4sNFDTc4PrMW48ROkzqmrFxFVC Y/0zSqeBqDiQAnAt63dhBGyxTlGWKNOrGHkXXYdQWyw9Kq82fEgdkITg84leTgk09I jwalIu5ma6KWw== Subject: Re: [dpdk-dev] [PATCH v2] app/testpmd: fix flow tunnel commands 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" Hi Gregory, > -----Original Message----- > From: Gregory Etelson > Sent: Thursday, November 19, 2020 1:10 PM > Subject: [PATCH v2] app/testpmd: fix flow tunnel commands >=20 > testpmd provides commands to test tunnel offload rte_flow > capabilities. Testpmd tunnel commands allow to configure new ofloaded > tunnel types, list existing offloaded tunnels and destroy existing > offloaded tunnels. > Tunnel offload commands allowed parameters repetition. For example, > the following commands were accepted: > testpmd> flow tunnel create 0 create 1 type vxlan > or > testpmd> flow tunnel list 0 list 1 >=20 > Current patch fixed that fault. Correct tunnel commands syntax is: > testpmd> flow tunnel create type > testpmd> flow tunnel list > testpmd> flow tunnel destroy id >=20 > Fixes: 1b9f274623b8 ("app/testpmd: add commands for tunnel offload") >=20 > Signed-off-by: Gregory Etelson > --- > app/test-pmd/cmdline_flow.c | 32 +++++++------------------------- > 1 file changed, 7 insertions(+), 25 deletions(-) >=20 > diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c > index 457f74078d..585cab98b4 100644 > --- a/app/test-pmd/cmdline_flow.c > +++ b/app/test-pmd/cmdline_flow.c > @@ -812,26 +812,6 @@ static const enum index next_vc_attr[] =3D { > ZERO, > }; >=20 > -static const enum index tunnel_create_attr[] =3D { > - TUNNEL_CREATE, > - TUNNEL_CREATE_TYPE, > - END, > - ZERO, > -}; > - > -static const enum index tunnel_destroy_attr[] =3D { > - TUNNEL_DESTROY, > - TUNNEL_DESTROY_ID, > - END, > - ZERO, > -}; > - > -static const enum index tunnel_list_attr[] =3D { > - TUNNEL_LIST, > - END, > - ZERO, > -}; > - > static const enum index next_destroy_attr[] =3D { > DESTROY_RULE, > END, > @@ -2009,35 +1989,37 @@ static const struct token token_list[] =3D { > [TUNNEL_CREATE] =3D { > .name =3D "create", > .help =3D "create new tunnel object", > - .next =3D NEXT(tunnel_create_attr, NEXT_ENTRY(PORT_ID)), > + .next =3D NEXT(NEXT_ENTRY(TUNNEL_CREATE_TYPE), > + NEXT_ENTRY(PORT_ID)), > .args =3D ARGS(ARGS_ENTRY(struct buffer, port)), > .call =3D parse_tunnel, > }, > [TUNNEL_CREATE_TYPE] =3D { > .name =3D "type", > .help =3D "create new tunnel", > - .next =3D NEXT(tunnel_create_attr, NEXT_ENTRY(FILE_PATH)), > + .next =3D NEXT(NEXT_ENTRY(FILE_PATH)), > .args =3D ARGS(ARGS_ENTRY(struct tunnel_ops, type)), > .call =3D parse_tunnel, > }, > [TUNNEL_DESTROY] =3D { > .name =3D "destroy", > .help =3D "destroy tunel", > - .next =3D NEXT(tunnel_destroy_attr, NEXT_ENTRY(PORT_ID)), > + .next =3D NEXT(NEXT_ENTRY(TUNNEL_DESTROY_ID), > + NEXT_ENTRY(PORT_ID)), > .args =3D ARGS(ARGS_ENTRY(struct buffer, port)), > .call =3D parse_tunnel, > }, > [TUNNEL_DESTROY_ID] =3D { > .name =3D "id", > .help =3D "tunnel identifier to testroy", > - .next =3D NEXT(tunnel_destroy_attr, NEXT_ENTRY(UNSIGNED)), > + .next =3D NEXT(NEXT_ENTRY(UNSIGNED)), > .args =3D ARGS(ARGS_ENTRY(struct tunnel_ops, id)), > .call =3D parse_tunnel, > }, > [TUNNEL_LIST] =3D { > .name =3D "list", > .help =3D "list existing tunnels", > - .next =3D NEXT(tunnel_list_attr, NEXT_ENTRY(PORT_ID)), > + .next =3D NEXT(NEXT_ENTRY(PORT_ID)), > .args =3D ARGS(ARGS_ENTRY(struct buffer, port)), > .call =3D parse_tunnel, > }, > -- > 2.29.2 Acked-by: Ori Kam Best, Ori