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 7F4B3A046B; Thu, 9 Jan 2020 10:16:28 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B3D501DBE5; Thu, 9 Jan 2020 10:16:27 +0100 (CET) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 30CD11DBE3 for ; Thu, 9 Jan 2020 10:16:25 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jan 2020 01:16:24 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,413,1571727600"; d="scan'208";a="423191645" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga006.fm.intel.com with ESMTP; 09 Jan 2020 01:16:24 -0800 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 9 Jan 2020 01:16:24 -0800 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (104.47.56.169) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Thu, 9 Jan 2020 01:16:24 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZWIffayhDa17p5s6hvk+hxh4A1+HUjn+TaMp4mio0g1r1LboOlNiN8hakJptMLTjXceJabvQwAlDKVkOGxFppsuXaNQJnkInIOZ3KpA7fM0K+8bAC4B7jpYP2ILSy6MPrkXwh0UuQy593DTlYjw432CUJQlAcPp4dgzCd6lpoSvJzql8jUWdrgMzj5VdNPRdxHYCCUt5HftY/V7TeqwFi6GAE8xe1A3sN+hN+R9i0+WVGXI4lMeFy5ay2mdPZ1CED5UMp0D0nCG6MSapvSFBaBXFViKago925KQn7mu8CwaeJkv1y9YNzMlEPiQJLuret6MhsSBF9tZ/aOeEAh4Q0A== 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=2jkfTDMUia2QFziC9y17TOz/tJryUeTjSfV/NHcPMrk=; b=QSS0eDlcSuBpeTLUemkNpzI+7mC/9wWCzJUWtVoAOHntiJl4Vu7oGoy9ZHPaeejm72plCOS+kmLXUSi/mKY9jMjAzNPZIiDrlEn9kfDY44RuzHNA9HZ12WDg0MkOwefRHqfaf4CIuB/6inbEwsJ6dQeviwp9o6bBN1dukqgQLLv5GH8XmNLM4Jb+Bqe0QRdEfWn70OdoRSR2R4wx7JK67uBPp4oyP2DhoQQibNydCY7dwgOg2CadbvLmnFeNXcGRRcFqKfU8SpTeeOQ3jwtzKCog8M26+Y9zyGP/o8G27sTk+YAUqX2rWslMDXWdFYsnRsv+vUrqPsN87jGTG22XXA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=2jkfTDMUia2QFziC9y17TOz/tJryUeTjSfV/NHcPMrk=; b=vXkQxTVkZS4kYogTf2NZvu419/11vHkh89G4RmAWlyNgNKUBkiiJaj6JhkgVR2c5IBlahmMhj+LWHs7bhvv/GYwqmYItpzv4RotedvW6pY2UZNlJhMRmrAg3KtNN3/D/y9zH0Ji2O16sArfgngpVPgyUBu3DeAQJxb6exBmWRVw= Received: from DM6PR11MB3914.namprd11.prod.outlook.com (20.176.126.24) by DM6PR11MB3338.namprd11.prod.outlook.com (20.176.122.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2602.15; Thu, 9 Jan 2020 09:16:23 +0000 Received: from DM6PR11MB3914.namprd11.prod.outlook.com ([fe80::29bf:9a8f:7bba:dd26]) by DM6PR11MB3914.namprd11.prod.outlook.com ([fe80::29bf:9a8f:7bba:dd26%6]) with mapi id 15.20.2602.016; Thu, 9 Jan 2020 09:16:23 +0000 From: "Iremonger, Bernard" To: Ori Kam , "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: AQHVxjIfztr0l6FXDkOlg6dlbZfwH6fg8CtAgADvugCAAC4GAA== Date: Thu, 9 Jan 2020 09:16:22 +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: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZmQ3N2Q3NjItYjVkMi00NDQ5LWEzZDctZmQzNDY4ZmE4NjkzIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoidE9TYWx5N25uVW5JelNKSmU0MFZcL25zUjFWVGcyNGd1WllpMmh1dEE5a1pBYnRjWHNnN0FzaHJjNUZiYVh5RVAifQ== dlp-product: dlpe-windows x-ctpclassification: CTP_NT dlp-reaction: no-action dlp-version: 11.2.0.6 authentication-results: spf=none (sender IP is ) smtp.mailfrom=bernard.iremonger@intel.com; x-originating-ip: [192.198.151.185] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 7d4ddaaa-285b-438f-871f-08d794e498a3 x-ms-traffictypediagnostic: DM6PR11MB3338: x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 02778BF158 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(346002)(396003)(136003)(39860400002)(366004)(376002)(15404003)(13464003)(199004)(189003)(51914003)(64756008)(66556008)(66476007)(66446008)(107886003)(71200400001)(7696005)(5660300002)(316002)(66946007)(26005)(53546011)(2906002)(33656002)(76116006)(6506007)(4326008)(52536014)(186003)(6636002)(110136005)(81166006)(81156014)(9686003)(8936002)(55016002)(478600001)(86362001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM6PR11MB3338; H:DM6PR11MB3914.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; A:1; MX:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 5imO+t6Q5L59ouSzSP4comcCOYXMOug7Sn6FL28JMZI13mDWWo9gSK9oxGYmrojwWcONqBhpwqO3W44r7wKdL82SDdstMI46U6G1NUPBGPFHNGljxASYgRHEQz6VNbokpyHQOSe0MXfCQ3FFXO0H3cyrdb4C/tGeCf3E3ats2VsTf/GBPCrx0E+jxJUJRdBJyAHGdUKcJ3VksdyODoM2Vu6XfitycCWiWwY+hHDUUHV47cQLtBBWRp0otRMUFU0W/ztV6KRLY6FPoItMBCuY6r/WoaCFxh2V81syPktZxRZCaszbm3WXLdfbCQNov09MkERAf8CKvCcmLDapSgyvZOnpoFVbeu03qLuqzn9Vakh14uIkETTT1w8YNzNTZiBFxdGGnH0F43zSOp4wxyAOUqs9I2vgF4deIp99zOMRMtLGDVqIXcicyyXEE4uJR0Z3CeUT15PqkGdKCtYERZLNTUVH+1XTwh6K2vWJDtGm9hd59eYEx2FQuZVfOwUl+iuVM8NLRfhspW9Q+8+M3ZP5W3sqjmb+V7U5w4VKfbPLNPA= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 7d4ddaaa-285b-438f-871f-08d794e498a3 X-MS-Exchange-CrossTenant-originalarrivaltime: 09 Jan 2020 09:16:22.9493 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: oqa8pkvl1erHSZ8PpfExtVMCOx10v8jWs9yYYIL0I7ghCHvL0UKWaNa2z3Fyvv1lvc7s3hxQ2f5L9IbIJL7+/N4qaXVvbZK2+Zp11fNWIBw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3338 X-OriginatorOrg: intel.com 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 Ori, > > Subject: RE: [dpdk-dev] [PATCH v2 01/10] app/testpmd: parse flow > > command line for ESP > > > > Hi Ori, > > > > Thanks for the review. > > > > > > > > > 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? > > > > It is useful to know that the parsing of the flow command line is > > successful 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= will > succeed, Which means there will be a lot of print (In our testing we can = have > more then 200K commands). > So I prefer to remove it, but if you think it is critical you can use the > verbose_level with high value. > If you remove it feel free to add my ack on v3. I will remove it and add your ack in 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 Regards, Bernard.