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 9F938A04F0; Tue, 10 Dec 2019 22:12:07 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id A2A1C23D; Tue, 10 Dec 2019 22:12:06 +0100 (CET) Received: from EUR02-HE1-obe.outbound.protection.outlook.com (mail-eopbgr10085.outbound.protection.outlook.com [40.107.1.85]) by dpdk.org (Postfix) with ESMTP id 52C9AA3 for ; Tue, 10 Dec 2019 22:12:05 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RTKLWz7eX7qOLDhmXkrYd0v0WaBvvB0Pysej2lxvA6NArTIcdoLggKw7UJoiEdBgXP5v2kuywZLh+EqfxIf/OwH5mzGagKke3rYz26qB2HTetbAF1Fj7P4uCfOL1zPKtUD2EEMnIYrBPgAkjK3763qskVEZltN92DkESUA7R4jWot6X651qXbq9undCBUTPhb/2q7Xh4cPEN8abo5wD3yZoZoumgCPxjwDJNlGWbag1HeANjNX1Q7Z5S1Ctflb1K1JzdXJB0DEFg05QfSJEBdNLwotUmHDJWkAk7Ja8h0Kg8yDVg76sjnV7eMqfADyhA99chEbEYDKrdG48MXdAnow== 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=XsaBSgmW/c2saDt0F8sKz21BOotiOGkHv7GfO3NZyy4=; b=Y4T3zPrLhNvfyalh6cl+0FdKiJ0+EnW1KBoMTgD2qZnz16EhBkrD4wxXFkUkL5DeL5rIFQr8+CiCALBdK05F/faTS6RV5ox3m3lhXvPZa+cQ3CWKrB25wqttIC/eONPTmNBQgoLaO5Mjn6DoPgAW1dlWb1CfZJiOkHzaRnRnNxG4y/PDfbqgDj9M42nwiK4wsOumGvcFt3xi2dtsLF7Bnw7jEzdL4lM40JocOOW7JX2Qh962tr9hjglJ1cauRIdzRwTj42JuZeoWx0fXXzLTGhAudm4LOyPNU5HODhTVX4eER5kBFTFUebC2ISzGhP5yCesqATbBWYKc5JPbgAf/9g== 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=XsaBSgmW/c2saDt0F8sKz21BOotiOGkHv7GfO3NZyy4=; b=hGW8OJF3t4PD8sKAO9Uu1tTy5MGWsnT2ACtptmASE8OVdGZv81dPnsGEz1turhd2LLUDuucT/bmHogl+7TFwnOuHEr8QRqz7gXLp2yqrtIzuB0Z8rsJXMi0ugg6KIJAAdgtOSZiTvk0wRweVm3W2s6YiMxaUrQHF0Iz6/BRsu10= Received: from AM4PR05MB3425.eurprd05.prod.outlook.com (10.171.190.15) by AM4PR05MB3348.eurprd05.prod.outlook.com (10.171.187.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2538.15; Tue, 10 Dec 2019 21:12:03 +0000 Received: from AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::d877:95ed:5f94:a4a]) by AM4PR05MB3425.eurprd05.prod.outlook.com ([fe80::d877:95ed:5f94:a4a%3]) with mapi id 15.20.2516.018; Tue, 10 Dec 2019 21:12:03 +0000 From: Ori Kam To: Bernard Iremonger , "dev@dpdk.org" , "beilei.xing@intel.com" , "qi.z.zhang@intel.com" , "declan.doherty@intel.com" CC: "stephen1.byrne@intel.com" , "konstantin.ananyev@intel.com" Thread-Topic: [dpdk-dev] [PATCH 1/9] app/testpmd: parse flow command line for ESP Thread-Index: AQHVr1l41S1ktdi150Ghd3ulrKK+j6ez2FNQ Date: Tue, 10 Dec 2019 21:12:03 +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: <1575982632-23059-2-git-send-email-bernard.iremonger@intel.com> 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: 77d6782f-495f-48f7-037b-08d77db59ad1 x-ms-traffictypediagnostic: AM4PR05MB3348: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:53; x-forefront-prvs: 02475B2A01 x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(366004)(376002)(346002)(396003)(136003)(39860400002)(13464003)(15404003)(189003)(199004)(478600001)(76116006)(2906002)(186003)(86362001)(66946007)(66446008)(64756008)(26005)(4326008)(66476007)(66556008)(8676002)(81156014)(81166006)(71200400001)(7696005)(8936002)(52536014)(33656002)(316002)(110136005)(54906003)(9686003)(55016002)(6506007)(53546011)(5660300002); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3348; H:AM4PR05MB3425.eurprd05.prod.outlook.com; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A: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: xawN05kjKVgKE5Zho3/eKhJLRQH9Xn/Y2uX6EfZ7paoxJmUDSmzSlwmIUzE/dErB0Db1w6JbYiLRR00mzaZM4CmUf0OurCekY6TGGxAEG4qhgVAcioiv8E/np3oJVdlfnDHNuZOuwLp464Fm8QFPVehv2gTg+1LHsgl1EYjsGgZ6oWLtx4QwzlsjwsNXyCuKRN9HWU0XUdHuvQWYBcZ2GoRJCl4SA5Mp+uQQAGeVlH4Dq/HBRcCTfCIMdXYeIVt75pt/ATlC0fBVINjKCO7L9Cb+wU8rhVaNJZEtfSVBVy+f658qLxRe7i2v/QEoC70w80l4KnRpumplx0WrjILm0Or2ZkieSZbz4r/qkmUdRrtCrChuXJqkOV6tT/8LCdr74B9/7NAWyjCGUmk2WpwHjkO36QCvKDRS9l3SyjYiUIjKNTeR0cSNhNVE1Q5udhhnO1EIRlud2Hk3HOp82dsMFUvP1evPb2r/sC5xQF6f6qUUExRhCUWVEPREvUm38icBgQ8is15IGXkFvsJN+mFt4w== 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: 77d6782f-495f-48f7-037b-08d77db59ad1 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Dec 2019 21:12:03.4837 (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: lF9felMkB9GqBzaFifuVoFWCLCYy+uhtEiWDV+yGbjvZvdyAgCezkXAeyQSZhgiikf6AMieeMBbXyIZiU48wCA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3348 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 Bernard, > -----Original Message----- > From: dev On Behalf Of Bernard Iremonger > Sent: Tuesday, December 10, 2019 2:57 PM > To: dev@dpdk.org; beilei.xing@intel.com; qi.z.zhang@intel.com; > declan.doherty@intel.com > Cc: stephen1.byrne@intel.com; konstantin.ananyev@intel.com; > bernard.iremonger@intel.com > Subject: [dpdk-dev] [PATCH 1/9] app/testpmd: parse flow command line for > ESP >=20 > add ITEM_ESP > add ITEM_ESP_SPI > add debug to cmdline_flow.c > improve debug in config.c >=20 > 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(-) >=20 > 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, >=20 > /* 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, > }; >=20 > +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 did you add the printf? Debug? > 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__, I don't think this change is relevant for this commit. > error->type, errstr, > error->cause ? (snprintf(buf, sizeof(buf), "cause: %p, ", > error->cause), buf) : "", > -- > 2.7.4 Thanks, Ori=20