]> git.baikalelectronics.ru Git - kernel.git/commit
net/mlx5e: RX, Make sure packet header does not cross page boundary
authorTariq Toukan <tariqt@mellanox.com>
Tue, 25 Sep 2018 09:05:22 +0000 (12:05 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 25 Jan 2019 20:16:13 +0000 (12:16 -0800)
commit291b5670423fb83b023f30944e0927992e119629
tree83c0414bab3b64326d04e258c69c092e39240c01
parent36b9d501ce838bfa1955a5ef36e01caf5ed0a813
net/mlx5e: RX, Make sure packet header does not cross page boundary

In the non-linear SKB memory scheme of Striding RQ, a packet header
could cross page boundary. This requires special care in fast path
that costs LoC, additional runtime instructions and branches.

It could happen when the header (up to 256B) does not fit in
a single stride. Avoid this by working with a stride size that fits
the maximum possible header. Stride is increased form 64B to 256B.

Performance:
Tested packet rate for UDP streams, single ring, on ConnectX-5.

Configuration:
Set Striding RQ and LRO ON (to enabled the non-linear SKB scheme).
GRO OFF, early drop by TC rule.

64B: 4x worse memory utilization, no page-crossers headers
- No degradation (5,887,305 pps).
- The reduction in memory utilization is compensated by the saving of
  branches tests.

192B: 1.33x worse memory utilization, avoid page-crossers headers
- Before: 5,727,252. After: 5,777,037. ~1% gain.

256B: Same memory util, no page-crossers
- Before: 5,691,885. After: 5,748,007. ~1% gain.

Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c