mlx5: handle DMA mapping error case for XDP redirect
authorJesper Dangaard Brouer <brouer@redhat.com>
Mon, 30 Jul 2018 17:49:08 +0000 (19:49 +0200)
committerDavid S. Miller <davem@davemloft.net>
Tue, 31 Jul 2018 16:44:41 +0000 (09:44 -0700)
commit39c64d8c876622e766dd2112baf81151dd82da02
treeb1bb7579587bf14e0199b644c535a70f52ded8e2
parent6ae746711263bd6da45f709fdb9f12e4f57e22bd
mlx5: handle DMA mapping error case for XDP redirect

Commit 58b99ee3e3eb ("net/mlx5e: Add support for XDP_REDIRECT in device-out side")
forgot to return/free the xdp_frame in case the DMA mapping failed, correct this.

Also DMA unmap the frame in case mlx5e_xmit_xdp_frame() fails.

Fixes: 58b99ee3e3eb ("net/mlx5e: Add support for XDP_REDIRECT in device-out side")
Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c