net/mlx5e: Switch to using napi_build_skb()
authorTariq Toukan <tariqt@nvidia.com>
Thu, 16 Feb 2023 00:09:10 +0000 (16:09 -0800)
committerSaeed Mahameed <saeedm@nvidia.com>
Sat, 18 Feb 2023 09:01:33 +0000 (01:01 -0800)
commit53ee9142717714881fe0b4292b237e1707246f2c
treefe73d164e0a73c277542bc63974f6d1e8a20ec9f
parent675f176b4dcc2b75adbcea7ba0e9a649527f53bd
net/mlx5e: Switch to using napi_build_skb()

Use napi_build_skb() which uses NAPI percpu caches to obtain
skbuff_head instead of inplace allocation.

napi_build_skb() calls napi_skb_cache_get(), which returns a cached
skb, or allocates a bulk of NAPI_SKB_CACHE_BULK (16) if cache is empty.

Performance test:
TCP single stream, single ring, single core, default MTU (1500B).

Before: 26.5 Gbits/sec
After:  30.1 Gbits/sec (+13.6%)

Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Gal Pressman <gal@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
drivers/net/ethernet/mellanox/mlx5/core/en_rx.c