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 90641A0562; Mon, 30 Mar 2020 10:57:24 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 5187C1C08C; Mon, 30 Mar 2020 10:57:23 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2051.outbound.protection.outlook.com [40.107.22.51]) by dpdk.org (Postfix) with ESMTP id A08C41BFD9; Mon, 30 Mar 2020 10:57:21 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=dXS5ePA+yOGAqZGvJj3lWRh5eP2J4HAY1m8/s98q7sjZSqQAeTCfSxACqVYAVe2tyrMF7ogtgqSS50CSRYq+KhUapbu1TsCarKF7yHEBJz8N5+DKXhX91WY/MEX031IbT0roLzdHFpqbi3uNKq+/0dBSxRIFUPKhp+B5uO6qKIv+ibz50pNBi5q21Ym2ENSKkUdEYk8D64IrZSoatJ7mC7I+HzKj3tDRX8xVVVLwEq0v6Gre6prBKrDw7ny0TC4pWITHtAyUCYHC6S3Z802A/XWLlBdxk8XKgN1LFl37OsIsASXusvzCc8doTSi10SJX3+riTNvbSJuIaLGXeujzAw== 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=+IEwHsl1s7ZTVnvMCVP90tOEkKdcJwF9UnxeDjtJ3j4=; b=bd67hLzQDrVEgKuBHwONLZ///tu52r2oGAbNqxgxzcVJcbu5FWBTHewpjIOzVKZMsOYyCOYTEgT1F4j4kz2f/hSYuF0S6ydhnHdoVqODxHmXzKwWu/G/t6/zE2qW0sFBHuXF6pJSpfEx2xg4Lj0C2v7D8nx10jcIGM+o8PEPo1oAIv3BbJTo9a4mG2RSlO0JywMEq98sTZmRDuWL14/BF910JaA37FY59RCV88ITi+nxZ25zP0U2VPYJXWBT45M36UolTUjpFHCTWeYFWDwymjx2/H53kAIZAOBqRmPYx3rU76L8X2+eEiZM2EYtYrmzMitaA07lJtTRN1yMQCdBpw== 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=+IEwHsl1s7ZTVnvMCVP90tOEkKdcJwF9UnxeDjtJ3j4=; b=kDA7xtPIxUP/eGvXv9GYmdkBG9aUlzbNs2kJWj1x5jCfFYikJ4Zmcj/z19Q0fTmspB5ioNUas30a92CdvWiL3AkHEbMUQF3zCaEuGftok+2NspUmN6mywFTDBVqp1uZo3D67tbBnYK44ToOQHL+ld9SSwaccNdYtTkAxYHhqZwc= Received: from AM6PR05MB5176.eurprd05.prod.outlook.com (20.177.196.158) by AM6PR05MB6086.eurprd05.prod.outlook.com (20.179.0.17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.20; Mon, 30 Mar 2020 08:57:20 +0000 Received: from AM6PR05MB5176.eurprd05.prod.outlook.com ([fe80::f5cd:b10f:5f1b:4b22]) by AM6PR05MB5176.eurprd05.prod.outlook.com ([fe80::f5cd:b10f:5f1b:4b22%7]) with mapi id 15.20.2856.019; Mon, 30 Mar 2020 08:57:20 +0000 From: Ori Kam To: "Zhao1, Wei" , "Zhang, Xiao" , "dev@dpdk.org" CC: "Wang, Ying A" , "Zhang, Qi Z" , "stable@dpdk.org" Thread-Topic: app/testpmd: fix PPPOES flow API Thread-Index: AQHWBBGaeM8mPPPhN06u+6qAGH787KhfHGRwgAAuDYCAABH+kIAAHq0AgAALNhCAAOHZAIAAW3SAgAAUf4CAAABTEA== Date: Mon, 30 Mar 2020 08:57:20 +0000 Message-ID: References: <20200327081926.6154-1-xiao.zhang@intel.com> <2966f158164c411e897b3ab741787eea@intel.com> <2723defc86e04f0aaeb42a14183b4b5f@intel.com> <17e9c85bd1ee4ce190fbd4d1be26105e@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: dfa646fe-4860-4f59-94b5-08d7d4885b2b x-ms-traffictypediagnostic: AM6PR05MB6086: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-forefront-prvs: 0358535363 x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:AM6PR05MB5176.eurprd05.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(10009020)(4636009)(39860400002)(396003)(136003)(346002)(376002)(366004)(71200400001)(8676002)(478600001)(6506007)(81156014)(81166006)(86362001)(30864003)(7696005)(9686003)(4326008)(53546011)(5660300002)(52536014)(76116006)(64756008)(66556008)(66476007)(66946007)(66446008)(110136005)(55016002)(33656002)(8936002)(186003)(54906003)(26005)(2906002)(316002); DIR:OUT; SFP:1101; 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: A70lSw3HW0NnuVQIkSvhhIIeh+NrcDFSLj+k2PwvLfIBDIk/pS83MrWD2qtNg0EQkgd8IW5dGREu0mA6aGCTslXjF7MM5IS0DVOk7SGhgF9Bhsigu84udSI9DV+fuK80ZLZo+yBEfDY5u5VqzOJk1unNWyWdRvhLIOrVrN720gS/grWu+13OWRZVPID9DVRVmSiHowdfNP4opKrHMajMruX8WixfWhPLloyox9Jt7hjJ+3V5YE01cKoyM1mS8005zywqVb5tGzC4BzlPzman1dugyy5BVQdrKg/eHRnwdJ2fWATUggJb87Do3xyjKLjKf9R8EbBrYxE5JIK5hz1HXZxtWU4HS9BttQcelG85IfwqB7mTBsv1AW0PT6d1dICEWM+QolzKFmjGhTQ8bohtnOyqqmI5GYIKK4q3eRriIoHmPA6d5ueqoib7UAvlhX5M x-ms-exchange-antispam-messagedata: 5WuIulzEIRS77quzxwzobGbtE8A8lvgrd9wX3bfQvi+dGwGkcsfjfzgQMenp9jjFKuOX55v/uW51VktxoJJxH4pFVi1xvFghPoKFYOfzK7qDF0nXO9PmcB6fRbLqo2NeARYGiLKAUaiMY+n2zN/ujw== 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: dfa646fe-4860-4f59-94b5-08d7d4885b2b X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Mar 2020 08:57:20.4908 (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: 1HTiEXurU14qFvAeBlgHW4ukG/OiMXRmYCF+Hp+i6EMMf9VVde5KSHb2GcZJi0Bw5pm1BEK5Ck/i8H0JS3kxDw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB6086 Subject: Re: [dpdk-dev] app/testpmd: fix PPPOES flow API 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 Xiao, > -----Original Message----- > From: Zhao1, Wei > Sent: Monday, March 30, 2020 11:50 AM > To: Ori Kam ; Zhang, Xiao ; > dev@dpdk.org > Cc: Wang, Ying A ; Zhang, Qi Z > ; stable@dpdk.org > Subject: RE: app/testpmd: fix PPPOES flow API >=20 > Hi, Ori >=20 > > -----Original Message----- > > From: Ori Kam > > Sent: Monday, March 30, 2020 3:43 PM > > To: Zhang, Xiao ; dev@dpdk.org > > Cc: Wang, Ying A ; Zhang, Qi Z > > ; Zhao1, Wei ; > > stable@dpdk.org > > Subject: RE: app/testpmd: fix PPPOES flow API > > > > Hi Xiao > > > > > -----Original Message----- > > > From: Zhang, Xiao > > > Sent: Monday, March 30, 2020 5:09 AM > > > To: Ori Kam ; dev@dpdk.org > > > Cc: Wang, Ying A ; Zhang, Qi Z > > > ; Zhao1, Wei ; > > > stable@dpdk.org > > > Subject: RE: app/testpmd: fix PPPOES flow API > > > > > > Hi Ori, > > > > > > > -----Original Message----- > > > > From: Ori Kam > > > > Sent: Sunday, March 29, 2020 8:46 PM > > > > To: Zhang, Xiao ; dev@dpdk.org > > > > Cc: Wang, Ying A ; Zhang, Qi Z > > > > ; Zhao1, Wei ; > > > stable@dpdk.org > > > > Subject: RE: app/testpmd: fix PPPOES flow API > > > > > > > > Hi Xiao, > > > > > > > > > -----Original Message----- > > > > > From: Zhang, Xiao > > > > > Sent: Sunday, March 29, 2020 3:00 PM > > > > > To: Ori Kam ; dev@dpdk.org > > > > > Cc: Wang, Ying A ; Zhang, Qi Z > > > > > ; Zhao1, Wei ; > > > > > stable@dpdk.org > > > > > Subject: RE: app/testpmd: fix PPPOES flow API > > > > > > > > > > Hi Ori, > > > > > > > > > > > -----Original Message----- > > > > > > From: Ori Kam > > > > > > Sent: Sunday, March 29, 2020 6:19 PM > > > > > > To: Zhang, Xiao ; dev@dpdk.org > > > > > > Cc: Wang, Ying A ; Zhang, Qi Z > > > > > > ; Zhao1, Wei ; > > > > > stable@dpdk.org > > > > > > Subject: RE: app/testpmd: fix PPPOES flow API > > > > > > > > > > > > Hi Xiao, > > > > > > > > > > > > > -----Original Message----- > > > > > > > From: Zhang, Xiao > > > > > > > Sent: Sunday, March 29, 2020 12:06 PM > > > > > > > To: Ori Kam ; dev@dpdk.org > > > > > > > Cc: Wang, Ying A ; Zhang, Qi Z > > > > > > > ; Zhao1, Wei ; > > > > > > > stable@dpdk.org > > > > > > > Subject: RE: app/testpmd: fix PPPOES flow API > > > > > > > > > > > > > > Hi Ori, > > > > > > > > > > > > > > > -----Original Message----- > > > > > > > > From: Ori Kam > > > > > > > > Sent: Sunday, March 29, 2020 2:28 PM > > > > > > > > To: Zhang, Xiao ; dev@dpdk.org > > > > > > > > Cc: Wang, Ying A ; Zhang, Qi Z > > > > > > > > ; Zhao1, Wei ; > > > > > > > stable@dpdk.org > > > > > > > > Subject: RE: app/testpmd: fix PPPOES flow API > > > > > > > > > > > > > > > > Hi Xiao, > > > > > > > > > > > > > > > > Is the proto_id part of the basic header or not? > > > > > > > > > > > > > > Proto_id is part of PPPOE session header, > > > > > > > > > > > > > > > > > > > Where is the porto_id located? Inside the payload? > > > > > > > > > > Yes, my previous explanation was not clear. The protocol ID is in > > > > > the beginning of the payload in PPP Session Stage according to RF= C2516. > > > > > > > > > > 1 > > 2 3 > > > > > 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 = 7 > > > > > 8 9 > > > > > 0 1 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-= +-+-+ > > > > > | VER | TYPE | CODE | > > SESSION_ID | > > > > > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-= + > > > > > | LENGTH | > > payload ~ > > > > > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ > > > > > > > > > > > > > Yes this is what I thought, does proto_id must be the first part of= the > > payload? > > > > > > It must be the first part of the payload for PPP Session Stage, not > > > all PPPOE packets. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > From the spec it looks like a different header. > > > > > > > > > > > > > > > > If it is part of the original header then all documentation= s > > > > > > > > and rte_structs > > > > > > > should > > > > > > > > be changed, to reflect this. > > > > > > > > > > > > > > > > It will be very helpful if the patch message would explain > > > > > > > > the bug and why it > > > > > > > was > > > > > > > > changed. > > > > > > > > > > > > > > Okay, will add more message. The next value of the > > > > > ITEM_PPPOE_PROTO_ID > > > > > > > should be unsigned value but not item list. > > > > > > > > > > > > > > > > > > > > > > > Also please see inline other comment. > > > > > > > > > > > > > > > > Best, > > > > > > > > Ori > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > > > > From: Xiao Zhang > > > > > > > > > Sent: Friday, March 27, 2020 11:19 AM > > > > > > > > > To: dev@dpdk.org > > > > > > > > > Cc: Ori Kam ; ying.a.wang@intel.com; > > > > > > > > > qi.z.zhang@intel.com; wei.zhao1@intel.com; Xiao Zhang > > > > > > > > > ; stable@dpdk.org > > > > > > > > > Subject: app/testpmd: fix PPPOES flow API > > > > > > > > > > > > > > > > > > The command line to create RTE flow for specific proto_id > > > > > > > > > of PPPOES is not correct. This patch is to fix this issue= . > > > > > > > > > > > > > > > > > > Fixes: 226c6e60c35b ("ethdev: add PPPoE to flow API") > > > > > > > > > Cc: stable@dpdk.org > > > > > > > > > > > > > > > > > > Signed-off-by: Xiao Zhang > > > > > > > > > --- > > > > > > > > > app/test-pmd/cmdline_flow.c | 13 +++---------- > > > > > > > > > 1 file changed, 3 insertions(+), 10 deletions(-) > > > > > > > > > > > > > > > > > > diff --git a/app/test-pmd/cmdline_flow.c > > > > > > > > > b/app/test-pmd/cmdline_flow.c index a78154502..c25a2598d > > > > > > > > > 100644 > > > > > > > > > --- a/app/test-pmd/cmdline_flow.c > > > > > > > > > +++ b/app/test-pmd/cmdline_flow.c > > > > > > > > > @@ -768,7 +768,6 @@ static const enum index next_item[] = =3D { > > > > > > > > > ITEM_GTP_PSC, > > > > > > > > > ITEM_PPPOES, > > > > > > > > > ITEM_PPPOED, > > > > > > > > > - ITEM_PPPOE_PROTO_ID, > > > > > > > > > ITEM_HIGIG2, > > > > > > > > > ITEM_TAG, > > > > > > > > > ITEM_L2TPV3OIP, > > > > > > > > > @@ -1030,11 +1029,6 @@ static const enum index > > > > > > > > > item_pppoed[] =3D { > > > > > > > > > > > > > > > > > > static const enum index item_pppoes[] =3D { > > > > > > > > > ITEM_PPPOE_SEID, > > > > > > > > > - ITEM_NEXT, > > > > > > > > > - ZERO, > > > > > > > > > -}; > > > > > > > > > - > > > > > > > > > -static const enum index item_pppoe_proto_id[] =3D { > > > > > > > > > ITEM_PPPOE_PROTO_ID, > > > > > > > > > ITEM_NEXT, > > > > > > > > > ZERO, > > > > > > > > > @@ -2643,10 +2637,9 @@ static const struct token token_li= st[] > =3D > > { > > > > > > > > > [ITEM_PPPOE_PROTO_ID] =3D { > > > > > > > > > .name =3D "proto_id", > > > > > > > > > .help =3D "match PPPoE session protocol identifier", > > > > > > > > > - .priv =3D PRIV_ITEM(PPPOE_PROTO_ID, > > > > > > > > > - sizeof(struct > > > > > rte_flow_item_pppoe_proto_id)), > > > > > > > > > - .next =3D NEXT(item_pppoe_proto_id), > > > > > > > > > - .call =3D parse_vc, > > > > > > > > > + .next =3D NEXT(item_pppoes, NEXT_ENTRY(UNSIGNED), > > > > > > > > > item_param), > > > > > > > > > + .args =3D ARGS(ARGS_ENTRY_HTON > > > > > > > > > + (struct rte_flow_item_pppoe_proto_id, > > > > > proto_id)), > > > > > > > > > > > > > > > > Where is the memory for this proto_id is defined? > > > > > > > > > > > > > > Do you mean this? > > > > > > > lib/librte_ethdev/rte_flow.h > > > > > > > 1360 struct rte_flow_item_pppoe_proto_id { > > > > > > > 1361 rte_be16_t proto_id; /**< PPP protocol identifie= r. */ > > > > > > > 1362 }; > > > > > > > > > > > > > > > > > > > Yes. Why don't you use this one? > > > > > > > > > > I think I was using this, am I using it incorrectly? > > > > > > > > > > + .args =3D ARGS(ARGS_ENTRY_HTON > > > > > + (struct rte_flow_item_pppoe_proto_id, > proto_id)), > > > > > > > > > > > > > Yes but there is no space to save this data since you deleted the p= riv. > > > > I think you are trying to implement something like > > > > RTE_FLOW_ITEM_TYPE_IPV6_EXT. > > > > > > > > And I don't understand what was the problem with the previous > > > implementation. > > > > > > I deleted the priv because it changed to a subcommand in pppoes, the > > > command line will be like this: > > > testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / > > > testpmd> pppoes > > > proto_id is 21 > > > > > > > The issue is that the pppoe struct doesn't have definition to the proto= _id. > > If you wish a possible solution will be to add it to the pppoe struct, = I'm not > sure > > if this is the correct approach since this field is not a must. > > > > Like I said there are examples on how to work with extended headers, wh= ich I > > think are more correct, buy may be the problem is that the pppoe struct= is > not > > aligned and this result in an issue when adding the last bytes. >=20 >=20 > There is a defination of RTE_FLOW_ITEM_TYPE_PPPOE_PROTO_ID, do you > mean make use of that? > That is the reason for use extended header for this? > But that seems as you say, has some bug. >=20 I understand there is a bug, the question how to solve it. I suggested two approaches. Add the proto_id to the pppoe struct, but this means that we will add a new member that is not part of the original defini= tion. Maybe the issue is in the PMD and it needs to understand that the proto_id should be located in a different offset. In any case it doesn't look like the current fix the right one. >=20 > > > > > The previous implementation would be infinite loop for proto_id > > > command and can not specific the value for proto_id. > > > testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / > > > testpmd> proto_id > > > proto_id [TOKEN]: match PPPoE session protocol identifier / [TOKEN]= : > > > specify next pattern item > > > testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / > > > testpmd> proto_id > > > proto_id > > > proto_id [TOKEN]: match PPPoE session protocol identifier / [TOKEN]= : > > > specify next pattern item > > > testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / > > > testpmd> proto_id > > > proto_id proto_id > > > proto_id [TOKEN]: match PPPoE session protocol identifier / [TOKEN]= : > > > specify next pattern item > > > testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / > > > testpmd> proto_id > > > proto_id proto_id > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > }, > > > > > > > > > [ITEM_HIGIG2] =3D { > > > > > > > > > .name =3D "higig2", > > > > > > > > > -- > > > > > > > > > 2.17.1