mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
net/mlx5e: Update netdev txq on completions during closure
[ Upstream commit5e911e2c06
] On sq closure when we free its descriptors, we should also update netdev txq on completions which would not arrive. Otherwise if we reopen sqs and attach them back, for example on fw fatal recovery flow, we may get tx timeout. Fixes:29429f3300
("net/mlx5e: Timeout if SQ doesn't flush during close") Signed-off-by: Moshe Shemesh <moshe@mellanox.com> Reviewed-by: Tariq Toukan <tariqt@mellanox.com> Signed-off-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
d3f34cc63d
commit
5fd86d7232
1 changed files with 5 additions and 1 deletions
|
@ -496,8 +496,9 @@ bool mlx5e_poll_tx_cq(struct mlx5e_cq *cq, int napi_budget)
|
|||
void mlx5e_free_txqsq_descs(struct mlx5e_txqsq *sq)
|
||||
{
|
||||
struct mlx5e_tx_wqe_info *wi;
|
||||
u32 nbytes = 0;
|
||||
u16 ci, npkts = 0;
|
||||
struct sk_buff *skb;
|
||||
u16 ci;
|
||||
int i;
|
||||
|
||||
while (sq->cc != sq->pc) {
|
||||
|
@ -518,8 +519,11 @@ void mlx5e_free_txqsq_descs(struct mlx5e_txqsq *sq)
|
|||
}
|
||||
|
||||
dev_kfree_skb_any(skb);
|
||||
npkts++;
|
||||
nbytes += wi->num_bytes;
|
||||
sq->cc += wi->num_wqebbs;
|
||||
}
|
||||
netdev_tx_completed_queue(sq->txq, npkts, nbytes);
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MLX5_CORE_IPOIB
|
||||
|
|
Loading…
Reference in a new issue