[PATCH 13/17] net/dpaa: add Tx rate limiting DPAA PMD API
Hemant Agrawal
hemant.agrawal at oss.nxp.com
Fri Aug 23 09:35:44 CEST 2024
On 07-08-2024 21:10, Ferruh Yigit wrote:
> On 8/1/2024 11:53 AM, Hemant Agrawal wrote:
>> From: Vinod Pullabhatla <vinod.pullabhatla at nxp.com>
>>
>> Add support to set Tx rate on DPAA platform through PMD APIs
>>
>> Signed-off-by: Vinod Pullabhatla <vinod.pullabhatla at nxp.com>
>> Signed-off-by: Rohit Raj <rohit.raj at nxp.com>
> <...>
>
>> 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.
>
More information about the dev
mailing list