OSDN Git Service

net/mlx5e: Use the right DMA free function on TX path
authorAchiad Shochat <achiad@mellanox.com>
Thu, 12 Nov 2015 17:35:28 +0000 (19:35 +0200)
committerDavid S. Miller <davem@davemloft.net>
Sun, 15 Nov 2015 23:43:40 +0000 (18:43 -0500)
commitd4e28cbd24c8cb004960ddb8b22124953f6c220c
tree56c1b4cca0d61a221b61f595027488b659c439fa
parent50a9eea694ab8e0779069e0a4e0b12e145521468
net/mlx5e: Use the right DMA free function on TX path

On xmit path we use skb_frag_dma_map() which is using dma_map_page(),
while upon completion we dma-unmap the skb fragments using
dma_unmap_single() rather than dma_unmap_page().

To fix this, we now save the dma map type on xmit path and use this
info to call the right dma unmap method upon TX completion.

Signed-off-by: Achiad Shochat <achiad@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_tx.c