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 44802A0588 for ; Sun, 29 Mar 2020 14:45:46 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id E8EAC2C6E; Sun, 29 Mar 2020 14:45:45 +0200 (CEST) Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-eopbgr20080.outbound.protection.outlook.com [40.107.2.80]) by dpdk.org (Postfix) with ESMTP id A4F10FFA; Sun, 29 Mar 2020 14:45:42 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Mmza7z2ADbypsyirRBGFArvgFXuRWD/DcoLbjT9XNmGh0BYzGwc5oqC1GHMUwy0bgaYM6GZrpr6P4hpPrD29v8S1BexZERT+L10xBqisn05EZYZuMiT8bKQwyJaFbyl4SLru9RJo3j+dEIKa9+4/uCPbgZzKiNgTfkQHSGXTQL/wJVsiCM+LCsVJkwRQc9fUmP4PDtbVCxpOftsdrPeVjbnBrcpW63xIgPqKIYpq3rp62I80dy7eX5bhUdxsMd98zwYKM9Kw/Ql+80U3sA3Xg42l73rRdHAyt9+jyp0W3ltmrtLjSNdrz24jRv39mJ1zPU2nc8jtWy/VMLi+oWp8bg== 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=ZUA6ZFlP+KiyzVbgWV89J8OQdC1cQVLkCCXMoA+UGcE=; b=csqXbN50IJlnQk7Egol2PvVr0RZ69tCM5b9Uby5igeXiPs7nWYa59XCCxSeUZrWrBxnORS6wpBGfZfD9EZ1jXCB4KN7sf903H8a4rJ9rXaQ3lWn76nxh5jbG6sKJuAOZqm2b84yAHQvVYvWWZbT1rNlxf7NLV/veCvAnbazB7caTkElYEaSD9GpR0YqNDb9+RQVIKdk6Uzp2JA9TPfvtsDeOaEmDRee6UpjmEcB/H+A8xGwGn/139O7AHWPEISi5q910rTLekJUxg2iRfBBCPi2IqrnK/PpscxnNlmcJgrqoDvJG7tdCDmRJOtDBcUmeM89C0igN4dMEk7fxNigp7A== 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=ZUA6ZFlP+KiyzVbgWV89J8OQdC1cQVLkCCXMoA+UGcE=; b=KnV5b02pWH6927/wTd4+2jIkCrJTHyOq1U7Hnq4iwfXmd0vMQWk8D1Dfeo7opndZFbFgUq3BqhdBuBJUop3U+loDl4AVfPI8shC9PNZMn1pP1ieA8FTcRahUsUsL213O8cj6LDWfbN+MN9INu3dIiQHKNIGLs4EBikssnYX9MNs= Received: from AM6PR05MB5176.eurprd05.prod.outlook.com (20.177.196.158) by AM6PR05MB4936.eurprd05.prod.outlook.com (20.177.35.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.2835.20; Sun, 29 Mar 2020 12:45:39 +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; Sun, 29 Mar 2020 12:45:39 +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+kIAAHq0AgAALNhA= Date: Sun, 29 Mar 2020 12:45:39 +0000 Message-ID: References: <20200327081926.6154-1-xiao.zhang@intel.com> <2966f158164c411e897b3ab741787eea@intel.com> <2723defc86e04f0aaeb42a14183b4b5f@intel.com> In-Reply-To: <2723defc86e04f0aaeb42a14183b4b5f@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: 0023c4a7-ed4f-4a1f-eed1-08d7d3df15bd x-ms-traffictypediagnostic: AM6PR05MB4936: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:8273; x-forefront-prvs: 035748864E 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)(346002)(376002)(136003)(396003)(366004)(39860400002)(26005)(81156014)(86362001)(110136005)(5660300002)(54906003)(2906002)(81166006)(8936002)(186003)(33656002)(52536014)(4326008)(7696005)(71200400001)(76116006)(6506007)(8676002)(66946007)(64756008)(66446008)(53546011)(66476007)(478600001)(66556008)(316002)(55016002)(9686003); 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: jf/RgEfsNqqNyfp/oWvKdyd0DgM5hd6C2riJ4iaMrD10qv+ai3N4ruvlHHJdairwWzSN3eG4ybxivQeBf1E/USfHWK+4CjSbIwwE8hDkHHOdxjSwMaxcLROGgQwFHiFgBft1AqF5/AlvHwsyNKLY3tA+juPuCeNs0dh+OHLTIIf92M4y2wyOuH9uriltwWAXi0SHILmiHOUg+X2ItaAqdAgx9Ll29V4w8TJRlLw1R6hMKCeb8TJlg1luEiAVHbNYFjKtNKAk23G564WOVJjaJRCqRY9GuSzwvaw8AI9SidFoAIVFUFEwwLMJUfxRpi86eVnBVdq5rIfhjVHusXJ4Aio21eIn9hOGFXPgUGvgSqBtpPCh5c0lu+0Y1iyqsqL8uIeLEyUOtRcDCX3maw6KmFVnPb/n9F2V1aCFDO54rV530FQRfu5/5y+WoEltTnOT x-ms-exchange-antispam-messagedata: RiQVjDCIS1hasGIDcCzALeULssBq78rsMnuD7/yp6ZxOKukzxkOsxzNFGf32KnSi3p7BbgYWUuTul5gVH2sYNgCxWnpSJMNq+6H0aymz1ACwn8+0a3hapv5lCaOOOEXBYZ3K8rYRA6ROscKM6ArMOA== 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: 0023c4a7-ed4f-4a1f-eed1-08d7d3df15bd X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Mar 2020 12:45:39.0971 (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: ozp+UM70FlbNSNE1aSVS5jjElxHKEIkpPwFmVupkhprFKaKyjDO0QR6NMu8UBYQe+B8sc9JFJEzQYED+u+8UeQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM6PR05MB4936 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: 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 >=20 > Hi Ori, >=20 > > -----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? >=20 > Yes, my previous explanation was not clear. The protocol ID is in the beg= inning > of the payload in PPP Session Stage according to RFC2516. >=20 > 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 | paylo= ad ~ > +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ >=20 Yes this is what I thought, does proto_id must be the first part of the pay= load? > > > > > > > > > > From the spec it looks like a different header. > > > > > > > > If it is part of the original header then all documentations 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_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? >=20 > I think I was using this, am I using it incorrectly? >=20 > + .args =3D ARGS(ARGS_ENTRY_HTON > + (struct rte_flow_item_pppoe_proto_id, proto_id)), >=20 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 implementatio= n. > > > > > > > > > > > }, > > > > > [ITEM_HIGIG2] =3D { > > > > > .name =3D "higig2", > > > > > -- > > > > > 2.17.1