]> git.baikalelectronics.ru Git - kernel.git/commit
net: add napi_get_frags_check() helper
authorEric Dumazet <edumazet@google.com>
Wed, 8 Jun 2022 16:04:38 +0000 (09:04 -0700)
committerJakub Kicinski <kuba@kernel.org>
Fri, 10 Jun 2022 04:53:57 +0000 (21:53 -0700)
commit46d528d04539754acab2ac293e275c6652154ce2
tree78722b3552044be2170fe2330968b9e7a8251f97
parent4c433ce962696e4fef4f9dffc175b221e44dbfe1
net: add napi_get_frags_check() helper

This is a follow up of commit 2d3478de5a24
("net: avoid 32 x truesize under-estimation for tiny skbs")

When/if we increase MAX_SKB_FRAGS, we better make sure
the old bug will not come back.

Adding a check in napi_get_frags() would be costly,
even if using DEBUG_NET_WARN_ON_ONCE().

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
net/core/dev.c