]> git.karo-electronics.de Git - linux-beck.git/commit
mlx4: xdp: Reserve headroom for receiving packet when XDP prog is active
authorMartin KaFai Lau <kafai@fb.com>
Wed, 7 Dec 2016 23:53:13 +0000 (15:53 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 8 Dec 2016 19:25:13 +0000 (14:25 -0500)
commitea3349a03519dcd4f32d949cd80ab995623dc5ac
tree01d77dc1b6492c486e3df0503fc4b1ef17fb7884
parentb45f0674b997ee769907d6092dfa9ee8f59bb51d
mlx4: xdp: Reserve headroom for receiving packet when XDP prog is active

Reserve XDP_PACKET_HEADROOM for packet and enable bpf_xdp_adjust_head()
support.  This patch only affects the code path when XDP is active.

After testing, the tx_dropped counter is incremented if the xdp_prog sends
more than wire MTU.

Signed-off-by: Martin KaFai Lau <kafai@fb.com>
Acked-by: Saeed Mahameed <saeedm@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_netdev.c
drivers/net/ethernet/mellanox/mlx4/en_rx.c
drivers/net/ethernet/mellanox/mlx4/en_tx.c
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h