[dpdk-dev] [RFC PATCH v1 1/4] ethdev: add support for PMD-tuned Tx/Rx parameters

Shreyansh Jain shreyansh.jain at nxp.com
Wed Mar 14 13:28:15 CET 2018


> -----Original Message-----
> From: Remy Horton [mailto:remy.horton at intel.com]
> Sent: Wednesday, March 7, 2018 5:39 PM
> To: dev at dpdk.org
> Cc: Wenzhuo Lu <wenzhuo.lu at intel.com>; Jingjing Wu
> <jingjing.wu at intel.com>; Qi Zhang <qi.z.zhang at intel.com>; Beilei Xing
> <beilei.xing at intel.com>; Shreyansh Jain <shreyansh.jain at nxp.com>;
> Thomas Monjalon <thomas at monjalon.net>
> Subject: [RFC PATCH v1 1/4] ethdev: add support for PMD-tuned Tx/Rx
> parameters
> 
> The optimal values of several transmission & reception related
> parameters, such as burst sizes, descriptor ring sizes, and number
> of queues, varies between different network interface devices. This
> patch allows individual PMDs to specify preferred parameter values.
> 
> Signed-off-by: Remy Horton <remy.horton at intel.com>
> ---
>  lib/librte_ether/rte_ethdev.c | 18 ++++++++++++++++++
>  lib/librte_ether/rte_ethdev.h | 15 +++++++++++++++
>  2 files changed, 33 insertions(+)
> 
> diff --git a/lib/librte_ether/rte_ethdev.c
> b/lib/librte_ether/rte_ethdev.c
> index 0590f0c..1630407 100644
> --- a/lib/librte_ether/rte_ethdev.c
> +++ b/lib/librte_ether/rte_ethdev.c
> @@ -1461,6 +1461,10 @@ rte_eth_rx_queue_setup(uint16_t port_id,
> uint16_t rx_queue_id,
>  		return -EINVAL;
>  	}
> 
> +	/* Use default specified by driver, if nb_rc_desc is zero */
                                            ^^^^^^^^^^^
                                         Should be '_rx_'

> +	if (nb_rx_desc == 0)
> +		nb_rx_desc = dev_info.preferred_queue_values.rx_ring_size;
> +
>  	if (nb_rx_desc > dev_info.rx_desc_lim.nb_max ||
>  			nb_rx_desc < dev_info.rx_desc_lim.nb_min ||
>  			nb_rx_desc % dev_info.rx_desc_lim.nb_align != 0) {
> @@ -1584,6 +1588,10 @@ rte_eth_tx_queue_setup(uint16_t port_id,
> uint16_t tx_queue_id,
> 

[...]

Other than the above;

Acked-by: Shreyansh Jain <Shreyansh.jain at nxp.com>


More information about the dev mailing list