Commit cf62089
bpf: Add gso_size to __sk_buff
BPF programs may want to know whether an skb is gso. The canonical
answer is skb_is_gso(skb), which tests that gso_size != 0.
Expose this field in the same manner as gso_segs. That field itself
is not a sufficient signal, as the comment in skb_shared_info makes
clear: gso_segs may be zero, e.g., from dodgy sources.
Also prepare net/bpf/test_run for upcoming BPF_PROG_TEST_RUN tests
of the feature.
Signed-off-by: Willem de Bruijn <[email protected]>
Signed-off-by: Alexei Starovoitov <[email protected]>
Link: https://lore.kernel.org/bpf/[email protected]1 parent abbc61a commit cf62089
3 files changed
Lines changed: 38 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3176 | 3176 | | |
3177 | 3177 | | |
3178 | 3178 | | |
| 3179 | + | |
3179 | 3180 | | |
3180 | 3181 | | |
3181 | 3182 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
277 | 277 | | |
278 | 278 | | |
279 | 279 | | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
280 | 286 | | |
281 | 287 | | |
282 | 288 | | |
| |||
297 | 303 | | |
298 | 304 | | |
299 | 305 | | |
| 306 | + | |
300 | 307 | | |
301 | 308 | | |
302 | 309 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7139 | 7139 | | |
7140 | 7140 | | |
7141 | 7141 | | |
| 7142 | + | |
| 7143 | + | |
| 7144 | + | |
| 7145 | + | |
| 7146 | + | |
| 7147 | + | |
| 7148 | + | |
| 7149 | + | |
| 7150 | + | |
| 7151 | + | |
| 7152 | + | |
| 7153 | + | |
| 7154 | + | |
| 7155 | + | |
| 7156 | + | |
| 7157 | + | |
| 7158 | + | |
| 7159 | + | |
| 7160 | + | |
| 7161 | + | |
| 7162 | + | |
7142 | 7163 | | |
7143 | 7164 | | |
7144 | 7165 | | |
| |||
7461 | 7482 | | |
7462 | 7483 | | |
7463 | 7484 | | |
7464 | | - | |
7465 | | - | |
7466 | | - | |
7467 | | - | |
7468 | | - | |
7469 | | - | |
7470 | | - | |
7471 | | - | |
7472 | | - | |
7473 | | - | |
7474 | | - | |
7475 | | - | |
7476 | | - | |
7477 | | - | |
| 7485 | + | |
7478 | 7486 | | |
7479 | 7487 | | |
7480 | 7488 | | |
7481 | 7489 | | |
7482 | 7490 | | |
7483 | 7491 | | |
| 7492 | + | |
| 7493 | + | |
| 7494 | + | |
| 7495 | + | |
| 7496 | + | |
| 7497 | + | |
| 7498 | + | |
| 7499 | + | |
7484 | 7500 | | |
7485 | 7501 | | |
7486 | 7502 | | |
| |||
0 commit comments