Commit 2a3af99
committed
selftests/bpf: Return socket cookies from sock_iter_batch progs
Extend the iter_udp_soreuse and iter_tcp_soreuse programs to write the
cookie of the current socket, so that we can track the identity of the
sockets that the iterator has seen so far. Update the existing do_test
function to account for this change to the iterator program output. At
the same time, teach both programs to work with AF_INET as well.
Signed-off-by: Jordan Rife <[email protected]>1 parent 513feff commit 2a3af99
File tree
3 files changed
+41
-17
lines changed- tools/testing/selftests/bpf
- prog_tests
- progs
3 files changed
+41
-17
lines changedLines changed: 20 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
12 | 17 | | |
13 | 18 | | |
14 | 19 | | |
15 | | - | |
| 20 | + | |
16 | 21 | | |
17 | 22 | | |
| 23 | + | |
18 | 24 | | |
19 | 25 | | |
20 | 26 | | |
| |||
34 | 40 | | |
35 | 41 | | |
36 | 42 | | |
| 43 | + | |
37 | 44 | | |
38 | 45 | | |
39 | 46 | | |
| |||
55 | 62 | | |
56 | 63 | | |
57 | 64 | | |
58 | | - | |
| 65 | + | |
59 | 66 | | |
60 | 67 | | |
61 | 68 | | |
62 | | - | |
63 | | - | |
| 69 | + | |
| 70 | + | |
64 | 71 | | |
65 | 72 | | |
66 | 73 | | |
67 | 74 | | |
68 | | - | |
69 | | - | |
70 | | - | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
71 | 78 | | |
72 | | - | |
| 79 | + | |
73 | 80 | | |
74 | 81 | | |
75 | 82 | | |
76 | 83 | | |
77 | 84 | | |
78 | 85 | | |
79 | | - | |
| 86 | + | |
80 | 87 | | |
81 | 88 | | |
82 | 89 | | |
83 | | - | |
84 | | - | |
| 90 | + | |
| 91 | + | |
85 | 92 | | |
86 | 93 | | |
87 | 94 | | |
88 | | - | |
89 | | - | |
| 95 | + | |
| 96 | + | |
90 | 97 | | |
91 | 98 | | |
92 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
128 | 128 | | |
129 | 129 | | |
130 | 130 | | |
| 131 | + | |
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
20 | 26 | | |
21 | 27 | | |
22 | 28 | | |
| |||
26 | 32 | | |
27 | 33 | | |
28 | 34 | | |
| 35 | + | |
29 | 36 | | |
30 | 37 | | |
31 | 38 | | |
32 | 39 | | |
33 | 40 | | |
34 | 41 | | |
| 42 | + | |
35 | 43 | | |
36 | | - | |
| 44 | + | |
37 | 45 | | |
38 | | - | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
39 | 49 | | |
40 | 50 | | |
41 | 51 | | |
| |||
52 | 62 | | |
53 | 63 | | |
54 | 64 | | |
| 65 | + | |
55 | 66 | | |
56 | 67 | | |
57 | 68 | | |
| |||
63 | 74 | | |
64 | 75 | | |
65 | 76 | | |
| 77 | + | |
66 | 78 | | |
67 | 79 | | |
68 | 80 | | |
69 | 81 | | |
70 | 82 | | |
| 83 | + | |
71 | 84 | | |
72 | | - | |
73 | | - | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
74 | 89 | | |
75 | 90 | | |
76 | 91 | | |
| |||
84 | 99 | | |
85 | 100 | | |
86 | 101 | | |
| 102 | + | |
87 | 103 | | |
88 | 104 | | |
89 | 105 | | |
| |||
0 commit comments