mirror of https://gitee.com/openkylin/linux.git
net/mlx5e: kTLS, Release reference on DUMPed fragments in shutdown flow
A call to kTLS completion handler was missing in the TXQSQ release
flow. Add it.
Fixes: d2ead1f360
("net/mlx5e: Add kTLS TX HW offload support")
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Reviewed-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
This commit is contained in:
parent
500f36a485
commit
2c55936138
|
@ -86,7 +86,7 @@ struct sk_buff *mlx5e_ktls_handle_tx_skb(struct net_device *netdev,
|
|||
struct mlx5e_tx_wqe **wqe, u16 *pi);
|
||||
void mlx5e_ktls_tx_handle_resync_dump_comp(struct mlx5e_txqsq *sq,
|
||||
struct mlx5e_tx_wqe_info *wi,
|
||||
struct mlx5e_sq_dma *dma);
|
||||
u32 *dma_fifo_cc);
|
||||
|
||||
#else
|
||||
|
||||
|
@ -94,6 +94,11 @@ static inline void mlx5e_ktls_build_netdev(struct mlx5e_priv *priv)
|
|||
{
|
||||
}
|
||||
|
||||
static inline void
|
||||
mlx5e_ktls_tx_handle_resync_dump_comp(struct mlx5e_txqsq *sq,
|
||||
struct mlx5e_tx_wqe_info *wi,
|
||||
u32 *dma_fifo_cc) {}
|
||||
|
||||
#endif
|
||||
|
||||
#endif /* __MLX5E_TLS_H__ */
|
||||
|
|
|
@ -303,9 +303,16 @@ tx_post_resync_dump(struct mlx5e_txqsq *sq, skb_frag_t *frag, u32 tisn, bool fir
|
|||
|
||||
void mlx5e_ktls_tx_handle_resync_dump_comp(struct mlx5e_txqsq *sq,
|
||||
struct mlx5e_tx_wqe_info *wi,
|
||||
struct mlx5e_sq_dma *dma)
|
||||
u32 *dma_fifo_cc)
|
||||
{
|
||||
struct mlx5e_sq_stats *stats = sq->stats;
|
||||
struct mlx5e_sq_stats *stats;
|
||||
struct mlx5e_sq_dma *dma;
|
||||
|
||||
if (!wi->resync_dump_frag)
|
||||
return;
|
||||
|
||||
dma = mlx5e_dma_get(sq, (*dma_fifo_cc)++);
|
||||
stats = sq->stats;
|
||||
|
||||
mlx5e_tx_dma_unmap(sq->pdev, dma);
|
||||
__skb_frag_unref(wi->resync_dump_frag);
|
||||
|
|
|
@ -479,14 +479,7 @@ bool mlx5e_poll_tx_cq(struct mlx5e_cq *cq, int napi_budget)
|
|||
skb = wi->skb;
|
||||
|
||||
if (unlikely(!skb)) {
|
||||
#ifdef CONFIG_MLX5_EN_TLS
|
||||
if (wi->resync_dump_frag) {
|
||||
struct mlx5e_sq_dma *dma =
|
||||
mlx5e_dma_get(sq, dma_fifo_cc++);
|
||||
|
||||
mlx5e_ktls_tx_handle_resync_dump_comp(sq, wi, dma);
|
||||
}
|
||||
#endif
|
||||
mlx5e_ktls_tx_handle_resync_dump_comp(sq, wi, &dma_fifo_cc);
|
||||
sqcc += wi->num_wqebbs;
|
||||
continue;
|
||||
}
|
||||
|
@ -542,29 +535,38 @@ void mlx5e_free_txqsq_descs(struct mlx5e_txqsq *sq)
|
|||
{
|
||||
struct mlx5e_tx_wqe_info *wi;
|
||||
struct sk_buff *skb;
|
||||
u32 dma_fifo_cc;
|
||||
u16 sqcc;
|
||||
u16 ci;
|
||||
int i;
|
||||
|
||||
while (sq->cc != sq->pc) {
|
||||
ci = mlx5_wq_cyc_ctr2ix(&sq->wq, sq->cc);
|
||||
sqcc = sq->cc;
|
||||
dma_fifo_cc = sq->dma_fifo_cc;
|
||||
|
||||
while (sqcc != sq->pc) {
|
||||
ci = mlx5_wq_cyc_ctr2ix(&sq->wq, sqcc);
|
||||
wi = &sq->db.wqe_info[ci];
|
||||
skb = wi->skb;
|
||||
|
||||
if (!skb) {
|
||||
sq->cc += wi->num_wqebbs;
|
||||
mlx5e_ktls_tx_handle_resync_dump_comp(sq, wi, &dma_fifo_cc);
|
||||
sqcc += wi->num_wqebbs;
|
||||
continue;
|
||||
}
|
||||
|
||||
for (i = 0; i < wi->num_dma; i++) {
|
||||
struct mlx5e_sq_dma *dma =
|
||||
mlx5e_dma_get(sq, sq->dma_fifo_cc++);
|
||||
mlx5e_dma_get(sq, dma_fifo_cc++);
|
||||
|
||||
mlx5e_tx_dma_unmap(sq->pdev, dma);
|
||||
}
|
||||
|
||||
dev_kfree_skb_any(skb);
|
||||
sq->cc += wi->num_wqebbs;
|
||||
sqcc += wi->num_wqebbs;
|
||||
}
|
||||
|
||||
sq->dma_fifo_cc = dma_fifo_cc;
|
||||
sq->cc = sqcc;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_MLX5_CORE_IPOIB
|
||||
|
|
Loading…
Reference in New Issue