diff options
author | Tariq Toukan <tariqt@mellanox.com> | 2017-06-15 14:35:33 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-06-16 05:53:23 +0300 |
commit | 9bcee89ac4dbafe77b7a2fc68c4a784358d6e4e4 (patch) | |
tree | 92cff78fcc4a8bacc82bb221872f5c75a5c460b8 /drivers/net/ethernet/mellanox/mlx4/en_tx.c | |
parent | 4931c6ef04b4eb6f726def76f845c10d1bb7057d (diff) | |
download | linux-9bcee89ac4dbafe77b7a2fc68c4a784358d6e4e4.tar.xz |
net/mlx4_en: Improve receive data-path
Several small performance improvements in RX datapath,
including:
- Compiler branch predictor hints.
- Replace a multiplication with a shift operation.
- Minimize variables scope.
- Write-prefetch for packet header.
- Avoid trinary-operator ("?") when value can be preset in a matching
branch.
- Save a branch by updating RX ring doorbell within
mlx4_en_refill_rx_buffers(), which now returns void.
Performance tests:
Tested on ConnectX3Pro, Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz
Single queue no-RSS optimization ON
(enable by ethtool -L <interface> rx 1).
XDP_DROP packet rate:
Same (28.1 Mpps), lower CPU utilization (from ~100% to ~92%).
Drop packets in TC:
-------------------------------------
| Before | After | Gain |
IPv4 | 4.14 Mpps | 4.18 Mpps | 1% |
-------------------------------------
XDP_TX packet rate:
-------------------------------------
| Before | After | Gain |
IPv4 | 10.1 Mpps | 10.3 Mpps | 2% |
IPv6 | 10.1 Mpps | 10.3 Mpps | 2% |
-------------------------------------
Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Reviewed-by: Saeed Mahameed <saeedm@mellanox.com>
Cc: kernel-team@fb.com
Cc: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlx4/en_tx.c')
0 files changed, 0 insertions, 0 deletions