Commit 6a6e3e9
packet: add a generic drop reason for receive
mainline inclusion
from mainline-v6.8-rc1
category: bugfix
Commit da37845 ("packet: uses kfree_skb() for errors.") switches
from consume_skb to kfree_skb to improve error handling. However, this
could bring a lot of noises when we monitor real packet drops in
kfree_skb[1], because in tpacket_rcv or packet_rcv only packet clones
can be freed, not actual packets.
Adding a generic drop reason to allow distinguish these "clone drops".
[1]: https://lore.kernel.org/netdev/CABWYdi00L+O30Q=Zah28QwZ_5RU-xcxLFUK2Zj08A8MrLk9jzg@mail.gmail.com/
Fixes: da37845 ("packet: uses kfree_skb() for errors.")
Suggested-by: Eric Dumazet <edumazet@google.com>
Suggested-by: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Signed-off-by: Yan Zhai <yan@cloudflare.com>
Reviewed-by: Eric Dumazet <edumazet@google.com>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Link: https://lore.kernel.org/r/ZW4piNbx3IenYnuw@debian.debian
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
(cherry picked from commit 2f57dd9)
Signed-off-by: Wentao Guan <guanwentao@uniontech.com>1 parent 69ded34 commit 6a6e3e9
2 files changed
Lines changed: 13 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
84 | 85 | | |
85 | 86 | | |
86 | 87 | | |
| |||
348 | 349 | | |
349 | 350 | | |
350 | 351 | | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
351 | 357 | | |
352 | 358 | | |
353 | 359 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2168 | 2168 | | |
2169 | 2169 | | |
2170 | 2170 | | |
| 2171 | + | |
2171 | 2172 | | |
2172 | 2173 | | |
2173 | 2174 | | |
2174 | 2175 | | |
2175 | 2176 | | |
2176 | 2177 | | |
2177 | | - | |
2178 | 2178 | | |
2179 | 2179 | | |
2180 | 2180 | | |
| |||
2264 | 2264 | | |
2265 | 2265 | | |
2266 | 2266 | | |
2267 | | - | |
2268 | 2267 | | |
2269 | 2268 | | |
| 2269 | + | |
2270 | 2270 | | |
2271 | 2271 | | |
2272 | 2272 | | |
2273 | 2273 | | |
2274 | 2274 | | |
2275 | 2275 | | |
2276 | 2276 | | |
2277 | | - | |
2278 | | - | |
2279 | | - | |
2280 | | - | |
| 2277 | + | |
2281 | 2278 | | |
2282 | 2279 | | |
2283 | 2280 | | |
2284 | 2281 | | |
2285 | 2282 | | |
2286 | 2283 | | |
| 2284 | + | |
2287 | 2285 | | |
2288 | 2286 | | |
2289 | 2287 | | |
| |||
2297 | 2295 | | |
2298 | 2296 | | |
2299 | 2297 | | |
2300 | | - | |
2301 | 2298 | | |
2302 | 2299 | | |
2303 | 2300 | | |
| |||
2550 | 2547 | | |
2551 | 2548 | | |
2552 | 2549 | | |
2553 | | - | |
2554 | | - | |
2555 | | - | |
2556 | | - | |
| 2550 | + | |
2557 | 2551 | | |
2558 | 2552 | | |
2559 | 2553 | | |
2560 | 2554 | | |
2561 | 2555 | | |
2562 | | - | |
| 2556 | + | |
2563 | 2557 | | |
2564 | 2558 | | |
2565 | | - | |
| 2559 | + | |
2566 | 2560 | | |
2567 | 2561 | | |
2568 | 2562 | | |
| |||
0 commit comments