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 EB664A04F3; Wed, 8 Jan 2020 15:43:31 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2CFB21DA48; Wed, 8 Jan 2020 15:43:31 +0100 (CET) Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70044.outbound.protection.outlook.com [40.107.7.44]) by dpdk.org (Postfix) with ESMTP id BB2631DA47 for ; Wed, 8 Jan 2020 15:43:29 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=itadKt9a/3OD1x65JZi4pvzTIgHyz7xIKcgDtSUqPRoRLEBdgDFO6CNut0/uuD2KTr5rSWrb2HgTSTNTA93PfTn+J2AfTJhyhMTmr6EvbtJXuzRhv6xREW2z2gF5LFRPe7WZlJ96Sm6F+7921z4uPc8kFI9xq85E63IhKzILRlL3ulPRVmvy2krkcxVVwhwFqcPWbRvF/EdBKsT8L+tqBJEwNWqjCYLDlOw4rACZ7wK3AmYjZyMqHUA2UIYfYKtw8ZVe650urx6n7o2PMKNi2ObXgYOMApqgdcUhwXH3JCkQzpnUxJe8HsVbe5w5s1SEcWtDdD9zcOTLe7gJutICRQ== 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=O/7KBxSHbTNBc7TeL7CvV4i5Zw160qssM2/OJ/D7mfo=; b=ZTfJjpSo9Ojg2lRRwnXHKEBhy6V1hz70A2Pqq15Y1KT9faJzV0kdajlBenZpY+Mj0ljhUAQYZj+PgaiakidskrfjW48ub2fq6acowKnl6wJLnBzoMOePO/FUop4Q2IodQu5jpGvp7LMx88/M32u0ld+UegK57dBKNQ5/hV6FUDKiDLtGA9q2ILs+MOmLQpMoH9PmZBNshR4iqkqp4Z7SoIchFAyfvLT88nLbq66jrdR9GK2mLKwicnu3FmgRSzC12XbUhmVIEF07RaAU9NEEqxWUsdUjagXMXDRKN2xZVrd5e+PgC8FNc18ja5hz/Ek60izPQljFJu7lIvEseUn1tA== 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=O/7KBxSHbTNBc7TeL7CvV4i5Zw160qssM2/OJ/D7mfo=; b=Ar4IXgbPTh2GotxwNZuJg/oSt0lrtA5pglTPguRP3DJ3vUuTyZRMTUeuo125kLrNKiyHB52dxF1/t+ClOrCWNP+dVXplM3zhuiqYSq9KquOWhBT0YCIp2WaUB3yB0JXoOeFUPF+UrAa0096maKowJrcfpqd5h0qMqN3uldyCzX0= Received: from AM4PR05MB3425.eurprd05.prod.outlook.com (10.171.190.15) by AM4PR05MB3345.eurprd05.prod.outlook.com (10.171.189.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2602.12; Wed, 8 Jan 2020 14:43: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; Wed, 8 Jan 2020 14:43:28 +0000 From: Ori Kam To: Bernard Iremonger , "dev@dpdk.org" , "beilei.xing@intel.com" , "qi.z.zhang@intel.com" , "declan.doherty@intel.com" CC: "konstantin.ananyev@intel.com" Thread-Topic: [dpdk-dev] [PATCH v2 01/10] app/testpmd: parse flow command line for ESP Thread-Index: AQHVtMMHdw/3QfgdykCI0j7O8SqtOKfg+FOQ Date: Wed, 8 Jan 2020 14:43: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: <1576577756-648-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: 9c741035-aaed-4677-7562-08d794491fcd x-ms-traffictypediagnostic: AM4PR05MB3345: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2043; x-forefront-prvs: 02760F0D1C x-forefront-antispam-report: SFV:NSPM; SFS:(10009020)(4636009)(346002)(376002)(396003)(366004)(136003)(39860400002)(15404003)(13464003)(189003)(199004)(33656002)(9686003)(316002)(8936002)(81156014)(81166006)(478600001)(110136005)(55016002)(53546011)(6506007)(5660300002)(66446008)(7696005)(64756008)(52536014)(186003)(66556008)(66946007)(71200400001)(86362001)(2906002)(26005)(76116006)(4326008)(66476007); DIR:OUT; SFP:1101; SCL:1; SRVR:AM4PR05MB3345; 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: bDyTv+ppFdITKTOvnw4BZ32j0MBAKxDc4K8HLmg7LUx4rAq4upA6+lfzcsyuRLHrfk6qR/SqGDZ5GWdeGX6bjtvpi+61h1M3zRUvJp6hz0RTMB283Bi9ZK+3b/36ub8mtGRVcDWpmAFIabuQQGOGDQNanEQavchIIH+qbk9zPf875VVPr5jkZmCKk8X0iomY3jVuH6frzI2IZ9Snpm/JgiK9kc5QSoEIcM3bXG9DTMverv+n0+ZNDWEf+299UvHIOoHklphK1mpoMueuAywxu4EQzZSu5Tyqxr2U6tZPpyad0FBr/W7zPY4joEGmT9Qg7dCQAQOH8DMG3FEipfJvXdPTwVgWjNUN68/668MjAnXb7FS6g4JZ+XeJRifJll6nLKFS3cXdVtOUsoPSgwOkqlLGQ+aQFiMZnN5XDlmKDmNr1wtEMXU0cNb35bKIHHHUtpRwU2AfbYjLiVkmeM9qXZY3wPGFN69Sec3dbNW3H6zolJLD6hOSIE1hor67Ox1TK03df0T9umB+ybH+DsM8dw== 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: 9c741035-aaed-4677-7562-08d794491fcd X-MS-Exchange-CrossTenant-originalarrivaltime: 08 Jan 2020 14:43:28.1837 (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: TXa/ZnxRDixO2KM0VXfto83GAunvuuqWGVBIUO7mZei0GRuvVgD3hegYSXCdpo6IiNLJuwWzSjWcb2ufUwjQPw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM4PR05MB3345 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 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 >=20 > add ITEM_ESP > add ITEM_ESP_SPI > add debug to cmdline_flow.c >=20 > Signed-off-by: Bernard Iremonger > --- > app/test-pmd/cmdline_flow.c | 37 > ++++++++++++++++++++++++++++++++++--- > 1 file changed, 34 insertions(+), 3 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 adding this printf? > 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