net/iavf: fix tx thresh check issue
PATCH 1/1 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.
--- drivers/net/iavf/iavf_rxtx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/net/iavf/iavf_rxtx.c +2 -1
@@ -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]) {
Signature · 1 line
2.25.1
Quoted 10 lines
-----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
Quoted 3 lines
Function
check_tx_threshis called with wrong parameter. If the check fails,tx_queue_setupshould return error not keep going.
iThis patch fixes above issues.
Typo: This
Except that,
Quoted 25 lines
Fixes 69dd4c3d0898 ("net/avf: enable queue and device")Signed-off-by Xiaoyun Li <[email protected]>--- drivers/net/iavf/iavf_rxtx.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)drivers/net/iavf/iavf_rxtx.c index renamed from drivers/net/iavf/iavf_rxtx.c +0
-0
d61b32fcee..e33fe4576b100644drivers/net/iavf/iavf_rxtx.c +2
-2@@ -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
Zhang, Qi Z
AppliedQuoted 20 lines
-----Original Message-----
From: dev <[email protected]> On Behalf Of Xing, Beilei
Sent: Friday, July 23, 2021 10:43 AM
To: Li, Xiaoyun <[email protected]>; [email protected]; Wu, Jingjing <[email protected]>
Cc: [email protected]
Subject: Re: [dpdk-dev] [PATCH] net/iavf: fix tx thresh check issueQuoted 8 lines
-----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
Quoted 8 lines
Quoted 3 lines
Function
check_tx_threshis called with wrong parameter. If the check fails,tx_queue_setupshould return error not keep going. iThis patch fixes above issues.Typo: This
Except that,
Acked-by Beilei Xing <[email protected]>
Applied to dpdk-next-net-intel with typo fix
Thanks
Qi