mlx4: Add XDP frame size and adjust max XDP MTU
authorJesper Dangaard Brouer <brouer@redhat.com>
Thu, 14 May 2020 10:50:18 +0000 (12:50 +0200)
committerAlexei Starovoitov <ast@kernel.org>
Fri, 15 May 2020 04:21:55 +0000 (21:21 -0700)
commitd201ea9ebc519fb34ad9ef1f49ab2ab31f5111ea
tree2e795958ceb00dd9477337388146931ad21e936f
parent08fc1cfd2d250be853d33d6505ae11ff52b83b74
mlx4: Add XDP frame size and adjust max XDP MTU

The mlx4 drivers size of memory backing the RX packet is stored in
frag_stride. For XDP mode this will be PAGE_SIZE (normally 4096).
For normal mode frag_stride is 2048.

Also adjust MLX4_EN_MAX_XDP_MTU to take tailroom into account.

Signed-off-by: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
Cc: Saeed Mahameed <saeedm@mellanox.com>
Link: https://lore.kernel.org/bpf/158945341893.97035.2688142527052329942.stgit@firesoul
drivers/net/ethernet/mellanox/mlx4/en_netdev.c
drivers/net/ethernet/mellanox/mlx4/en_rx.c