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 130BF45843; Fri, 23 Aug 2024 09:36:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5363643281; Fri, 23 Aug 2024 09:35:54 +0200 (CEST) Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012060.outbound.protection.outlook.com [52.101.66.60]) by mails.dpdk.org (Postfix) with ESMTP id 44D0B43264 for ; Fri, 23 Aug 2024 09:35:53 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=uH1lzqu8OZdo52qQAgy4wh1pOJU3os/AVnCTKjWTLbRSXPNIW9jcM66YZyDwyOClsT4gIa/M0VfKx/77Gs6EgKUlqqBXfk1ZyOGXnkivT6A8jx+dhPrDE6SX7Te4QTMB7LLkG4c9SZTlg4tJ7FS7u2DCfdQMXt0QDMCLirftq/IQR0h/NxkZYdmR3GEi2JSL4in16ss2ehkvaqxGo9fs0aaO3jHkzx53suer2Ia2a1izsVjujgaoBWVtxqQrT1tLUuToF5Uf/kKOAPOcigln0g2izJ7hGy+292jSqX937IEbPw+hs2K/7M5MX6Wau0RIoBJ0WRAYP6cZqBby1ZyYKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=VRC3HpQMTk1TBA6oGsoEHeHFQRh8kmTQYN7K5XtIu8E=; b=tT9JE9F4l7nGi9VJC9CuG2h0Ic5IR8q+B6tT35kO6GPjZY8s889NCM8e2ccOK+VzFVDunjXe6D2AoKHYUtAmqDEV7yu0o0u0bTwOjBf+i0PcsSomxRuMFyXVEcScg6dN78L0wpEqwv/ElquS1mzqikbAW2n7OYiKDZqxqAdzOCb92Rh7243IZauqDJUkjmIVHDkiAv+v5v8Z0iQ1aU0AeqZNNtv/g/RgeElqRmFBxJFE/L/BBGVbQCUrAeq7TrCDL0kxyWDkzddgblatmFccL6uW5jT5BTfkqoNjO52gDYdPyCznvybreijPtRDYI9yRS4gkW9Ry9vMjo/clyv1dVA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=VRC3HpQMTk1TBA6oGsoEHeHFQRh8kmTQYN7K5XtIu8E=; b=Xt7CC4wqjdOL2+WpSRg0wAiAAVtIAt5XQH9Um1MRe3AXKwi+Ycy3snTRd9Htz1QGtLW61qcy7BeiBHNNhhgK9sMb7uS7OTqJI35Dp7FbvrHgYXGb8JCn2NQxVWRDKU7/N/WJjMv0y2Ly/4b0UWKNcLh7g56qU+KTo2Joct1iPfyBlW+CuFZe2+NY2ulg7Vh33Z5M+Q3ch/V0SrXSLfhUN3FPMpFBOc2zri/NGXW+RgBu0q3NRo3OWRoZFuMobo6iwj1YCkt10Ytib3QLeoOjdpbYW5LzXr8iYF9Gda10VpzqjNdeh3lEgXX9rK92yF+ktAgqaGJKP7Ga2aWB7GnHwg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) by AS5PR04MB9755.eurprd04.prod.outlook.com (2603:10a6:20b:650::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7875.22; Fri, 23 Aug 2024 07:35:51 +0000 Received: from PAXPR04MB9328.eurprd04.prod.outlook.com ([fe80::367:d59:375:fb87]) by PAXPR04MB9328.eurprd04.prod.outlook.com ([fe80::367:d59:375:fb87%3]) with mapi id 15.20.7875.019; Fri, 23 Aug 2024 07:35:51 +0000 Message-ID: <3d581529-632f-fcad-8ee3-5cd248af41dc@oss.nxp.com> Date: Fri, 23 Aug 2024 13:05:44 +0530 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 Subject: Re: [PATCH 13/17] net/dpaa: add Tx rate limiting DPAA PMD API Content-Language: en-US To: Ferruh Yigit , Hemant Agrawal , dev@dpdk.org Cc: Vinod Pullabhatla , Rohit Raj , "Dumitrescu, Cristian" , Ori Kam References: <20240801105313.630280-1-hemant.agrawal@nxp.com> <20240801105313.630280-14-hemant.agrawal@nxp.com> <57b00e5c-5931-4c79-bce0-f3dcf4c4bbb2@amd.com> From: Hemant Agrawal In-Reply-To: <57b00e5c-5931-4c79-bce0-f3dcf4c4bbb2@amd.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: SI1PR02CA0035.apcprd02.prod.outlook.com (2603:1096:4:1f6::8) To PAXPR04MB9328.eurprd04.prod.outlook.com (2603:10a6:102:2b6::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9328:EE_|AS5PR04MB9755:EE_ X-MS-Office365-Filtering-Correlation-Id: 7cf8bd04-2183-4d91-6620-08dcc3463676 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|366016|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?B?TUFyS2JDSGE3cXRwUnA4dEN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= =?utf-8?B?YlFOZTJaYUptS1hxQUFzUT09?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:PAXPR04MB9328.eurprd04.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(366016)(1800799024); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?M25XR0tXZlVXaDhpdkJJMHFQTmNEdHlyS1JPcStPMjZDZ0szQVBZMWM0TS9H?= =?utf-8?B?eG5naWFGN1RUbFRxYTdmTU5qdzVrN0R4Y0pZNDhWcWVJM2dlTXp3RHdDZXIw?= =?utf-8?B?YVFlNTBJNWJtVnlkRHFxbW5Zb2Zzek1MeXl5dHM5eXhNZ3pLVGQxRE1yc3VP?= =?utf-8?B?bllJYnhhVW95ZS9OL2E2TlRMMWgwbFRSLzNoK3NUM0xJR1grNnZ1dVRNVEpC?= =?utf-8?B?MEtucnBtY1h5ZDFKTHhrTlZ1WjJkb3NUNUdjTVVyaG50dytLNFVWc3h3dzBp?= =?utf-8?B?bjg3ZHBpdlN1MFhkdEI0enk1cklLNkVtYTJOMjlqOUhFa1Q4NU1kRnBlWGxu?= =?utf-8?B?TGRKMUpvS0Zib0diZWh5U1RtWmwvWXduTkNiL3VyUnZqTkJHRUhRbHd2Sktm?= =?utf-8?B?bUpJdkZnbVFlS1ZEVGdkZ1h2aHAxMW5JdjNaWkV1MndoMmlyTmV6YU9iTVJG?= =?utf-8?B?VDRMeW5mcEZjdzhMdVhxZGxxVmtzWjJiaTFlSE51TlN5aTVhQ2YzcExmYlJn?= =?utf-8?B?VEtvNXo1UzFYTGJBNkZCNFh2OGkyeVh1cWk5SS9QdWxBWk9ZODlxSndSVmRY?= =?utf-8?B?eUJvZjlwb1FjbWpneXVYVUJJamtHWHcvN05uRERKbjM5bDJvZVpxbzJkVDVP?= =?utf-8?B?N1RCN2l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?= =?utf-8?B?cDVLak5OWlZXcFB0ZEFGdmM3M1M4V3RPZEF6dDlmckdzaFBsdHlYQVluNWFE?= =?utf-8?B?ZTgySm5iVHdQaTVvU1lTZ3pJQnUwOWUvZU1SdmJnb2tDWGEzNE5RRXVLM01l?= =?utf-8?B?ZHA2bzdlSEZqQ1JEblZZTWp2aVYyNmhTZGsvMmwwU0g2UGkvZGZFMDFEYlU5?= =?utf-8?B?Rm1xSVRyYlFlVlIrRkF6amF0cC80b3F0Zjl6RUFnZ3kxbmdkTHRTbWd5dXFW?= =?utf-8?B?OEE1SWdIMVR6N0dBR24xUDFQRlN1dmtJa0UxbmtPUVFzcDhmZnYxSDEvZ1dy?= =?utf-8?B?RVUzcnduVjVEVjZ2OEFQZVlYbUQzRlJvYm10NjhvRU5LUTluZXdMaUx3OFFw?= =?utf-8?B?MlRBanYvVXdSRlY1Qk8rcEtVUm5TMG8wbnVyUUhKNG4rdTBvd3o1SmVvUTJp?= =?utf-8?B?SW9NcWdQcWZnQlN3T0I3OGxCcXVyQ1dLOFc0VXE3NHM2SzFzbkFGcDV4OUlw?= =?utf-8?B?N3RUWkJxdDRFV2xvZ1VxY3UrblF0U3JDSmdLRExGREhjOGJLM3EwY29qaysv?= =?utf-8?B?bUpFNWMrNUtpWEU1TThpWkIzVGdHNTgrZ2RidGFicThYeGpKeS9BR2lrUTFK?= =?utf-8?B?SEE9PQ==?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7cf8bd04-2183-4d91-6620-08dcc3463676 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9328.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Aug 2024 07:35:51.1093 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 6oTpo4+f7uZFg6RtyULTcGHn6QDBMMV1WO6s2b8Cu66yEUtEGzlAj+XvnK2vFdQE0StvDzwY7EPtZlymLZlzIA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS5PR04MB9755 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 07-08-2024 21:10, Ferruh Yigit wrote: > On 8/1/2024 11:53 AM, Hemant Agrawal wrote: >> From: Vinod Pullabhatla >> >> Add support to set Tx rate on DPAA platform through PMD APIs >> >> Signed-off-by: Vinod Pullabhatla >> Signed-off-by: Rohit Raj > <...> > >> diff --git a/drivers/net/dpaa/rte_pmd_dpaa.h b/drivers/net/dpaa/rte_pmd_dpaa.h >> index ec45633ba2..b48adff570 100644 >> --- a/drivers/net/dpaa/rte_pmd_dpaa.h >> +++ b/drivers/net/dpaa/rte_pmd_dpaa.h >> @@ -1,5 +1,5 @@ >> /* SPDX-License-Identifier: BSD-3-Clause >> - * Copyright 2018 NXP >> + * Copyright 2018,2022 NXP >> */ >> >> #ifndef _PMD_DPAA_H_ >> @@ -31,4 +31,27 @@ >> int >> rte_pmd_dpaa_set_tx_loopback(uint16_t port, uint8_t on); >> >> +/** >> + * Set TX rate limit >> + * >> + * @param port_id >> + * The port identifier of the Ethernet device. >> + * @param burst >> + * Max burst size(KBytes) of the Ethernet device. >> + * 0 - Disable TX rate limit. >> + * @param rate >> + * Max rate(Kb/sec) of the Ethernet device. >> + * 0 - Disable TX rate limit. >> + * @return >> + * 0 - if successful. >> + * <0 - if failed, with proper error code. >> + * >> + * @warning >> + * @b EXPERIMENTAL: this API may change, or be removed, without prior notice >> + */ >> +__rte_experimental >> +int >> +rte_pmd_dpaa_port_set_rate_limit(uint16_t port_id, uint16_t burst, >> + uint32_t rate); >> + >> > We are trying to avoid from PMD specific APIs as much as possible. > > Can't this be implemented via TM / metering? Or flow API? We are yet to implement TM framework for DPAA1.  But that involves more of egress QoS. This one is additional capability to limit the ingress port. Kind of policing in Rx side. >