mirror of
https://github.com/torvalds/linux.git
synced 2026-06-05 21:15:53 +02:00
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>
This commit is contained in:
parent
675f176b4d
commit
53ee914271
|
|
@ -1556,7 +1556,7 @@ struct sk_buff *mlx5e_build_linear_skb(struct mlx5e_rq *rq, void *va,
|
|||
u32 frag_size, u16 headroom,
|
||||
u32 cqe_bcnt, u32 metasize)
|
||||
{
|
||||
struct sk_buff *skb = build_skb(va, frag_size);
|
||||
struct sk_buff *skb = napi_build_skb(va, frag_size);
|
||||
|
||||
if (unlikely(!skb)) {
|
||||
rq->stats->buff_alloc_err++;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user