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 2A0F1A04F1; Wed, 11 Dec 2019 10:31:22 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3B4BF2C6A; Wed, 11 Dec 2019 10:31:21 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 3A59891 for ; Wed, 11 Dec 2019 10:31:19 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 11 Dec 2019 01:24:35 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,301,1571727600"; d="scan'208";a="207611427" Received: from fmsmsx103.amr.corp.intel.com ([10.18.124.201]) by orsmga008.jf.intel.com with ESMTP; 11 Dec 2019 01:24:35 -0800 Received: from fmsmsx154.amr.corp.intel.com (10.18.116.70) by FMSMSX103.amr.corp.intel.com (10.18.124.201) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 11 Dec 2019 01:24:34 -0800 Received: from FMSEDG002.ED.cps.intel.com (10.1.192.134) by FMSMSX154.amr.corp.intel.com (10.18.116.70) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 11 Dec 2019 01:24:34 -0800 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.108) by edgegateway.intel.com (192.55.55.69) with Microsoft SMTP Server (TLS) id 14.3.439.0; Wed, 11 Dec 2019 01:24:34 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bxG/rYw9AyYtdolCPwf3CnBAWKuHRRqfIGbuWZ8THN+Km7Xs5HF7IHBiBuEOk559hn/BZAaPP+x3kf5YsPJzJ/9B1kyjj6lbCfcK9YPtadRYbVn2a0346Jt6xxJh+xiHelq5NqaH8MycvTtNagOIBpxKrPXavBRtVQgH+0HUSLQIi45q5WM5fd02FeV6qbw+7nNkNY01JtCks21+v8oWLbaw+/2yt27wof6zLR9hdJ1Q59O1S/6Lrfj7LV21j628/Bob9OQrVDZ9I21+M2pwtkNEbuCFJtyRxvW9vDZcsVeCsFUJRjx/XBlO0KNtAL69WR8zcOnI8GssWW9LpDSApQ== 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=I8HjeT0dtnOhAT6NPrpWthQS4CtzoXbtcDnQmrgifbI=; b=VSRb0kIVlAYSS8qT+2s8KN4wDUKC9c9QbErnO+Fy+BKE2xS9jqVcQU9nL6ztqsX0X6c01fLPseHOiq38JxNLL5yAxm4gh+Gr3uOWGV1ucpvh46fsgn15Sxbsj4ITdTOJnWsVE3LgzY6DupqmrxcDNB6ZZCqRiKuinNM8CqP+Zu0qbGkKuowENlKZBVSqnSiJt8RaKD/0+zYU1YL7sXz8qknckIGcCvDr24kpNhc0UXdVILpgk+I0HpH1AW6fZ4CTUESM6c4owpeHuThLVTRJBoRZHh2pSTeP/y2bAVI4/v1Tls6VDkCSYE+VtVcCACnPJHoHwRf31/M5Sf8AbqfDDg== 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=I8HjeT0dtnOhAT6NPrpWthQS4CtzoXbtcDnQmrgifbI=; b=JuhLExkmH+99IESRspMVQpzBgkxY54+xX6ijCMefncNaNa+YRzZdoJjEm9LoBOgebNC/DJMhBfm3WoRn3EQhg4sP272RKCHTimYANe0nFi2i3BXl3Tn9vy6bak5uu4Bo2iLUnTPR8pGAv9MV7NAmZfP80Ft5jR9ktlZbFLsbRYo= Received: from DM6PR11MB3914.namprd11.prod.outlook.com (20.176.126.24) by DM6PR11MB2636.namprd11.prod.outlook.com (20.176.100.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2516.12; Wed, 11 Dec 2019 09:24:32 +0000 Received: from DM6PR11MB3914.namprd11.prod.outlook.com ([fe80::d89f:b399:7ceb:c3dc]) by DM6PR11MB3914.namprd11.prod.outlook.com ([fe80::d89f:b399:7ceb:c3dc%5]) with mapi id 15.20.2516.018; Wed, 11 Dec 2019 09:24:32 +0000 From: "Iremonger, Bernard" To: Ori Kam , "dev@dpdk.org" , "Xing, Beilei" , "Zhang, Qi Z" , "Doherty, Declan" CC: "Byrne, Stephen1" , "Ananyev, Konstantin" Thread-Topic: [dpdk-dev] [PATCH 1/9] app/testpmd: parse flow command line for ESP Thread-Index: AQHVr1mWo1smhIIjV0y7itjul40XPqez3jyAgADMAaA= Date: Wed, 11 Dec 2019 09:24:32 +0000 Message-ID: References: <1575982632-23059-1-git-send-email-bernard.iremonger@intel.com> <1575982632-23059-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: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOWZjOTg0MmUtNDY3Ni00MzBhLWI3MTUtZTRjY2UwZmM1Y2Q4IiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoick1YRlJodWxJMGlGYXIwUW45WklWK2ltcVc1U0lYRWdmMWtWelk0MWVTMHVWdXd6SlFiZjUrb2dXQ3Y3WW5ucyJ9 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.188] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 0c307540-2ae7-4174-ce22-08d77e1bee4e x-ms-traffictypediagnostic: DM6PR11MB2636: 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:86; x-forefront-prvs: 024847EE92 x-forefront-antispam-report: SFV:NSPM; SFS:(10019020)(136003)(366004)(346002)(376002)(39860400002)(396003)(189003)(199004)(15404003)(86362001)(66446008)(52536014)(2906002)(6636002)(66476007)(5660300002)(478600001)(110136005)(66556008)(81156014)(54906003)(64756008)(81166006)(6506007)(7696005)(316002)(9686003)(8676002)(33656002)(55016002)(107886003)(76116006)(8936002)(66946007)(26005)(186003)(4326008)(71200400001); DIR:OUT; SFP:1102; SCL:1; SRVR:DM6PR11MB2636; H:DM6PR11MB3914.namprd11.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: KfLSlGGchWRGeotbYafmbMEeeYDQh/8OMonkHRmNPBgLETidIofEAy/IvUsa6VGIPKnnvuc9UEClhu7izI2Ya3LUXoRVVP2hXXjuut5zB4EG2aAxAYgFzn2oSUigISiBDmGpznaWBCdhuxJrkwRQFE+mq/YWkVu3WqsY0R71BYUpYeYiNldzhSHSqgWXKrTY3J4vXvOU7sW95kO82SKEzqvBsS1hYyl6eW3IxqsPYq2aZFqJRycUQuQwbZ1QYxTKi9QW+oJzIyh47SR/UgZ9Nk5c/GghOkhLr20AuEIr/QdqjFD3ZyMeV74yqO2ivIzALFncPuvnOInW7oE3cEwh5/daJxnFQoj8BERH3VXE9tmv8yr302RqNPPdm+vomczjaKAkgyCttuTVPPCW+das0LokDxaRKTDWo/IshPJ8cuXPlioqclmM9EEhPfPvNrNRquAv63PJHlhheLMwCFk0nHVx56O79Q68WLsow1Js2NZuat6xVHNasaeaO3R3ToMg Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-MS-Exchange-CrossTenant-Network-Message-Id: 0c307540-2ae7-4174-ce22-08d77e1bee4e X-MS-Exchange-CrossTenant-originalarrivaltime: 11 Dec 2019 09:24:32.2024 (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: 1FNFs1VAnOXWIts9vHg9kAOGMcws6o9T7xiExSbDCBBbewJu8wrMRcQ5OMIFzobnDkA9zAiBGMNQI7IUi47m7LD3H/6tdyJ849587NstPM4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB2636 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH 1/9] 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: [dpdk-dev] [PATCH 1/9] app/testpmd: parse flow command line > > for ESP > > > > add ITEM_ESP > > add ITEM_ESP_SPI > > add debug to cmdline_flow.c > > improve debug in config.c > > > > Signed-off-by: Bernard Iremonger > > --- > > app/test-pmd/cmdline_flow.c | 37 > > ++++++++++++++++++++++++++++++++++--- > > app/test-pmd/config.c | 2 +- > > 2 files changed, 35 insertions(+), 4 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); > > + >=20 > Why did you add the printf? Debug? >=20 > > 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; > > diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c index > > d599682..2753ec5 100644 > > --- a/app/test-pmd/config.c > > +++ b/app/test-pmd/config.c > > @@ -1303,7 +1303,7 @@ port_flow_complain(struct rte_flow_error > *error) > > errstr =3D "unknown type"; > > else > > errstr =3D errstrlist[error->type]; > > - printf("Caught error type %d (%s): %s%s: %s\n", > > + printf("%s(): Caught PMD error type %d (%s): %s%s: %s\n", > > __func__, >=20 > I don't think this change is relevant for this commit. This is useful information to have when testing/debugging. I will move it to a separate patch. >=20 > > error->type, errstr, > > error->cause ? (snprintf(buf, sizeof(buf), "cause: %p, ", > > error->cause), buf) : "", > > -- > > 2.7.4 >=20 > Thanks, > Ori Regards, Bernard.