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 CEFFBA00C2; Tue, 27 Sep 2022 17:09:36 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7921B41133; Tue, 27 Sep 2022 17:09:36 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 87FD340694 for ; Tue, 27 Sep 2022 17:09:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1664291374; x=1695827374; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=JZChBbPCt+rDoP66rV9GIWICzn4p3euo9+L/+sFfXcM=; b=M1L8r7bj57jdjjPX6h7RWoWn61TFxz6PX08J/dWOP5Knxa6ez3XvRw5j d5NG9gtPSokyBW4iF4AfXk/r0+5X/JuF2Bj2C4iBZV6r5dh+3uRnUu7Ae SRAHGRN8dZeBYLdOhgMGnJBoop4xXu/s0Ja1lYgCS6eMX7KbPVYrpJJLB cAa8dn/eIXr5Ms4YGttzJYR36sj/Ef0qE4xA2TAXo5p5V7JMtGT6/GA8/ g4RBLpk96SgCe5oDF+My2tE3u7esApoWiZPuMk0pIwYul+hUKCvAreOWI igDmJbyFZqWr2LgNu29B7E5QYjb0RffIyf9DCg7xOatJi1MiBoXFqYH9g A==; X-IronPort-AV: E=McAfee;i="6500,9779,10483"; a="327699149" X-IronPort-AV: E=Sophos;i="5.93,349,1654585200"; d="scan'208";a="327699149" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Sep 2022 08:09:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10483"; a="621553643" X-IronPort-AV: E=Sophos;i="5.93,349,1654585200"; d="scan'208";a="621553643" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga002.jf.intel.com with ESMTP; 27 Sep 2022 08:09:32 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Tue, 27 Sep 2022 08:09:32 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Tue, 27 Sep 2022 08:09:32 -0700 Received: from NAM04-MW2-obe.outbound.protection.outlook.com (104.47.73.174) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Tue, 27 Sep 2022 08:09:31 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=fhbxykTBDGJ0MpcPVq5uZd8c9/0+m6F49gos/ScrfSwCo3NfozcsKinK+e34BjZsYHUsaFzFTiYcs0wMwGv6LAdhCrQ70poTPDSbyK3DN4ykYhyTga9ZGBT1VhBohodDMJg6PaZPBf7NQ/ATHWuCdq2doAIHWogTY4BgAi0uyJF2AoRP9WlMduQkCCWfmcqbmZ9JeBQNMPRviv8k+NVENoAhzCOYrtbTnAjFj/hjg+9QKXHkCZvdEvtemoXdmVCrxyxVx2eS2NGcUkUGaqrDPL2+3Ig/7d6BaiupLmdLbC0l5FQoUEeFmN1N999JjVFzgnYlVlbpiZrhoi5JdjoUhQ== 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=jTkL9VtE+AgGt1Nq3l6CoK5ZskCU7SlHcCgu2cTc1sQ=; b=dSglKWPLImre49k+IbpreVEZZMwB+xvlYo9qaediX8UYR5gI2GyW/MWLKKgUgfpU36gaKUvOKi1f2eaEDwuuqPFum3+tMgMs3EYN1sx/l9ZkDEfGtF9nPAxWoGvLt8TpQE5xBOjxuBHCJsD0NRX3SxtXMTGUd1P9tEyP6kl1bOfUqSfRpBWFv5uoNaLiPhyo8atpWu7+Steq8KXyVJIj6TgeggeJ0f8Fm3kSNNcmxl9AlkWrVr4rmTX9fQd8zmh71kagTB0yxzWWTt9JFhFNSccR2L3/Z+pPvkLd5IlPYLXvBK46oxTJt+b2QadxQDQakxR61E/eokVAtyTHQ3MzEQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from MWHPR11MB1629.namprd11.prod.outlook.com (2603:10b6:301:d::21) by SJ0PR11MB5816.namprd11.prod.outlook.com (2603:10b6:a03:427::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.25; Tue, 27 Sep 2022 15:09:30 +0000 Received: from MWHPR11MB1629.namprd11.prod.outlook.com ([fe80::5582:9796:3aaa:aa1]) by MWHPR11MB1629.namprd11.prod.outlook.com ([fe80::5582:9796:3aaa:aa1%11]) with mapi id 15.20.5654.026; Tue, 27 Sep 2022 15:09:30 +0000 Date: Tue, 27 Sep 2022 16:09:23 +0100 From: Bruce Richardson To: Thomas Monjalon CC: Jerin Jacob , , Ferruh Yigit , Andrew Rybchenko , , , Subject: Re: [PATCH v2 1/1] ethdev: support congestion management Message-ID: References: <20220713130340.2886839-1-jerinj@marvell.com> <20220919121534.1058884-1-skori@marvell.com> <2199859.3ZeAukHxDK@thomas> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <2199859.3ZeAukHxDK@thomas> X-ClientProxiedBy: LO4P265CA0031.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2ae::7) To MWHPR11MB1629.namprd11.prod.outlook.com (2603:10b6:301:d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: MWHPR11MB1629:EE_|SJ0PR11MB5816:EE_ X-MS-Office365-Filtering-Correlation-Id: 3ab3fb20-19e1-4731-59b3-08daa09a46f3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vscJLNEEDXUvmodD1BjT9GnYofqnqysN29CkM84q+FHNCXeMJogfExbIw0SKFh/j3UkcVjbKZswLT5orZGwfacAOs9vMeLVZncv0FOt4DiVn4TJlzqdIyq5IwreAacyzWuAwPKJJnV3YSd49lIsvxa7Jz+JjnHN6whEZW4JaOxlSAuDIFS0fgLgS3IOt21Q2AF/7hKS5EkXLQqU8AooxUp2QWLrdb6V2LCAtC25wxL5MLzNe891KYto2GYxvIheelDKd6yTvq/tm65+5tzgFNoo4jG9FdJjItwyTp6P0VMDBZO5kbs2D0zB75E4yzTUw7l7FotbKzMD6Lc8CoCRlRz1GplSOJHVHkb3mOLMu0K8AuGDCltuT4mwzPi7VS+Cx+yRYhU/3qJ8Fz6liUlgvA027GUt1t4HJc170lqI5ecaxwrGzZQt483EN+TgrEPIOzvhUos+oVVvTZaZnZ0XlgVvGJk7EEZnBo6msU72VbPfCSiDi4I1WIDicUD9cpZJFBaot82JaTQvdAE64Yfg2slXSapXOzZ5La7ksH+eY1+FZjM2r6dR4yWJ8+94bhMYGw6BOpjD8P4sgLk78dfRz684nodpEZ2gGDnmfFePQZZS/ZJVnjCF8j10mGJbxFvkSU/iHxSb9mmDCFJskS/EwCQBWOQDN2DVIWbsUd0xI6EOJOg+aQIJYfcOYWbFmI783IqgPGiLuMUBYVv4WwgIIEA== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1629.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(396003)(376002)(39860400002)(136003)(366004)(346002)(451199015)(86362001)(38100700002)(82960400001)(66899015)(2906002)(186003)(26005)(44832011)(6512007)(5660300002)(6666004)(41300700001)(478600001)(6506007)(6486002)(316002)(4326008)(6916009)(54906003)(8676002)(66556008)(66476007)(8936002)(66946007); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?yIWkOSlvEgCUHFzvDEDWcvhGJE26PJ2xqcvKktXYWQgyUZMr8tT2e08Om9st?= =?us-ascii?Q?bHtkNzhneULQhL478E7ZG7QDaOQxYxLkm+IKjK69GK2YILqcdBKrhjUFRocF?= =?us-ascii?Q?kzjir5XVkuV6DAOR8XuhpfeC8I3p295cku1bEXlEKkyEkpmvpIFJJST+MwI1?= =?us-ascii?Q?nTOobwFdWUMs2KL1MHiH72a8C1HMWczFS8EmO/3jryW/7TEmJzi+KZvi1C/J?= =?us-ascii?Q?TL/w5zrwPDXmisaUtT2ypAnAMaTML9d9F0pcWvOUTa5FxJ3mwIrl6S8CdpZD?= =?us-ascii?Q?rqYyOUqhg/LgOvMNOlJSSh5rSZrLqMMTTqEixBt7ri3AAJIfuDf1beQK7gTr?= =?us-ascii?Q?iO/HSiUCgQbE5OEOTm6OrM3W51ih1nfkG9e7wEQeG6sAQf0X2DuKjKi1derq?= =?us-ascii?Q?lkCtGBdc6jbJZhvt0NSHsWTzRbW7Rr0XELNwLj2SiAJtsVuwZfJfUuFy2aVP?= =?us-ascii?Q?5Czh25cnVW4B5T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q?WN0qXF5z4hmx6GqexJ//9A941X+F7Nq2qEbyDBpFSkaVOMgZxtv27bSGGBbn?= =?us-ascii?Q?WWALm5LidREdIZ/UX5GIMTCTJAH7apAjSGjckgH2jAGrMOugFVWv8DrrrI1k?= =?us-ascii?Q?Os4M79Yn1VG8h3VqFrCB6/5zQHrjXX9tRaUPevpsoC9KFgKTvCMHOfn4h9xu?= =?us-ascii?Q?fa+2hc9+kA/0GQ16P3gEdB6/nrvXoX4NctueEm16VDwpeXRfzMClGKPA7fUv?= =?us-ascii?Q?Wg=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 3ab3fb20-19e1-4731-59b3-08daa09a46f3 X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1629.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Sep 2022 15:09:30.4607 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: /aIKJ1z5yQMs1Wq7VQAiZW+CoYLSy74sPczyiQpE7RfjOepZeHB0J/OdgnJPnffO5LhJgLSlikzABVtslgEUaGqULLNTvWQ+89Qa521GW+E= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB5816 X-OriginatorOrg: intel.com 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 On Tue, Sep 27, 2022 at 04:36:18PM +0200, Thomas Monjalon wrote: > 19/09/2022 14:15, skori@marvell.com: > > From: Jerin Jacob > > > > NIC HW controllers often come with congestion management support on > > various HW objects such as Rx queue depth or mempool queue depth. > > > > Also, it can support various modes of operation such as RED (Random > > early discard), WRED etc on those HW objects. > > > > This patch adds a framework to express such modes(enum rte_cman_mode) > > and introduce (enum rte_eth_cman_obj) to enumerate the different > > objects where the modes can operate on. > [...] > > doc/guides/nics/features.rst | 12 +++ > > doc/guides/nics/features/default.ini | 1 + > > lib/eal/include/meson.build | 1 + > > lib/eal/include/rte_cman.h | 55 ++++++++++ > > lib/ethdev/ethdev_driver.h | 25 +++++ > > lib/ethdev/meson.build | 1 + lib/ethdev/rte_cman.c | > > 101 ++++++++++++++++++ lib/ethdev/rte_ethdev.h | 151 > > +++++++++++++++++++++++++++ lib/ethdev/version.map | 6 > > ++ > > I feel EAL is not the right place for CMAN definitions. > > After a discussion with Jerin, I understand we could use the same > definitions in other API classes, not only ethdev. However I think this > .h file should be better hosted in lib/ethdev/ with its own namespace > rte_cman. Then other libs could include this rte_cman.h without having a > strong dependency on ethdev. > > Deal? > Would rte_net also be an option? Alternatively, is this related to the work and structures defined in the meter library header, since it seems also related to congestion management on ingress? /Bruce