> -----Original Message-----
> From: Li, Xiaoyun <[email protected]>
> Sent: Thursday, July 22, 2021 3:56 PM
> To: [email protected]; Wu, Jingjing <[email protected]>; Xing, Beilei
> <[email protected]>
> Cc: Li, Xiaoyun <[email protected]>; [email protected]
> Subject: [PATCH] net/iavf: fix tx thresh check issue
> 
> Function check_tx_thresh is called with wrong parameter. If the check fails,
> tx_queue_setup should return error not keep going.
> iThis patch fixes above issues.

Typo: This

Except that,
Acked-by: Beilei Xing <[email protected]>

> 
> Fixes: 69dd4c3d0898 ("net/avf: enable queue and device")
> Cc: [email protected]
> 
> Signed-off-by: Xiaoyun Li <[email protected]>
> ---
>  drivers/net/iavf/iavf_rxtx.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/iavf/iavf_rxtx.c b/drivers/net/iavf/iavf_rxtx.c index
> d61b32fcee..e33fe4576b 100644
> --- a/drivers/net/iavf/iavf_rxtx.c
> +++ b/drivers/net/iavf/iavf_rxtx.c
> @@ -708,7 +708,8 @@ iavf_dev_tx_queue_setup(struct rte_eth_dev *dev,
>               tx_conf->tx_rs_thresh : DEFAULT_TX_RS_THRESH);
>       tx_free_thresh = (uint16_t)((tx_conf->tx_free_thresh) ?
>               tx_conf->tx_free_thresh : DEFAULT_TX_FREE_THRESH);
> -     check_tx_thresh(nb_desc, tx_rs_thresh, tx_rs_thresh);
> +     if (check_tx_thresh(nb_desc, tx_rs_thresh, tx_free_thresh) != 0)
> +             return -EINVAL;
> 
>       /* Free memory if needed. */
>       if (dev->data->tx_queues[queue_idx]) {
> --
> 2.25.1

Reply via email to