net/mlx5e: Fix missing error code in mlx5e_rx_reporter_err_icosq_cqe_recover()
Subsystems (4)
PATCH 1/2 net/mlx5e: Fix missing error code in mlx5e_rx_reporter_err_icosq_cqe_recover()
The error code is missing in this code scenario, add the error code '-EINVAL' to the return value 'err'.
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c:104 mlx5e_rx_reporter_err_icosq_cqe_recover() warn: missing error code 'err'.
--- drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c +3 -1
@@ -100,8 +100,10 @@ static int mlx5e_rx_reporter_err_icosq_cqe_recover(void *ctx) goto out; } -if (state !=MLX5_SQC_STATE_ERR ) +if (state !=MLX5_SQC_STATE_ERR ) { + err = -EINVAL ; goto out; + }mlx5e_deactivate_rq (rq);if (xskrq)
Signature · 1 line
2.20.1.7.g153144c
PATCH 2/2 net/mlx5e: Fix missing error code in mlx5e_rx_reporter_err_icosq_cqe_recover()
The error code is missing in this code scenario, add the error code '-EINVAL' to the return value 'err'.
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c:105 mlx5e_tx_reporter_err_cqe_recover() warn: missing error code 'err'.
--- drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c +3 -1
@@ -101,8 +101,10 @@ static int mlx5e_tx_reporter_err_cqe_recover(void *ctx) goto out; } -if (state !=MLX5_SQC_STATE_ERR ) +if (state !=MLX5_SQC_STATE_ERR ) { + err = -EINVAL ; goto out; + }mlx5e_tx_disable_queue (sq->txq);
Signature · 1 line
2.20.1.7.g153144c
Hi Jiapeng,
This looks good too.
Quoted 31 lines · Jiapeng Chong
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
The error code is missing in this code scenario, add the error code '
-EINVAL' to the return value 'err'.
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c:105mlx5e_tx_reporter_err_cqe_recover()warn: missing error code 'err'.Reported-by Abaci Robot <[email protected]>Signed-off-by Jiapeng Chong <[email protected]>--- drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c +3
-2@@ -101,8 +101,10 @@ static int mlx5e_tx_reporter_err_cqe_recover(void *ctx) goto out; } -if (state !=MLX5_SQC_STATE_ERR ) +if (state !=MLX5_SQC_STATE_ERR ) { + err = -EINVAL ; goto out; + }mlx5e_tx_disable_queue (sq->txq); --
Quoted 1 line
2.20.1.7.g153144c
BR
Steen
Quoted 17 lines · Jiapeng Chong
The error code is missing in this code scenario, add the error code '
-EINVAL' to the return value 'err'.
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c:105mlx5e_tx_reporter_err_cqe_recover()warn: missing error code 'err'.Reported-by Abaci Robot <[email protected]>Signed-off-by Jiapeng Chong <[email protected]>--- drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c +0
-0
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c static int mlx5e_tx_reporter_err_cqe_recover(void *ctx) · line 105
Quoted 6 lines
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c +2
-1@@ -101,8 +101,10 @@ static int mlx5e_tx_reporter_err_cqe_recover(void *ctx) goto out; } -if (state !=MLX5_SQC_STATE_ERR ) +if (state !=MLX5_SQC_STATE_ERR ) { + err = -EINVAL ;
Same comment as for patch #1.
Quoted 8 lines
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c +1
-0goto out; + }mlx5e_tx_disable_queue (sq->txq);Signature · 1 line
2.20.1.7.g153144c
Hi Jiapeng,
Looks good to me.
Quoted 31 lines · Jiapeng Chong
EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
The error code is missing in this code scenario, add the error code '
-EINVAL' to the return value 'err'.
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c:104mlx5e_rx_reporter_err_icosq_cqe_recover()warn: missing error code 'err'.Reported-by Abaci Robot <[email protected]>Signed-off-by Jiapeng Chong <[email protected]>--- drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c +3
-2@@ -100,8 +100,10 @@ static int mlx5e_rx_reporter_err_icosq_cqe_recover(void *ctx) goto out; } -if (state !=MLX5_SQC_STATE_ERR ) +if (state !=MLX5_SQC_STATE_ERR ) { + err = -EINVAL ; goto out; + }mlx5e_deactivate_rq (rq);if (xskrq) --
Quoted 1 line
2.20.1.7.g153144c
BR
Steen
Quoted 17 lines · Jiapeng Chong
The error code is missing in this code scenario, add the error code '
-EINVAL' to the return value 'err'.
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c:104mlx5e_rx_reporter_err_icosq_cqe_recover()warn: missing error code 'err'.Reported-by Abaci Robot <[email protected]>Signed-off-by Jiapeng Chong <[email protected]>--- drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c +0
-0
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c static int mlx5e_rx_reporter_err_icosq_cqe_recover(void *ctx) · line 104
Quoted 6 lines
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c +2
-1@@ -100,8 +100,10 @@ static int mlx5e_rx_reporter_err_icosq_cqe_recover(void *ctx) goto out; } -if (state !=MLX5_SQC_STATE_ERR ) +if (state !=MLX5_SQC_STATE_ERR ) { + err = -EINVAL ;
I'm not sure about correctness of this change. SQC is not in error state, there is nothing to recover here.
Thanks
Quoted 8 lines
drivers/net/ethernet/mellanox/mlx5/core/en/reporter_rx.c +1
-0goto out; + }mlx5e_deactivate_rq (rq);if (xskrq)Signature · 1 line
2.20.1.7.g153144c