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 7560CA057B for ; Mon, 30 Mar 2020 09:42:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 34E3F1C036; Mon, 30 Mar 2020 09:42:49 +0200 (CEST) Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2080.outbound.protection.outlook.com [40.107.22.80]) by dpdk.org (Postfix) with ESMTP id 2F0512C15; Mon, 30 Mar 2020 09:42:46 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jXwC7342mKpCT444nZ7BsUUG934EhjNFm4eGMF1sETa9IqW+b6Smv9lwiTaHBog+fu8GAqmeYydMciwrGw0QscYN0sQKrOEVjvW7ozrOTXsTjkqJ0kfMGXy7mKo1aBcF1P3YDKKzhSGxgzYUhNVosUzR1s+BxV6tPbiqbpA/zn8Oshmi1tNua0ADqSAUYy9bBDi9hp9xgGmoMSOxLk+Hl+x+/CsaD+X5CHPcTS8QNIF1GjzNBIOruynkt/fmRebuq++F3pGOSYvcBbvqbA0/VwRDFZ58NtWpe4pGGff9Ibjiqm6o9jX17Ao+AxoDF6TmDMqgZtWsV/1j769Yqz+kGA== 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=Cx79c7n5DipnlBOssW/AxR6DUOE/DhyAhS19o5KqZZE=; b=L09tyJzHMGJrl6LXpiy86TY6tdFdYtBi5rwKeJxVW7Az8dt/tlf+cIfSy5FCprOpIBEd13FgjEFw/S8T4mSPDb/GfkGZxiS2kwthpYJ3nqwz9El6gF3so49zQHEAh3vveSQDTWEiB/7VOggIq/UOXF2Om5/n92GF8C8emth39diFktifbsbR4AAiaNAEfvB/gFjaHvAtWdDawmfVYtmU9dY9DkS0XiUV70p6BBCbBpz72Bpf4K8dtelxuO5JbVbpCDyf8F1MjtVBo+L6peyhQEOeCq6OhWpuXjpIS/jTTAEaiLttC+7oGdARzDMsvCtz4WXFDIYlwoK4ckFFy1CqVA== 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=Cx79c7n5DipnlBOssW/AxR6DUOE/DhyAhS19o5KqZZE=; b=Pa70b6tZTn8bPLo7w9yIyZaoOMmG1286ZLWQyMKLJnyG880iRZBupjZrbp6d1GnYrYFI0Yky66D+J4JwzF0iRGz2/ei7lrnda36SDhphFT2tlM5xvV1sq14xJYUpa8dTf6iWjhjLmJEwr7B39m5eZAPbV6miwUdSMUssX2Nbv3s= Received: from AM6PR05MB5176.eurprd05.prod.outlook.com (20.177.196.158) by AM6PR05MB6615.eurprd05.prod.outlook.com (20.179.1.30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2856.18; Mon, 30 Mar 2020 07:42:45 +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 07:42:45 +0000 From: Ori Kam To: "Zhang, Xiao" , "dev@dpdk.org" CC: "Wang, Ying A" , "Zhang, Qi Z" , "Zhao1, Wei" , "stable@dpdk.org" Thread-Topic: app/testpmd: fix PPPOES flow API Thread-Index: AQHWBBGaeM8mPPPhN06u+6qAGH787KhfHGRwgAAuDYCAABH+kIAAHq0AgAALNhCAAOHZAIAAW3SA Date: Mon, 30 Mar 2020 07:42:45 +0000 Message-ID: References: <20200327081926.6154-1-xiao.zhang@intel.com> <2966f158164c411e897b3ab741787eea@intel.com> <2723defc86e04f0aaeb42a14183b4b5f@intel.com> <17e9c85bd1ee4ce190fbd4d1be26105e@intel.com> In-Reply-To: <17e9c85bd1ee4ce190fbd4d1be26105e@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: 85efa44b-934c-4609-b5f5-08d7d47def90 x-ms-traffictypediagnostic: AM6PR05MB6615: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8882; 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)(376002)(366004)(396003)(136003)(346002)(55016002)(9686003)(478600001)(86362001)(71200400001)(33656002)(66946007)(64756008)(66476007)(66446008)(66556008)(76116006)(53546011)(6506007)(5660300002)(316002)(8936002)(2906002)(81156014)(81166006)(8676002)(4326008)(7696005)(110136005)(54906003)(186003)(26005)(52536014); 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: dFzyCO9XYHUrittYRv2pQPRd7xUHrJq8Rw36uxTGa8egh3kjDjAkJmVPU1dSWIwezqkKGgQH/vbSgfLU74RhNegw+5S6f+XhP4oxgum24tHRjlRKZ7BTbAjE4LeNYneZRWlnNVhcwKLJIPgSDNRcgqUQKm5lBCFfNA4Uxo6fbLZ0nruye5Ifi4rBGMU0Bi8hdborAjS5aPTzZ5/zQRVhhWQ8XQbvfF5mWp0KQqh03IYqEaSyWsSnN+fyJQj7hxcF1m//VUoChNFX9inP99CQf4gMRxH6qgIFzmqPBMY4qrfxzFHi1S+OBZpu7e44EMvC6mp5k3guefD4Y+BNmEzsh2rOvoBypqNWlc6iWhT9T929Z9OY0VKhwCNYHNHa9Yade1LIuZ6B6ORQlzd/P1aJ7pioR2JW6mtIKtPHljiNe2llMg1U14zm52wL5lqJ2z0H x-ms-exchange-antispam-messagedata: i+DZXAr49xl0bTy72cOqud1eEkSt/05llfLDzduSsUd/Az7NSTvUfZUtwNG5p/6vOaZDXi7QqWZ/8Ge3adI+RO/VoubMMB0/hyQjlrBocWeksrRw18GIlBF+y3KSIOXUsmAWns+yFPqV4VOcB3260w== 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: 85efa44b-934c-4609-b5f5-08d7d47def90 X-MS-Exchange-CrossTenant-originalarrivaltime: 30 Mar 2020 07:42:45.0693 (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: 41PIdT3A+sMcQLperwQuKVwPeRUVZtVmwvcXoG+c7MtW/tAwHGzSn6U+627kvu1HNabSGXQGRwhczkW/DVFi4A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB6615 Subject: Re: [dpdk-stable] app/testpmd: fix PPPOES flow API X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 >=20 > Hi Ori, >=20 > > -----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 RFC2516. > > > > > > 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 | p= ayload ~ > > > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ > > > > > > > Yes this is what I thought, does proto_id must be the first part of the= payload? >=20 > It must be the first part of the payload for PPP Session Stage, not all P= PPOE > packets. >=20 > > > > > > > > > > > > > > > > > > From the spec it looks like a different header. > > > > > > > > > > > > If it is part of the original header then all documentations an= d > > > > > > 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_list[]= =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 identifier. *= / > > > > > 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 priv. > > 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. >=20 > 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 / ppp= oes > proto_id is 21 >=20 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, which I think are more correct, buy may be the problem is that the pppoe struct i= s not aligned and this result in an issue when adding the last bytes. > The previous implementation would be infinite loop for proto_id command a= nd > can not specific the value for proto_id. > testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pro= to_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 / pro= to_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 / pro= to_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 / pro= to_id > proto_id proto_id >=20 > > > > > > > > > > > > > > > > > > > }, > > > > > > > [ITEM_HIGIG2] =3D { > > > > > > > .name =3D "higig2", > > > > > > > -- > > > > > > > 2.17.1