]> git.baikalelectronics.ru Git - kernel.git/commit
mlx4: add page recycling in receive path
authorEric Dumazet <edumazet@google.com>
Wed, 8 Mar 2017 16:17:13 +0000 (08:17 -0800)
committerDavid S. Miller <davem@davemloft.net>
Thu, 9 Mar 2017 17:54:46 +0000 (09:54 -0800)
commit9c85e3235057ee7a9edf6a6a75fb001096ce1f19
tree9c0f22c5b40affcdeefc747ba94681e563bb3875
parentb9620e6cceaec847e48f8eade847dceb0557f5d4
mlx4: add page recycling in receive path

Same technique than some Intel drivers, for arches where PAGE_SIZE = 4096

In most cases, pages are reused because they were consumed
before we could loop around the RX ring.

This brings back performance, and is even better,
a single TCP flow reaches 30Gbit on my hosts.

v2: added full memset() in mlx4_en_free_frag(), as Tariq found it was needed
if we switch to large MTU, as priv->log_rx_info can dynamically be changed.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx4/en_rx.c
drivers/net/ethernet/mellanox/mlx4/mlx4_en.h