From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id F2239A0548; Sun, 28 Nov 2021 12:31:14 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 87F024068E; Sun, 28 Nov 2021 12:31:14 +0100 (CET) Received: from NAM10-MW2-obe.outbound.protection.outlook.com (mail-mw2nam10on2050.outbound.protection.outlook.com [40.107.94.50]) by mails.dpdk.org (Postfix) with ESMTP id EDE2A4068A for ; Sun, 28 Nov 2021 12:31:12 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=eX7aKOo4ePQMNDamRT9bux0CrA/it21hum2uiSiWr7Ho8/1IsyGiYDxrhko2gcZsTv1Z3vHxDUksBjkrxnJXhp2TgfClGzN5HTp/K5cLWW86FzvDsiU7Ih83JBTlo6MldfrRFZSyxa+u7bC9MrrK19V7GH8VjnX3Pfmn9Gf4lihN4XqXcgveR6DoMX6U/sX40a4ZwUGuqO/bWl+oCf0DV9D9+9gGRdc1Q5mBlgoRVBW/8J7+vlR+eVTS65dZDvVtY+BJvJbQvAnHNOddhlL6CRbLzD9Kqxm7feved36fL2w41f+T6eSvd+IR9l1jJEyC7TydAN5DOnntMjRNKXbrMg== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=eQ0ENP3odRsAQB9qu9Tmtc62JPD4UimHzb1PRACyMlA=; b=D/HHpyQAtLVNxgxC4aTmh0Oyy4qpi/ldNwY4L3DwpiEf1hqrPV81xdA47aGLegv0NaMuldjr4AQegFEP31HdsPGyDWO7ful5/aAdEgiFsUc/OwvPmNJOA5IuYoY7NthGag15TvrEjbtHu/RG3IEMxrA0NiClS8lwhvCFhjpi+ywazY8E07d12IMNtpTpdp/X67RgFdwhxGQT4QCJKoPym0iWE/kd1sQNvMclGMMhs0f6G003pqcbXFbYPRjqn9CaDBcRe1HG0LAtujb4XSgKN+vA9FJEp+NaVOJqeRQQ6Ifesx2+bnCH4HyOov2ywrHfaaDUISw+48FazvHKsOj8zg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eQ0ENP3odRsAQB9qu9Tmtc62JPD4UimHzb1PRACyMlA=; b=Yw78glKv41hAQLXAa9TVgmm3IgHvBMmZEi/nPmCN480lspCJ7mfz6CXCuB3tGeyqfBoz5DRpFTWkkREObxBbQ58jxJAx16QCExXjMsEcTuqjmDOnaxvzg5qXkml7WmFTApa4S5X7ujOp5INCifnLu0BoAY9WV4f2En796KnIIxPF56Ci4ZzBkP8FSQpS11hB5jaQiXyC0k39nTKVRPIVe/8ZlPY0Rbf0vu7EGosvnIKeFOswekRX0DdLXX/8bUStRx0DPERW3GLQClcDhYhO9dgdwdGAE4F5e49jDdYIZycI/cLpwdAZV2IVPc45Gw4+GxjmpP5PEf0U6qDgrgHxXg== Received: from DM8PR12MB5397.namprd12.prod.outlook.com (2603:10b6:8:38::6) by DM4PR12MB5326.namprd12.prod.outlook.com (2603:10b6:5:39f::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4734.23; Sun, 28 Nov 2021 11:31:10 +0000 Received: from DM8PR12MB5400.namprd12.prod.outlook.com (2603:10b6:8:3b::12) by DM8PR12MB5397.namprd12.prod.outlook.com (2603:10b6:8:38::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4713.24; Sun, 28 Nov 2021 11:31:09 +0000 Received: from DM8PR12MB5400.namprd12.prod.outlook.com ([fe80::4c7b:3be1:176b:f77f]) by DM8PR12MB5400.namprd12.prod.outlook.com ([fe80::4c7b:3be1:176b:f77f%4]) with mapi id 15.20.4713.025; Sun, 28 Nov 2021 11:31:09 +0000 From: Ori Kam To: Jerin Jacob CC: Jerin Jacob , dpdk-dev , "NBU-Contact-Thomas Monjalon (EXTERNAL)" , Ferruh Yigit , Andrew Rybchenko , Ajit Khaparde , Andrew Boyer , Beilei Xing , "Richardson, Bruce" , Chas Williams , "Xia, Chenbo" , Ciara Loftus , Devendra Singh Rawat , Ed Czeck , Evgeny Schemeilin , Gaetan Rivet , Gagandeep Singh , Guoyang Zhou , Haiyue Wang , Harman Kalra , "heinrich.kuhn@corigine.com" , Hemant Agrawal , Hyong Youb Kim , Igor Chauskin , Igor Russkikh , Jakub Grajciar , Jasvinder Singh , Jian Wang , Jiawen Wu , Jingjing Wu , John Daley , John Miller , "John W. Linville" , "Wiles, Keith" , Kiran Kumar K , Lijun Ou , Liron Himi , "NBU-Contact-longli (EXTERNAL)" , Marcin Wojtas , Martin Spinler , Matan Azrad , Matt Peters , Maxime Coquelin , Michal Krawczyk , "Min Hu (Connor" , Pradeep Kumar Nalla , Nithin Dabilpuram , Qiming Yang , Qi Zhang , Radha Mohan Chintakuntla , Rahul Lakkireddy , Rasesh Mody , Rosen Xu , Sachin Saxena , Satha Koteswara Rao Kottidi , Shahed Shaikh , Shai Brandes , Shepard Siegel , Somalapuram Amaranath , Somnath Kotur , Stephen Hemminger , Steven Webster , Sunil Kumar Kori , Tetsuya Mukawa , Veerasenareddy Burru , Slava Ovsiienko , Xiao Wang , Xiaoyun Wang , Yisen Zhuang , Yong Wang , Ziyang Xuan Subject: RE: [dpdk-dev] [RFC PATCH] ethdev: support priority based flow control Thread-Topic: [dpdk-dev] [RFC PATCH] ethdev: support priority based flow control Thread-Index: AQHXuelDmVJ5wI0iekegYLDbPYtxNKwHvNGAgAZGHICAAztLAIAAIblwgAFt1QCAADaDkIABYo2AgAAuDjCAARn2AIADdBDw Date: Sun, 28 Nov 2021 11:31:09 +0000 Message-ID: References: <20211005125923.2651449-1-jerinj@marvell.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ce33ab09-aeab-441a-6cbd-08d9b2629351 x-ms-traffictypediagnostic: DM8PR12MB5397:|DM4PR12MB5326: x-ld-processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr,ExtAddr x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:9508; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 0McNg2fexfehTe0FsUsaZ4HYVo0L/A/JT4vXnUl77xkgp4oiORisnomSxfZdKFTX/AeZbV9Kve8yX2PwH8C7AKDlTbBLj+oA/UroPRGk0VWDSqgfuVu/9PsLfbI94l7EVQSBSA1Lbi+pc7DSSYYMdb4sATCjVaRBqL7MEK7mlt7wpRzNt7RPyQgbqS377MdETfWRamqtH3OZEFEY6xjKxSrum9vp+7FOlRAaFwCILvjmI16hPREAlaJfdi0CiuCo8W7y6LD58ubysm4enGcCFAAEhLeKk51S0tU9oROkl9lECqMiJ0PvUh6cg1pjpuMoTKlxoaOfz3HpNEqdJ8D6gPeZ5ya/+cckncZiTLjCQaCmMy3IGtxeGfj7QeXlPqC9vLDT9a5cfEJGpfTwUHH3ARpYw2qHL51VpNupZBydkaG+ToQ31aIAOKfE8558/kMfFSvypX2GlCzmH/Pz8DmSVG2C8ShcdGp8lMUizChiAbBltoi4LemGvbz1mXGb2R9uNHvLuOovwPOjmfq9O7wO0ZiPghe7RQdDKEaOxNfUMoWUBCCd71eCosmM5IDuTos0Phdz1GgwECz5U5ippwzDlkKKmJmQhUZJTLpSXSVqnIFJWonxJt/8G2HSZ3+k1vF1Hr1b0wRvv30DYY85JIkc5COtFqx+pY9y+7u4QZSPo9l29dY96G1CVcSlX7j2s2rDB862K5SST3XLVQwzuUd42/v2MJOGn9SJmv4T0EJ3Rfa4shLHPG4yyaqH7wQ0r5rQD1dQtzzDkC46zYIA2rTXXzdXiSVwXpjpvQvcZxa6c4k= x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM8PR12MB5397.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(316002)(52536014)(6916009)(71200400001)(9686003)(8676002)(8936002)(33656002)(4326008)(2906002)(30864003)(83380400001)(5660300002)(7416002)(86362001)(508600001)(55016003)(186003)(66446008)(26005)(64756008)(38100700002)(6506007)(38070700005)(66556008)(66476007)(122000001)(966005)(76116006)(7696005)(45080400002)(66946007)(54906003)(7366002)(7406005)(53546011); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?vBA8Qm2rzzO7hqcYd3l7b7Nq2Jv3ixRIYSeYPqPYnC36oEqhjc6q5bCEsxUM?= =?us-ascii?Q?6S9BolNDdRTESvvvlDFe1dwlRGVgtlaEF5RzIdxDi6aPWGZJH3YsU0aIjWnD?= =?us-ascii?Q?yC/ukM/cGxgY+47G+e1Rq2mEvC79X+DJAc8yUpoE4lwUxY/bcgcDf4zEl4OF?= =?us-ascii?Q?Hwd66zrwWuRWhvIuZQHrZJu2MmBQ2jPW2nTRxwUwLeelZ+O64ZHpcLMJlyl3?= =?us-ascii?Q?b89W9hkhQGTfnfW883wgAtbK7P5Eh6w+nRSWCAXmEhdWSSL5niKHaCYB3Ak+?= =?us-ascii?Q?/bd77yCnh1YAX9RV/Ayv2tnXJRs1498IWtLzrG2eroWZbkOyGku/c3iKywOr?= =?us-ascii?Q?6/mjxOSiM0/cEjJCHpdoo/irF4DlYW5kDj2wMToMfZ137L+w6bZ3uIBwxug0?= =?us-ascii?Q?JLSIexIOJ4Xi7reQObFzV6wXfMvKCGnzHIHNJKd3IIhb895I2Bxunyk2U6vH?= =?us-ascii?Q?mTaYJ2EBL7akdN7+7eHBKNNlKNFbl5AFuOQWsiLcbQjaN5iMkYY1Kpz5QxCk?= =?us-ascii?Q?GvTdQ9grAyim6lREdTJugme3yc+sWb8GZWnYZeZ8fhxvwRDj7WDMyvwInAU1?= =?us-ascii?Q?HDxpVfi6jKdrNgoCuZwiRZebr0dqwQQdrcHJQA2Wm4KGBEYHuastPdY8yhg7?= =?us-ascii?Q?9L2bFP5Z5ThDdu4Pv+q3rLIMOTTEEafRSpYIG456+ivmuqbYZDAH8ACPHbK4?= =?us-ascii?Q?+sTKOiVO0FUGrp8R3Sr6GcGRwjVMtwu0PuaWXAGjHu/czYBnyhkcvAxEcxis?= =?us-ascii?Q?HY8pELSqriGQ2iQfrGM/2YTanuBzPOzrv7fjgFrA6MNIMJBaRDBfx1nxmUUp?= =?us-ascii?Q?/r7mTeSwdnvGxzXeD8TXaaQCwSNK6N+rTey+hCXD/IMmWOAT9IxfKglrw3pw?= =?us-ascii?Q?KHcOefudUREWljy4yB5YArMueM5EeCweS6lNT2nzM4OYXEiEuqtH1NvAn6/y?= =?us-ascii?Q?DzAYqMjNj/8FPm+T+CUgpvHAqL6r13pjvxlH7lVXYiuq86AUJfzBgI1kINJF?= =?us-ascii?Q?4P+wJU3W+xcy06iMskOw2xinui800Rjrq2ai1MIOicROx+corbpZji0fCNvy?= =?us-ascii?Q?MSnV/EIo7gc5S4abmqqOO8DFVAHLkpFrKY8h9x9Sstf8iife9BDD3Lfth+hC?= =?us-ascii?Q?zC43Tt/y5oCgMIddijLB2bOwBZFlQehayMf2wi+UcdvlnTAE/GxOelfxmH2K?= =?us-ascii?Q?YlaQiiqD1/9ImKnrfgAilhCS9Jl6M6HnNLnb4a6b/4z+XVs7vDareevREumE?= =?us-ascii?Q?mlT5QC+lSZRMAKAV/XDCjeJTN4p0X5Qw3skBLhoTe2MIiDuiVCW/4DCPvjsa?= =?us-ascii?Q?6GSpVwMtIIAoQZSs7kGs7GJg79l2LzV7TWVX/cHB5yLLWDCo0rgqHbTCna8c?= =?us-ascii?Q?BRE7J1q9YzKfHghiyFyIOAF0V6RdshRE155pbXFWuLG4m79eaD1MrFuuDHIY?= =?us-ascii?Q?uFiQl/+lpmwXjZNRy2IIREnJEP+j80hDnKxALCNBdXMjTcuD+I5T8gFNppgr?= =?us-ascii?Q?oza9AB0B+kEXkHCixImJOUG1QazPXQJtyOGZfIYuw3+0ldxMSIRROL3qqwgh?= =?us-ascii?Q?atGmeYUzrkzdcCYsEDrWVdK1Q8y4b4cD6Sb924oyd++m5Lknk1NtESx0Oj2H?= =?us-ascii?Q?0w=3D=3D?= Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: DM8PR12MB5400.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ce33ab09-aeab-441a-6cbd-08d9b2629351 X-MS-Exchange-CrossTenant-originalarrivaltime: 28 Nov 2021 11:31:09.4137 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: C38pUTDk9cmP3RNOaQ0MYpHT6CWnYWuBY9eVOpSg05A0ja6TN4EiQz88/v/SLHEyXTtU4O5MWWrLihwBM3Wr0w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB5326 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Good for me Please send meeting inviate. Ori > -----Original Message----- > From: Jerin Jacob > Sent: Friday, November 26, 2021 8:46 AM > To: Ori Kam > Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: support priority based flow c= ontrol >=20 > On Thu, Nov 25, 2021 at 7:32 PM Ori Kam wrote: > > > > Hi Jerin, > > > > I think that we are not on the same page and I'm missing some critical = info to decide > > on the best approch. > > > > Can we please have a short meeting so you can explain to me about this = feature? > > > > I think it will be good if Thomas, Ferruh and Andrew could join. >=20 > Sure, Ori. Is 2 PM UTC on 29th Nov(Monday) on > https://nam11.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fmeet.= jit.si%2Fdpdk&dat > a=3D04%7C01%7Corika%40nvidia.com%7C515af20d94c0419f1e2208d9b0a88983%7C430= 83d15727340c1b7 > db39efd9ccc17a%7C0%7C0%7C637735060187259293%7CUnknown%7CTWFpbGZsb3d8eyJWI= joiMC4wL > jAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=3D= V3n8P%2F%2BM > udw4IMntVry8PO71PgxBAJyS9QYfTJN5i7A%3D&reserved=3D0 > is fine for you/Thomas/Ferruh/Andrew? > If not, Please suggest some time. >=20 >=20 > > > > Best, > > Ori > > > > > -----Original Message----- > > > From: Jerin Jacob > > > Sent: Thursday, November 25, 2021 1:12 PM > > > To: Ori Kam > > > Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: support priority based fl= ow control > > > > > > On Wed, Nov 24, 2021 at 9:30 PM Ori Kam wrote: > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > From: Jerin Jacob > > > > > Sent: Wednesday, November 24, 2021 12:48 PM > > > > > > > > > > On Wed, Nov 24, 2021 at 3:01 PM Ori Kam wrote: > > > > > > > > > > > > Hi Jerin, > > > > > > > > > > > > > -----Original Message----- > > > > > > > From: Jerin Jacob > > > > > > > Sent: Tuesday, November 23, 2021 12:58 PM > > > > > > > To: Ori Kam > > > > > > > > > > > > > > On Sun, Nov 21, 2021 at 3:20 PM Ori Kam wr= ote: > > > > > > > > > > > > > > > > Hi Jerin, > > > > > > > > > > > > > > Hi Ori, > > > > > > > > > > > > > > > > > > > > > > > Sorry for my late response, > > > > > > > > > > > > > > Thanks for the review. > > > > > > > > > > > > > > > > > > > > > > > > -----Original Message----- > > > > > > > > > From: Jerin Jacob > > > > > > > > > Sent: Wednesday, November 17, 2021 11:49 AM > > > > > > > > > To: Jerin Jacob > > > > > > > > > Subject: Re: [dpdk-dev] [RFC PATCH] ethdev: support prior= ity based flow control > > > > > > > > > > > > > > > > > > On Tue, Oct 5, 2021 at 6:32 PM wrote= : > > > > > > > > > > > > > > > > > > > > From: Jerin Jacob > > > > > > > > > > > > > > > > > > > > rte_eth_dev_priority_flow_ctrl_set() based API is not g= eneric as it > > > > > > > > > > can not support other than VLAN priority mapping to PFC= traffic class. > > > > > > > > > > > > > > > > > > > > Introducing RTE_FLOW_ACTION_TYPE_PFC_SET_TC rte_flow ac= tion to > > > > > > > > > > set the traffic class as per 802.1Qbb specification. Th= is will enable, > > > > > > > > > > Traffic class(8bit) to be selected based on any packet = field like DSCP. > > > > > > > > > > > > > > > > > > > > Also, making it as rte_flow action will enable fine con= trol on > > > > > > > > > > traffic class selection to a specific queue or VF etc. > > > > > > > > > > > > > > > > > > > > Signed-off-by: Jerin Jacob > > > > > > > > > > > > > > > > > > Ping. If there are no comments on RFC, Planning to send v= 1 for 22.02. > > > > > > > > > > > > > > > > All the set type of functions are going to be deprecated. > > > > > > > > you should use RTE_FLOW_ACTION_TYPE_MODIFY_FIELD. > > > > > > > > > > > > > > > > What is the item that you are matching on when using rte_fl= ow? Is it part of the tci in the > vlan > > > > > item? > > > > > > > > > > > > > > TC can be VLAN TCI field or DSCP field in IP header or any ot= her field > > > > > > > in packet. > > > > > > > We need to set the traffic class as per 802.1Qbb specificatio= n, May I > > > > > > > know how the "modify" > > > > > > > attribute helps here. It should be a "set" operation. Right? > > > > > > > > > > > > > > > > > > > Yes, in the rte_flow_action_modify_field there is what operatio= n you want to do, > > > > > > in this case the action should be set. > > > > > > > > > > But RTE_FLOW_ACTION_TYPE_MODIFY_FIELD used for modify the packet > > > > > content[1]. RIght? > > > > > In this case, it is more of sideband data not anything on packet > > > > > content. If so, explicit action > > > > > makes sense. Right? > > > > > > > > > > > > > It looks like I'm missing something, > > > > If you don't want to change the packet and this is just data, > > > > why not use tag/mark/flag/metadata? > > > > > > > > Who should get this data? > > > > If the packet is hairpined and the packet is sent to wire this info= should be part > > > > of the packet right? > > > > > > No. Here is what I envisioned for working this, > > > User add riles like this. > > > > > > Patten: VLAN TCI is value X or DSCP value Y > > > Action: RTE_FLOW_ACTION_TYPE_PFC_SET_TC with an value for TC(8bit > > > defined in 802.1Qbb) > > > Driver use this rule to enable TC (flow control) with that value for > > > the given VLAN TCI =3D=3D X > > > > > > tag/mark/flag/metadata used to embed something in mbuf. Here, This > > > action establishes, For a given > > > flow what TC value needs to be enabled(it does not need to be given i= n > > > mbuf or packet for application to use). > > > It just establishes the TC wiring for flow control enablement for a > > > given pattern. > > > Is it adding up? > > > > > > > > > > > > > > > > > [1] > > > > > * RTE_FLOW_ACTION_TYPE_MODIFY_FIELD > > > > > * > > > > > * Modify a destination header field according to the specified > > > > > * operation. Another field of the packet can be used as a source= as well > > > > > * as tag, mark, metadata, immediate value or a pointer to it. > > > > > > > > > > > > > > > > > I assume that you are trying to set the VLAN tag priority field= right? > > > > > > > > > > Both VLAN tag and/or DSCP field. > > > > > > > > > > > > > Going back to the above comment so you are changing something in th= e packet. > > > > > > No. See above. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > --- > > > > > > > > > > > > > > > > > > > > Planning to submit the testpmd and cnxk ethdev driver c= hanges after receiving > > > > > > > > > > the feedback on this. > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > doc/guides/prog_guide/rte_flow.rst | 24 ++++++++++++++= ++++++++++ > > > > > > > > > > lib/ethdev/rte_flow.c | 1 + > > > > > > > > > > lib/ethdev/rte_flow.h | 27 ++++++++++++++= +++++++++++++ > > > > > > > > > > 3 files changed, 52 insertions(+) > > > > > > > > > > > > > > > > > > > > diff --git a/doc/guides/prog_guide/rte_flow.rst > b/doc/guides/prog_guide/rte_flow.rst > > > > > > > > > > index 2b42d5ec8c..e59f8a2902 100644 > > > > > > > > > > --- a/doc/guides/prog_guide/rte_flow.rst > > > > > > > > > > +++ b/doc/guides/prog_guide/rte_flow.rst > > > > > > > > > > @@ -2999,6 +2999,30 @@ which is set in the packet meta-= data (i.e. struct > > > > > > > ``rte_mbuf::sched::color``) > > > > > > > > > > | ``meter_color`` | Packet color | > > > > > > > > > > +-----------------+--------------+ > > > > > > > > > > > > > > > > > > > > +Action: ``PFC_SET_TC`` > > > > > > > > > > +^^^^^^^^^^^^^^^^^^^^^^ > > > > > > > > > > + > > > > > > > > > > +Set traffic class as per PFC (802.1Qbb) specification. > > > > > > > > > > + > > > > > > > > > > +This action must be used with any of the following act= ion. > > > > > > > > > > + > > > > > > > > > > +- ``RTE_FLOW_ACTION_TYPE_QUEUE`` > > > > > > > > > > +- ``RTE_FLOW_ACTION_TYPE_RSS`` > > > > > > > > > > +- ``RTE_FLOW_ACTION_TYPE_PF`` > > > > > > > > > > +- ``RTE_FLOW_ACTION_TYPE_VF`` > > > > > > > > > > +- ``RTE_FLOW_ACTION_TYPE_PHY_PORT`` > > > > > > > > > > +- ``RTE_FLOW_ACTION_TYPE_PORT_ID`` > > > > > > > > > > + > > > > > > > > > > > > > > > > Why? All the above actions are terminating actions so if I = want ot match on the value > > > > > > > > it doesn't make sense to have it only on the last rule. > > > > > > > > > > > > > > In PFC, we are specifying, Given TC needs to steer to specifi= c Queue, > > > > > > > RSS, PF etc. > > > > > > > Not sure how other actions are relevant for SET_TC action. Do= you have any > > > > > > > specific action in mind where SET_TC valid in addition to abo= ve actions > > > > > > > > > > > > > First what happens in case of egress traffic? There is no dest = action. > > > > > > > > > > It will be invalid. I can change the documentation to specify egr= ess > > > > > direction is not valid. > > > > > Thoughts? > > > > > > > > > > > > > Why not? Isn't it possible that application will want to send some = packet with this value? > > > > > > This is Rx Flow control(8bit TC value defined in 802.1Qbb), Not > > > relevant when using on Tx. > > > > > > > > > > > > > Second what happens if for example the priority is based on the= outer tunnel > > > > > > which I want decap and at a latter stage I want to do connectio= n tracking and only > > > > > > if everything is correct I want to send this packet to a queue? > > > > > > > > > > Which is fine with the current scheme of things as per the docume= ntation, > > > > > "This action must be used with any of the following action." it d= oes > > > > > not preclude to > > > > > use of any other action. If it is not clear, we can reword like b= elow, > > > > > --- > > > > > This action must be used with any of the following action and not= limited to > > > > > using any of other actions in conjunction with the following acti= on. > > > > > --- > > > > > Thoughts? > > > > > > > > > > > > > Like stated above I can see use case where you want to set this val= ue at the start > > > > of the pipe and then based on this value act. > > > > > > > > For example: > > > > 1. decap the packet and based on the tunnel set this value and jump= to connection tracking > group. > > > > 2. run connection tracking and jump to next table > > > > 3. Based on the connection tracking and the TC value send to some q= ueue. > > > > > > Yes. It is possible to have decap + connection tracking + > > > RTE_FLOW_ACTION_TYPE_PFC_SET_TC + > > > [RTE_FLOW_ACTION_TYPE_QUEUE or RTE_FLOW_ACTION_TYPE_RSS or > > > RTE_FLOW_ACTION_TYPE_PF or RTE_FLOW_ACTION_TYPE_VF or > > > RTE_FLOW_ACTION_TYPE_PHY_PORT or RTE_FLOW_ACTION_TYPE_PORT_ID] > > > cascaded actions. > > > > > > > > > > > Best, > > > > Ori > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > +.. _table_rte_flow_action_pfc_set_tc: > > > > > > > > > > + > > > > > > > > > > +.. table:: PFC_SET_PRIORITY > > > > > > > > > > + > > > > > > > > > > + +-----------------+--------------------------------= -----+ > > > > > > > > > > + | Field | Value = | > > > > > > > > > > + +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+ > > > > > > > > > > + | ``tc`` | Traffic class as per PFC (802.1= Qbb) | > > > > > > > > > > + +-----------------+--------------------------------= -----+ > > > > > > > > > > + > > > > > > > > > > Negative types > > > > > > > > > > ~~~~~~~~~~~~~~ > > > > > > > > > > > > > > > > > > > > diff --git a/lib/ethdev/rte_flow.c b/lib/ethdev/rte_flo= w.c > > > > > > > > > > index 8cb7a069c8..75c661159e 100644 > > > > > > > > > > --- a/lib/ethdev/rte_flow.c > > > > > > > > > > +++ b/lib/ethdev/rte_flow.c > > > > > > > > > > @@ -189,6 +189,7 @@ static const struct rte_flow_desc_d= ata rte_flow_desc_action[] > =3D { > > > > > > > > > > */ > > > > > > > > > > MK_FLOW_ACTION(INDIRECT, 0), > > > > > > > > > > MK_FLOW_ACTION(CONNTRACK, sizeof(struct rte_flo= w_action_conntrack)), > > > > > > > > > > + MK_FLOW_ACTION(PFC_SET_TC, sizeof(struct rte_fl= ow_action_pfc_set_tc)), > > > > > > > > > > }; > > > > > > > > > > > > > > > > > > > > int > > > > > > > > > > diff --git a/lib/ethdev/rte_flow.h b/lib/ethdev/rte_flo= w.h > > > > > > > > > > index 7b1ed7f110..5298418e9e 100644 > > > > > > > > > > --- a/lib/ethdev/rte_flow.h > > > > > > > > > > +++ b/lib/ethdev/rte_flow.h > > > > > > > > > > @@ -2409,6 +2409,13 @@ enum rte_flow_action_type { > > > > > > > > > > * See struct rte_flow_action_meter_color. > > > > > > > > > > */ > > > > > > > > > > RTE_FLOW_ACTION_TYPE_METER_COLOR, > > > > > > > > > > + > > > > > > > > > > + /** > > > > > > > > > > + * Set traffic class as per PFC (802.1Qbb) spec= ification. > > > > > > > > > > + * > > > > > > > > > > + * See struct rte_flow_action_pfc_set_tc. > > > > > > > > > > + */ > > > > > > > > > > + RTE_FLOW_ACTION_TYPE_PFC_SET_TC, > > > > > > > > > > }; > > > > > > > > > > > > > > > > > > > > /** > > > > > > > > > > @@ -3168,6 +3175,26 @@ struct rte_flow_action_meter_col= or { > > > > > > > > > > enum rte_color color; /**< Packet color. */ > > > > > > > > > > }; > > > > > > > > > > > > > > > > > > > > +/** > > > > > > > > > > + * @warning > > > > > > > > > > + * @b EXPERIMENTAL: this structure may change without = prior notice > > > > > > > > > > + * > > > > > > > > > > + * RTE_FLOW_ACTION_TYPE_PFC_SET_TC > > > > > > > > > > + * > > > > > > > > > > + * Set traffic class as per PFC (802.1Qbb) specificati= on. > > > > > > > > > > + * > > > > > > > > > > + * This action must be used any of the following actio= n. > > > > > > > > > > + * - RTE_FLOW_ACTION_TYPE_QUEUE, > > > > > > > > > > + * - RTE_FLOW_ACTION_TYPE_RSS, > > > > > > > > > > + * - RTE_FLOW_ACTION_TYPE_PF, > > > > > > > > > > + * - RTE_FLOW_ACTION_TYPE_VF, > > > > > > > > > > + * - RTE_FLOW_ACTION_TYPE_PHY_PORT, > > > > > > > > > > + * - RTE_FLOW_ACTION_TYPE_PORT_ID > > > > > > > > > > + */ > > > > > > > > > > > > > > > > What does it mean? I must use it only on rules that have o= ne of the above actions? > > > > > > > > > > > > > > See above. > > > > > > > > > > > > > > > > > > > > > > > > > +struct rte_flow_action_pfc_set_tc { > > > > > > > > > > + uint8_t tc; /**< Traffic class as per PFC (802.= 1Qbb) specification */ > > > > > > > > > > +}; > > > > > > > > > > + > > > > > > > > > > /** > > > > > > > > > > * Field IDs for MODIFY_FIELD action. > > > > > > > > > > */ > > > > > > > > > > -- > > > > > > > > > > 2.33.0 > > > > > > > > > > > > > > > > > > > > > > > > > > Best, > > > > > > > > Ori