summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
diff options
context:
space:
mode:
authorMaxim Mikityanskiy2019-06-26 16:35:30 +0200
committerDaniel Borkmann2019-06-27 22:53:27 +0200
commita069e977d6d8f26c90a5d9374135729dc41c3a0d (patch)
tree2d0941492b91bc6fb185c2485e85fec5112f5696 /drivers/net/ethernet/mellanox/mlx5/core/en_main.c
parentnet/mlx5e: Replace deprecated PCI_DMA_TODEVICE (diff)
downloadkernel-qcow2-linux-a069e977d6d8f26c90a5d9374135729dc41c3a0d.tar.gz
kernel-qcow2-linux-a069e977d6d8f26c90a5d9374135729dc41c3a0d.tar.xz
kernel-qcow2-linux-a069e977d6d8f26c90a5d9374135729dc41c3a0d.zip
net/mlx5e: Calculate linear RX frag size considering XSK
Additional conditions introduced: - XSK implies XDP. - Headroom includes the XSK headroom if it exists. - No space is reserved for struct shared_skb_info in XSK mode. - Fragment size smaller than the XSK chunk size is not allowed. A new auxiliary function mlx5e_get_linear_rq_headroom with the support for XSK is introduced. Use this function in the implementation of mlx5e_get_rq_headroom. Change headroom to u32 to match the headroom field in struct xdp_umem. Signed-off-by: Maxim Mikityanskiy <maximmi@mellanox.com> Signed-off-by: Tariq Toukan <tariqt@mellanox.com> Acked-by: Saeed Mahameed <saeedm@mellanox.com> Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx5/core/en_main.c')
-rw-r--r--drivers/net/ethernet/mellanox/mlx5/core/en_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
index 1b427d7fab42..837a973b3507 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en_main.c
@@ -1954,7 +1954,7 @@ static void mlx5e_build_rq_frags_info(struct mlx5_core_dev *mdev,
if (mlx5e_rx_is_linear_skb(params)) {
int frag_stride;
- frag_stride = mlx5e_rx_get_linear_frag_sz(params);
+ frag_stride = mlx5e_rx_get_linear_frag_sz(params, NULL);
frag_stride = roundup_pow_of_two(frag_stride);
info->arr[0].frag_size = byte_count;