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 58151A04F3; Thu, 9 Jan 2020 07:29:32 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 092481D513; Thu, 9 Jan 2020 07:29:32 +0100 (CET) Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2044.outbound.protection.outlook.com [40.107.20.44]) by dpdk.org (Postfix) with ESMTP id 186CD1D508 for ; Thu, 9 Jan 2020 07:29:30 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gXmC37BgYxtmG0iAHGoJMg+ar85oE0t99y5gEdmhjflvWz+6qOseBu2qriRpocBshnvBtes5fnw0yV5N2QDOwxRqPgsVOSLy+OxVRHTCBNnnRc2lGfUW9Wco4qEZPWL6UK3RYHGSGl6xb5BWstyxXR2uSqmtJdIHef4MJzeKETLgKD4y55HDQpC17YxKPiEq5boLah0DvqiaARNH06jYtfexLV6wryUZQBlbtF0YIqFlMGTE0s+O5O4Ak5o0AyM0Ez7FkTKtYfrEGJn1T5Mut0F6oZwebmNeepcatOhuLVyCFTuE/Tb37pYxRKmQWHZBeBxkIgPnlVeCFW9HCemkWA== 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=EatFEBOaAPk3tER4ly5LiiL3bgBsWIESDXsYf7p/gZY=; b=KYhj5Yn7+3X6hM6JdozJA6FIh7BRlWFDzRdqu74Lx3++b+QVLeedLzDpazWFZULtGNBv511Yi7P4N6iu8NTN6/4Xu2NXdvLkzOh4/2MNsr75/X6b8N4Jxt5fcVnAfIsFpY7h9gfav9QF5dZlCoNrmSmI9FlD5gxc4buF8xDaSShYeOdpWQ9nTaGNxlnKVVpAfQQuf3tHDoBR2GPECVpxBvPxyDZAYfkuatI1AVCpDgCgAfHX2UMaOD8ZABfFq5K4BlilNeRHQQOhjBKDRgakHtSupUWoynCw75NBOPj+LS9T6iQeXiSSRo2+sCVWYzZFqWju3PQvRcJzWb6Y7mqAmw== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=EatFEBOaAPk3tER4ly5LiiL3bgBsWIESDXsYf7p/gZY=; b=PT3Zp/bzwWGzHuVGmsJq3hC5JCTCOFEyRM/YnxLC1jF0eKKe5mLSzweNX1/QMSg/ny3M9AIrogAqken46vPhajY+hrryFAbW4lKd3TqcD4/fPZzwL1M9s8mpslSZi7YkdanD9GkPjGXadVmEE2mVvFMNlVb0/PiNkHUL5z+gNNc= Received: from AM4PR05MB3425.eurprd05.prod.outlook.com (10.171.190.15) by AM4PR05MB3347.eurprd05.prod.outlook.com (10.171.191.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2602.13; Thu, 9 Jan 2020 06:29:28 +0000 Received: from AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::5114:421:f4a9:5ca8]) by AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::5114:421:f4a9:5ca8%6]) with mapi id 15.20.2602.016; Thu, 9 Jan 2020 06:29:28 +0000 From: Ori Kam To: "Iremonger, Bernard" , "dev@dpdk.org" , "Xing, Beilei" , "Zhang, Qi Z" , "Doherty, Declan" CC: "Ananyev, Konstantin" Thread-Topic: [dpdk-dev] [PATCH v2 01/10] app/testpmd: parse flow command line for ESP Thread-Index: AQHVtMMHdw/3QfgdykCI0j7O8SqtOKfg+FOQgAAcOICAAOdqkA== Date: Thu, 9 Jan 2020 06:29:28 +0000 Message-ID: References: <1575982632-23059-1-git-send-email-bernard.iremonger@intel.com> <1576577756-648-2-git-send-email-bernard.iremonger@intel.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: spf=none (sender IP is ) smtp.mailfrom=orika@mellanox.com; x-originating-ip: [185.175.35.255] x-ms-publictraffictype: Email x-ms-office365-filtering-ht: Tenant x-ms-office365-filtering-correlation-id: 4b9cefcd-eaea-4acf-24ae-08d794cd4788 x-ms-traffictypediagnostic: AM4PR05MB3347: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 02778BF158 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(396003)(366004)(346002)(39860400002)(136003)(376002)(51914003)(15404003)(13464003)(199004)(189003)(186003)(478600001)(66556008)(7696005)(52536014)(66946007)(66446008)(2906002)(64756008)(5660300002)(8936002)(71200400001)(76116006)(26005)(66476007)(81166006)(81156014)(4326008)(53546011)(316002)(110136005)(33656002)(6506007)(9686003)(55016002)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3347; H:AM4PR05MB3425.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: BCL:0; x-microsoft-antispam-message-info: k+gZu4rTkjMRo/UYvp4+u/6jtMPRoLLV5zmg13BKQz7W+i79ta6AHzU1MlY5OQhLR8/MY+Xy9x6LYnppydNjOKHXk3hqwn6jWauANDUTb9E6eH3yHWnKjclpzfsKBTjMx/AaE7OvC+VyhbabGtSarwL8fvTyxs1vMjiicCj9ozRctN+okcWx+n5n2pu4GxXKAQeoLkUDiWnAzafu21bembSrmcv/aKNgxCsuWSyQXndIoKp4Zz7l5TKdUzYkVJ4GC9InWmitsjal7/zlyM+ZzxIsUtTMAMqrXdMIt9g+GBN/9l+ULM4cB109mTWAkhUwxrTlvjHNidTMOavgHUeUR3tBUPuJ64UlUmog+nTDomNT2f3Zygc9j3JzmL3XsDC4kM2EH/4GUHV2EgDLZn9wy6Cg7piTwXTYLNW9r5jSqAErtfME78Cr3tHrS//LgMOQw7rHwIx7BLNC3kIfUQhvLndAPwt6Kc4IeE72sWQ3fSj3tgzpJHdf4GsQ3z85pOfSuQvQUBCcGMMzJl7yyl+Jtl8EEWODtsYiAsyy16+P3lE= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Mellanox.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4b9cefcd-eaea-4acf-24ae-08d794cd4788 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Jan 2020 06:29:28.4136 (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: Joxo+3YWOdAOunkw0HlizE/WP/mB4WnvtRnRRy5aNmc96L08+jDME+eVRr+0ffwnTXe6vNKfAJXKlHNXh1ffSg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3347 Subject: Re: [dpdk-dev] [PATCH v2 01/10] app/testpmd: parse flow command line for ESP 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, > -----Original Message----- > From: Iremonger, Bernard > Sent: Wednesday, January 8, 2020 6:17 PM > To: Ori Kam ; dev@dpdk.org; Xing, Beilei > ; Zhang, Qi Z ; Doherty, > Declan > Cc: Ananyev, Konstantin > Subject: RE: [dpdk-dev] [PATCH v2 01/10] app/testpmd: parse flow > command line for ESP >=20 > Hi Ori, >=20 > Thanks for the review. >=20 > >=20 > > Subject: RE: [dpdk-dev] [PATCH v2 01/10] app/testpmd: parse flow > > command line for ESP > > > > Hi just small comment inside. > > Thanks, > > Ori > > > > > -----Original Message----- > > > From: dev On Behalf Of Bernard Iremonger > > > Sent: Tuesday, December 17, 2019 12:16 PM > > > To: dev@dpdk.org; beilei.xing@intel.com; qi.z.zhang@intel.com; > > > declan.doherty@intel.com > > > Cc: konstantin.ananyev@intel.com; bernard.iremonger@intel.com > > > Subject: [dpdk-dev] [PATCH v2 01/10] app/testpmd: parse flow > command > > > line for ESP > > > > > > add ITEM_ESP > > > add ITEM_ESP_SPI > > > add debug to cmdline_flow.c > > > > > > Signed-off-by: Bernard Iremonger > > > --- > > > app/test-pmd/cmdline_flow.c | 37 > > > ++++++++++++++++++++++++++++++++++--- > > > 1 file changed, 34 insertions(+), 3 deletions(-) > > > > > > diff --git a/app/test-pmd/cmdline_flow.c b/app/test- > pmd/cmdline_flow.c > > > index 99dade7..f1b0610 100644 > > > --- a/app/test-pmd/cmdline_flow.c > > > +++ b/app/test-pmd/cmdline_flow.c > > > @@ -213,6 +213,8 @@ enum index { > > > ITEM_TAG, > > > ITEM_TAG_DATA, > > > ITEM_TAG_INDEX, > > > + ITEM_ESP, > > > + ITEM_ESP_SPI, > > > > > > /* Validate/create actions. */ > > > ACTIONS, > > > @@ -746,6 +748,7 @@ static const enum index next_item[] =3D { > > > ITEM_PPPOE_PROTO_ID, > > > ITEM_HIGIG2, > > > ITEM_TAG, > > > + ITEM_ESP, > > > END_SET, > > > ZERO, > > > }; > > > @@ -1017,6 +1020,12 @@ static const enum index item_higig2[] =3D { > > > ZERO, > > > }; > > > > > > +static const enum index item_esp[] =3D { > > > + ITEM_ESP_SPI, > > > + ITEM_NEXT, > > > + ZERO, > > > +}; > > > + > > > static const enum index next_set_raw[] =3D { > > > SET_RAW_INDEX, > > > ITEM_ETH, > > > @@ -2593,6 +2602,20 @@ static const struct token token_list[] =3D { > > > NEXT_ENTRY(ITEM_PARAM_IS)), > > > .args =3D ARGS(ARGS_ENTRY(struct rte_flow_item_tag, > > index)), > > > }, > > > + [ITEM_ESP] =3D { > > > + .name =3D "esp", > > > + .help =3D "match ESP header", > > > + .priv =3D PRIV_ITEM(ESP, sizeof(struct rte_flow_item_esp)), > > > + .next =3D NEXT(item_esp), > > > + .call =3D parse_vc, > > > + }, > > > + [ITEM_ESP_SPI] =3D { > > > + .name =3D "spi", > > > + .help =3D "security policy index", > > > + .next =3D NEXT(item_esp, NEXT_ENTRY(UNSIGNED), > > > item_param), > > > + .args =3D ARGS(ARGS_ENTRY_HTON(struct rte_flow_item_esp, > > > + hdr.spi)), > > > + }, > > > /* Validate/create actions. */ > > > [ACTIONS] =3D { > > > .name =3D "actions", > > > @@ -6052,6 +6075,9 @@ cmd_flow_tok(cmdline_parse_token_hdr_t > > **hdr, > > > static void cmd_flow_parsed(const struct buffer *in) { > > > + printf("Flow command line parsed successfully for > > > command=3D%d.\n", > > > + in->command); > > > + > > > > Why adding this printf? >=20 > It is useful to know that the parsing of the flow command line is success= ful > before going into the PMD code. > I will remove in the v3 if you think it is too verbose. >=20 I think it is to verbose, due to the fact that in normal case the parsing w= ill succeed, Which means there will be a lot of print (In our testing we can have more t= hen 200K commands).=20 So I prefer to remove it, but if you think it is critical you can use the v= erbose_level with high value. If you remove it feel free to add my ack on v3. > > > > > switch (in->command) { > > > case VALIDATE: > > > port_flow_validate(in->port, &in->args.vc.attr, @@ -6230,14 > > > +6256,15 @@ flow_item_default_mask(const struct rte_flow_item > *item) > > > case RTE_FLOW_ITEM_TYPE_GTP: > > > mask =3D &rte_flow_item_gtp_mask; > > > break; > > > - case RTE_FLOW_ITEM_TYPE_ESP: > > > - mask =3D &rte_flow_item_esp_mask; > > > - break; > > > case RTE_FLOW_ITEM_TYPE_GTP_PSC: > > > mask =3D &rte_flow_item_gtp_psc_mask; > > > break; > > > case RTE_FLOW_ITEM_TYPE_PPPOE_PROTO_ID: > > > mask =3D &rte_flow_item_pppoe_proto_id_mask; > > > + break; > > > + case RTE_FLOW_ITEM_TYPE_ESP: > > > + mask =3D &rte_flow_item_esp_mask; > > > + break; > > > default: > > > break; > > > } > > > @@ -6327,6 +6354,10 @@ cmd_set_raw_parsed(const struct buffer *in) > > > case RTE_FLOW_ITEM_TYPE_GENEVE: > > > size =3D sizeof(struct rte_flow_item_geneve); > > > break; > > > + case RTE_FLOW_ITEM_TYPE_ESP: > > > + size =3D sizeof(struct rte_flow_item_esp); > > > + proto =3D 0x32; > > > + break; > > > default: > > > printf("Error - Not supported item\n"); > > > *total_size =3D 0; > > > -- > > > 2.7.4 >=20 > Regards, >=20 > Bernard.