Skip to content

Commit 2bcae12

Browse files
Gerd BayerSaeed Mahameed
authored andcommitted
net/mlx5: Fix error path in multi-packet WQE transmit
Remove the erroneous unmap in case no DMA mapping was established The multi-packet WQE transmit code attempts to obtain a DMA mapping for the skb. This could fail, e.g. under memory pressure, when the IOMMU driver just can't allocate more memory for page tables. While the code tries to handle this in the path below the err_unmap label it erroneously unmaps one entry from the sq's FIFO list of active mappings. Since the current map attempt failed this unmap is removing some random DMA mapping that might still be required. If the PCI function now presents that IOVA, the IOMMU may assumes a rogue DMA access and e.g. on s390 puts the PCI function in error state. The erroneous behavior was seen in a stress-test environment that created memory pressure. Fixes: 5af75c7 ("net/mlx5e: Enhanced TX MPWQE for SKBs") Signed-off-by: Gerd Bayer <[email protected]> Reviewed-by: Zhu Yanjun <[email protected]> Acked-by: Maxim Mikityanskiy <[email protected]> Signed-off-by: Saeed Mahameed <[email protected]>
1 parent 0cbfd45 commit 2bcae12

File tree

1 file changed

+0
-1
lines changed
  • drivers/net/ethernet/mellanox/mlx5/core

1 file changed

+0
-1
lines changed

drivers/net/ethernet/mellanox/mlx5/core/en_tx.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -642,7 +642,6 @@ mlx5e_sq_xmit_mpwqe(struct mlx5e_txqsq *sq, struct sk_buff *skb,
642642
return;
643643

644644
err_unmap:
645-
mlx5e_dma_unmap_wqe_err(sq, 1);
646645
sq->stats->dropped++;
647646
dev_kfree_skb_any(skb);
648647
mlx5e_tx_flush(sq);

0 commit comments

Comments
 (0)