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 89CF5A04A4; Wed, 2 Mar 2022 09:13:03 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2590B4014E; Wed, 2 Mar 2022 09:13:03 +0100 (CET) Received: from NAM11-CO1-obe.outbound.protection.outlook.com (mail-co1nam11on2062.outbound.protection.outlook.com [40.107.220.62]) by mails.dpdk.org (Postfix) with ESMTP id 68D5B40141 for ; Wed, 2 Mar 2022 09:13:01 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=IOSG3l+qdX9S2JPQvKB2bwCpwew+wykoFMtu6Ea1wtJZBXlhLQH/xbgt9VmQIQ24FRlIb32586LrtkCz27JoxZidNbMiyQjMoM24le3PckAl8MnvemlNV3M9zzfAQw/xYyyhhZ0C2noE/mDZkmU3EUhRaedOs0+hxLs7NBF9kyHdj+Op97CzHOz0Vg/s0L7tFqc7ZEoZGP35VTxYOjr5Lrz9mvUDDfaGCeNMLEtPA71MYH3OVqKc7Ell0O8LjqBx5js0rtnvpw6ZFV7Yd20BtjEjQEMPmSrQN93HvVJMlowLwfGGEfGiGNGNWm3EvcRv97YfmDiFQtq6NAclyX01hQ== 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=aoT1h/CuMNMAoG/sIRjiE5VmGWcL6sNkrBS20NG8lhU=; b=gtcSxVHkf7uD6FIFCUUGaqZ8O550yyzYjN6hrNCQsfIY3GJzTzZZHcFqnGgoP1VgPK3c7VCj9z7PJ+cLKpB+Cz0WGBzkHmUTG69BgMUYAViBKghr3fPegXo7la8r/6C/DRk9IIT5IFyn+qktIdfrK+yGYldCo/Vf4EuTxppgc7Wxfj/bSGJxa0vbqpnvplbCrQ4oKeproaVRdLF54iG65G/T+KA7yJj841uaVYoV1Aew9EVIFljlwr2zATA/I54ju+ptbGAdwc2fMccszVWVOUGoxhH1yQdNmHlDNmdfjjGEPcWgJBXWJA3xVboLfFOlsUpG9g2Kk8WV/pfa0X0Kzw== 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=aoT1h/CuMNMAoG/sIRjiE5VmGWcL6sNkrBS20NG8lhU=; b=PCvdnqAMuwJeXbl8FuhWbWOUPQvFEfH+dEWLB/aHtJhqPERZwlRyotT17dIoE6BPnvOLdPHDzboeiO9bhGeWrJWFIzCoJhzE8X5PJAH0xEGXOcnrch90U5O0RijMO5dpGJccT2UDA9nmtYQ8KSIZJLFZOLsj0ozsTXwy3icq4nvUPC8JQ7wa18HX8RqnWRn10xbk9y+QnAjlNm6ex2FzOzPosiTJntfWyDLaTZf0XqdRC9qjwfOt+X1ygfvURO9uk7oevbSXD5efCPO8iFF7lCz2mu6zxdnNqy+PvxmqMYTkJYD+jjaJLWyW6XNIorK8Ax/avb1s6BFdBlOocfW8dA== Received: from MW2PR12MB4666.namprd12.prod.outlook.com (2603:10b6:302:13::22) by MW5PR12MB5621.namprd12.prod.outlook.com (2603:10b6:303:193::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5017.22; Wed, 2 Mar 2022 08:12:59 +0000 Received: from MW2PR12MB4666.namprd12.prod.outlook.com ([fe80::9da3:dc28:be54:cd4f]) by MW2PR12MB4666.namprd12.prod.outlook.com ([fe80::9da3:dc28:be54:cd4f%4]) with mapi id 15.20.5038.014; Wed, 2 Mar 2022 08:12:59 +0000 From: Ori Kam To: Alexander Kozyrev , "dev@dpdk.org" CC: Suanming Mou Subject: RE: [PATCH] app/testpmd: fix flow creation parsing Thread-Topic: [PATCH] app/testpmd: fix flow creation parsing Thread-Index: AQHYLb5vlaLhsqWX6ESi+CCRs2Wn46yrvpnA Date: Wed, 2 Mar 2022 08:12:58 +0000 Message-ID: References: <20220301224739.3072563-1-akozyrev@nvidia.com> In-Reply-To: <20220301224739.3072563-1-akozyrev@nvidia.com> Accept-Language: en-US Content-Language: en-US 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-office365-filtering-correlation-id: 21cfb1f3-08b8-4cac-d656-08d9fc2476ca x-ms-traffictypediagnostic: MW5PR12MB5621:EE_ x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: IWFk/dIRLxRTwEc7zX52le2GIChHg+XKSTF0RbFLl10+lTll0/WDVjG3OmIRgr0CrnYunDuEW31b0MwRhPIpIm2V90GCyks/WU5PPyPaEg+esn+shfpPgoQgBjjioiIwTADLFn2mG2f+LklogSCY1dsQTwjWR8G6O1SriTWjnTl6NF3l+C4s5drOTmSl4mZWELHwJa4MoSUKWUaWGrVRO9RSHJokXBENZCx1nT6v52UqTDMqcK4IOCS9k2C+CSfRNLLkRhDtPYzQoDCkhYWuyTeUGgrHZdQdCaKHUD9NtuRrBss1s8wQo+a0Zkf0/GeH2Ngt4Qzp6RVNE2iy0TDJJr3wcj86y6UdXgQ0VBZMp4dcnru8MBeed/ClSRfl7uXR2FKqDmWscVtlNaGI5ZZjkjjLQruuMryx+BcoZjo3qB6SUv7WVzKCadJEmpimTmvOL5OvhXKZaAGEY3axNZL3d/LVBtcSSMnm7B0OFIqaccAKgeuMJV04/4oscpxWR0WKg8GL3bk9j9WOUEMdSviZN9qlqb57YGoCCgNdMU/atotgWnxUJWsryAxlqEW9Pg0nG6FZ8I4R9jRV4bm2LphVZUbHnR0pP3znxJI49/XlSe2HUJ1kBIijDSOYCJTqaYfM9dpU5gEsg6757HYiscV/Hypfp94w8c9CGn5lYFDCBQRLnl+q8/9hQj9SM4JAnwYfgzFPt9kIfXu/6uwTe2UWOg== x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW2PR12MB4666.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(4636009)(366004)(107886003)(33656002)(508600001)(6506007)(7696005)(71200400001)(110136005)(86362001)(66556008)(66446008)(66476007)(64756008)(8676002)(186003)(4326008)(66946007)(52536014)(8936002)(5660300002)(2906002)(26005)(76116006)(38100700002)(83380400001)(9686003)(316002)(38070700005)(55016003)(122000001); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?u4H/W6nTKsjmQHHaILjbw6Cd3PrzccSckPCULLQ8mJg4EmLaB6Tk3VH3Jrzm?= =?us-ascii?Q?492Nh9arOsNPJUkBuTt7lC8U+yzrCcLERG/IDc7pBD1r4BoYtFpvQf6N0wzR?= =?us-ascii?Q?zMQjCYIlbSicvLC64Yh2WE5qYHJrj5QrCNMFxwdZ5ClgEIuAiu12qFpLm1xl?= =?us-ascii?Q?FG9/O/CW6971Y1Juba5hkS4otlZAcQ8xJDRbar9c7aB8SPGVL/KwKcrUKUXn?= =?us-ascii?Q?I54Jj5pB2nQBawdw60MV/t/ekEtZJY1FrvUY++Wk0USDDptNePj2YjprGx4D?= =?us-ascii?Q?EGigkKjZAZBsewm1LqY7WFlNs5aauUOKl5yCxTVwM1Tpz+QiobVjtmC0EX/9?= =?us-ascii?Q?RtH+TwX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iFo9kZrMC+Hpom0CJ7?= =?us-ascii?Q?mCQfoa1uRFhvkqpOakMXb4ECWSKNhmCbYU9ptZYa89SmMDm6p7kTeQYL7lJx?= =?us-ascii?Q?sJnpSb/hf6PTu4ICX+yV9MpR7JjjIVzMIUA8a4AF7rZwaNZnZ9jrqf1yATff?= =?us-ascii?Q?Fx5dlW18O1aQMenySVvxZ2Q4xdbtjAL6QNhaoNvqjV67JTvdjqDRj/gHA1N8?= =?us-ascii?Q?GdJCrWvF2VUTzv7iTIwIZkcvJ2Nxcca0lzNJVtnHvIGXemvWRQXWSchIVysq?= =?us-ascii?Q?eeujaCgXuOb9BJ95s/q/5ynv98ERojdnF75W4BiHyCEU4Ma1NqhIT/f7n9Rn?= =?us-ascii?Q?arGkM0+1w4N4HWe9350pUXv7ijNL4NGST8paOqmTU2maK5gREMLvxTprEI9H?= =?us-ascii?Q?Gg=3D=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: MW2PR12MB4666.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 21cfb1f3-08b8-4cac-d656-08d9fc2476ca X-MS-Exchange-CrossTenant-originalarrivaltime: 02 Mar 2022 08:12:59.0100 (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: GouGP7PZxM+6827GWEZhtGseYxIKeK+FknngSk+Fk7VBpnOksnGTVClCJUazDDp3ApNMIQSFOerv4BzP4X3XuA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: MW5PR12MB5621 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 Alexander, > -----Original Message----- > From: Alexander Kozyrev > Subject: [PATCH] app/testpmd: fix flow creation parsing >=20 > A pattern template creation shares the parsing mechanism with > a simple flow creation. The pattern template creation only consists > of pattern items while the flow creation continues with actions. > The parsing mechanism now accommodates both cases and allows to stop > at the item end token, which should not happen for the flow creation. > Fix parsing mechanism to differentiate between these two cases. >=20 > Bugzilla ID: 941 > Fixes: 04cc665fab ("app/testpmd: add flow template management") >=20 > Signed-off-by: Alexander Kozyrev > --- > app/test-pmd/cmdline_flow.c | 8 ++++++++ > 1 file changed, 8 insertions(+) >=20 > diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c > index 4f7a9f17f9..fc4a6d9cca 100644 > --- a/app/test-pmd/cmdline_flow.c > +++ b/app/test-pmd/cmdline_flow.c > @@ -6864,6 +6864,14 @@ parse_vc(struct context *ctx, const struct token *= token, > ctx->object =3D out->args.vc.pattern; > ctx->objmask =3D NULL; > return len; > + case ITEM_END: > + if ((out->command =3D=3D VALIDATE || out->command =3D=3D CREATE) && > + ctx->last) > + return -1; > + if (out->command =3D=3D PATTERN_TEMPLATE_CREATE && > + !ctx->last) > + return -1; > + break; > case ACTIONS: > out->args.vc.actions =3D > (void *)RTE_ALIGN_CEIL((uintptr_t) > -- > 2.18.2 Acked-by: Ori Kam Thanks, Ori