net: tap: change tap_alloc_skb() to allow bigger paged allocations
authorEric Dumazet <edumazet@google.com>
Tue, 1 Aug 2023 20:52:54 +0000 (20:52 +0000)
committerJakub Kicinski <kuba@kernel.org>
Thu, 3 Aug 2023 01:44:56 +0000 (18:44 -0700)
commit37dfe5b8ddeb7c0bb97e3643dcfd8f9f1421ad25
treead9f5d1ccdab0aea0327a88651f8789910baef0c
parentae6db08f8b5606ccd95ef2aadd741905d3c13bc0
net: tap: change tap_alloc_skb() to allow bigger paged allocations

tap_alloc_skb() is currently calling sock_alloc_send_pskb()
forcing order-0 page allocations.

Switch to PAGE_ALLOC_COSTLY_ORDER, to increase max size by 8x.

Also add logic to increase the linear part if needed.

Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Tahsin Erdogan <trdgn@amazon.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://lore.kernel.org/r/20230801205254.400094-5-edumazet@google.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/tap.c