[dpdk-dev] [PATCH v3 1/4] ethdev: add a field for rxq info structure

Matan Azrad matan at nvidia.com
Tue Sep 1 17:33:58 CEST 2020


Hi Chengchang

Please see some question below.

From: Chengchang Tang
> Add a field named rx_buf_size in rte_eth_rxq_info to indicate the buffer size
> used in receiving packets for HW.
> 
> In this way, upper-layer users can get this information by calling
> rte_eth_rx_queue_info_get.
> 
> Signed-off-by: Chengchang Tang <tangchengchang at huawei.com>
> Reviewed-by: Wei Hu (Xavier) <xavier.huwei at huawei.com>
> Acked-by: Andrew Rybchenko <arybchenko at solarflare.com>
> ---
>  lib/librte_ethdev/rte_ethdev.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
> index 70295d7..9fed5cb 100644
> --- a/lib/librte_ethdev/rte_ethdev.h
> +++ b/lib/librte_ethdev/rte_ethdev.h
> @@ -1420,6 +1420,8 @@ struct rte_eth_rxq_info {
>         struct rte_eth_rxconf conf; /**< queue config parameters. */
>         uint8_t scattered_rx;       /**< scattered packets RX supported. */
>         uint16_t nb_desc;           /**< configured number of RXDs. */
> +       /**< buffer size used for hardware when receive packets. */
> +       uint16_t rx_buf_size;

Is it the maximum supported Rx buffer by the HW?
If yes, maybe max_rx_buf_size is better name?

Maybe document that 0 means - no limitation by HW?

Must application read it in order to know if its datapath should handle multi-segment buffers?

Maybe it will be good to force application to configure scatter when this field is valid and smaller than max_rx_pkt_len\max_lro.. (<= room size)...


>  } __rte_cache_min_aligned;
> 
>  /**
> --
> 2.7.4



More information about the dev mailing list