net/mlx4: MLX4_TX_BOUNCE_BUFFER_SIZE depends on MAX_SKB_FRAGS
authorEric Dumazet <edumazet@google.com>
Wed, 7 Dec 2022 14:12:36 +0000 (14:12 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 8 Dec 2022 22:27:48 +0000 (14:27 -0800)
commit26782aad00ccb8f8e5ae6221358fa79cdafc8548
tree69ee0663fc064f824e047a173b473f67557994bf
parent35f31ff0c0b62b9e864fdb92bc1af9212818d624
net/mlx4: MLX4_TX_BOUNCE_BUFFER_SIZE depends on MAX_SKB_FRAGS

Google production kernel has increased MAX_SKB_FRAGS to 45
for BIG-TCP rollout.

Unfortunately mlx4 TX bounce buffer is not big enough whenever
an skb has up to 45 page fragments.

This can happen often with TCP TX zero copy, as one frag usually
holds 4096 bytes of payload (order-0 page).

Tested:
 Kernel built with MAX_SKB_FRAGS=45
 ip link set dev eth0 gso_max_size 185000
 netperf -t TCP_SENDFILE

I made sure that "ethtool -G eth0 tx 64" was properly working,
ring->full_size being set to 15.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Reported-by: Wei Wang <weiwan@google.com>
Reviewed-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h