]> 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)
commit092135d3d0caab3509b7cf924fa896fccad7ee9d
tree78722b3552044be2170fe2330968b9e7a8251f97
parentfdba33e9a62d955d54624c990b24fada39c12eda
net: add napi_get_frags_check() helper

This is a follow up of commit 0a95c7028409
("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