On 9/9/2020 4:52 PM, Lance Richardson wrote:
> Return correct values for Rx/Tx offloads and for rx_drop_en.
> 
> Fixes: 2fc201884be8 ("net/bnxt: support rxq/txq get information")
> Reviewed-by: Ajit Kumar Khaparde <ajit.khapa...@broadcom.com>
> Signed-off-by: Lance Richardson <lance.richard...@broadcom.com>
> Cc: sta...@dpdk.org
> ---
>  drivers/net/bnxt/bnxt_ethdev.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/bnxt/bnxt_ethdev.c b/drivers/net/bnxt/bnxt_ethdev.c
> index 7a77922c0c..5585f872d0 100644
> --- a/drivers/net/bnxt/bnxt_ethdev.c
> +++ b/drivers/net/bnxt/bnxt_ethdev.c
> @@ -2588,8 +2588,9 @@ bnxt_rxq_info_get_op(struct rte_eth_dev *dev, uint16_t 
> queue_id,
>       qinfo->nb_desc = rxq->nb_rx_desc;
>  
>       qinfo->conf.rx_free_thresh = rxq->rx_free_thresh;
> -     qinfo->conf.rx_drop_en = 0;
> +     qinfo->conf.rx_drop_en = 1;

Why 0 is wrong but 1 is correct?

Technically 'rx_drop_en' is a user configuration, which is set via
'rte_eth_rx_queue_setup()' API.

bnxt seems not honoring this config option at all.

Based on HW capability, I think two things can be done,
1) Configure the HW based on config request, and return configured value in
'bnxt_rxq_info_get_op()'. see 'ixgbe'.

2) If HW is not configurable, check the value in 'rte_eth_rx_queue_setup()'
a) return error if unsupported value requested. see 'sfc'.
b) log a warning and overwrite the requested config with whatever supported.
And for both a & b, return current config in the 'bnxt_rxq_info_get_op()'

>       qinfo->conf.rx_deferred_start = rxq->rx_deferred_start;
> +     qinfo->conf.offloads = dev->data->dev_conf.rxmode.offloads;

This is for queue specific offloads, you are returning port offloads.
As far as I can see bnxt doesn't have any queue specific offload, so this can be
dropped.

Reply via email to