Commit 5166b3e
selftests/bpf: Use start_server_addr in sockopt_inherit
Include network_helpers.h in prog_tests/sockopt_inherit.c, use public
helper start_server_addr() instead of the local defined function
start_server(). This can avoid duplicate code.
Add a helper custom_cb() to set SOL_CUSTOM sockopt looply, set it to
post_socket_cb pointer of struct network_helper_opts, and pass it to
start_server_addr().
Signed-off-by: Geliang Tang <tanggeliang@kylinos.cn>
Link: https://lore.kernel.org/r/687af66f743a0bf15cdba372c5f71fe64863219e.1714907662.git.tanggeliang@kylinos.cn
Signed-off-by: Martin KaFai Lau <martin.lau@kernel.org>1 parent 20434d2 commit 5166b3e
1 file changed
Lines changed: 12 additions & 21 deletions
Lines changed: 12 additions & 21 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
6 | 7 | | |
| |||
98 | 99 | | |
99 | 100 | | |
100 | 101 | | |
101 | | - | |
| 102 | + | |
102 | 103 | | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | | - | |
107 | 104 | | |
108 | 105 | | |
109 | | - | |
110 | 106 | | |
111 | 107 | | |
112 | | - | |
113 | | - | |
114 | | - | |
115 | | - | |
116 | | - | |
117 | | - | |
118 | 108 | | |
119 | 109 | | |
120 | 110 | | |
121 | 111 | | |
122 | 112 | | |
123 | | - | |
124 | 113 | | |
125 | 114 | | |
126 | 115 | | |
127 | 116 | | |
128 | | - | |
129 | | - | |
130 | | - | |
131 | | - | |
132 | | - | |
133 | | - | |
134 | | - | |
| 117 | + | |
135 | 118 | | |
136 | 119 | | |
137 | 120 | | |
138 | 121 | | |
139 | 122 | | |
140 | 123 | | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
141 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
142 | 132 | | |
143 | 133 | | |
144 | 134 | | |
| |||
160 | 150 | | |
161 | 151 | | |
162 | 152 | | |
163 | | - | |
| 153 | + | |
| 154 | + | |
164 | 155 | | |
165 | 156 | | |
166 | 157 | | |
| |||
0 commit comments