Commit c504e5c
net: skb: introduce kfree_skb_reason()
Introduce the interface kfree_skb_reason(), which is able to pass
the reason why the skb is dropped to 'kfree_skb' tracepoint.
Add the 'reason' field to 'trace_kfree_skb', therefor user can get
more detail information about abnormal skb with 'drop_monitor' or
eBPF.
All drop reasons are defined in the enum 'skb_drop_reason', and
they will be print as string in 'kfree_skb' tracepoint in format
of 'reason: XXX'.
( Maybe the reasons should be defined in a uapi header file, so that
user space can use them? )
Signed-off-by: Menglong Dong <imagedong@tencent.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>1 parent 342402c commit c504e5c
File tree
5 files changed
+67
-17
lines changed- include
- linux
- trace/events
- net/core
5 files changed
+67
-17
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
305 | 305 | | |
306 | 306 | | |
307 | 307 | | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
308 | 319 | | |
309 | 320 | | |
310 | 321 | | |
| |||
1085 | 1096 | | |
1086 | 1097 | | |
1087 | 1098 | | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
| 1109 | + | |
1088 | 1110 | | |
1089 | | - | |
1090 | 1111 | | |
1091 | 1112 | | |
1092 | 1113 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
12 | 29 | | |
13 | 30 | | |
14 | 31 | | |
15 | 32 | | |
16 | 33 | | |
17 | | - | |
| 34 | + | |
| 35 | + | |
18 | 36 | | |
19 | | - | |
| 37 | + | |
20 | 38 | | |
21 | 39 | | |
22 | | - | |
23 | | - | |
24 | | - | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
25 | 44 | | |
26 | 45 | | |
27 | 46 | | |
28 | 47 | | |
29 | 48 | | |
30 | 49 | | |
| 50 | + | |
31 | 51 | | |
32 | 52 | | |
33 | | - | |
34 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
35 | 57 | | |
36 | 58 | | |
37 | 59 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4899 | 4899 | | |
4900 | 4900 | | |
4901 | 4901 | | |
4902 | | - | |
| 4902 | + | |
| 4903 | + | |
4903 | 4904 | | |
4904 | 4905 | | |
4905 | 4906 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
110 | 110 | | |
111 | 111 | | |
112 | 112 | | |
113 | | - | |
| 113 | + | |
| 114 | + | |
114 | 115 | | |
115 | 116 | | |
116 | 117 | | |
| |||
262 | 263 | | |
263 | 264 | | |
264 | 265 | | |
265 | | - | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
266 | 269 | | |
267 | 270 | | |
268 | 271 | | |
| |||
490 | 493 | | |
491 | 494 | | |
492 | 495 | | |
493 | | - | |
| 496 | + | |
| 497 | + | |
494 | 498 | | |
495 | 499 | | |
496 | 500 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
759 | 759 | | |
760 | 760 | | |
761 | 761 | | |
762 | | - | |
| 762 | + | |
763 | 763 | | |
| 764 | + | |
764 | 765 | | |
765 | 766 | | |
766 | | - | |
| 767 | + | |
| 768 | + | |
767 | 769 | | |
768 | | - | |
| 770 | + | |
769 | 771 | | |
770 | 772 | | |
771 | 773 | | |
772 | 774 | | |
773 | | - | |
| 775 | + | |
774 | 776 | | |
775 | 777 | | |
776 | | - | |
| 778 | + | |
777 | 779 | | |
778 | 780 | | |
779 | 781 | | |
| |||
0 commit comments