Repository navigation
Commit d01b59c
bpf: Add bpf_skb_adjust_room flag BPF_F_ADJ_ROOM_ENCAP_L2_ETH
bpf_skb_adjust_room sets the inner_protocol as skb->protocol for packets
encapsulation. But that is not appropriate when pushing Ethernet header.
Add an option to further specify encap L2 type and set the inner_protocol
as ETH_P_TEB.
Suggested-by: Willem de Bruijn <willemb@google.com>
Signed-off-by: Xuesen Huang <huangxuesen@kuaishou.com>
Signed-off-by: Zhiyong Cheng <chengzhiyong@kuaishou.com>
Signed-off-by: Li Wang <wangli09@kuaishou.com>
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Acked-by: Willem de Bruijn <willemb@google.com>
Link: https://lore.kernel.org/bpf/20210304064046.6232-1-hxseverything@gmail.com1 parent bce8623 commit d01b59c
3 files changed
Lines changed: 20 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2484 | 2484 | | |
2485 | 2485 | | |
2486 | 2486 | | |
| 2487 | + | |
| 2488 | + | |
| 2489 | + | |
| 2490 | + | |
2487 | 2491 | | |
2488 | 2492 | | |
2489 | 2493 | | |
| |||
4916 | 4920 | | |
4917 | 4921 | | |
4918 | 4922 | | |
| 4923 | + | |
4919 | 4924 | | |
4920 | 4925 | | |
4921 | 4926 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3409 | 3409 | | |
3410 | 3410 | | |
3411 | 3411 | | |
| 3412 | + | |
3412 | 3413 | | |
3413 | 3414 | | |
3414 | 3415 | | |
| |||
3445 | 3446 | | |
3446 | 3447 | | |
3447 | 3448 | | |
| 3449 | + | |
| 3450 | + | |
| 3451 | + | |
| 3452 | + | |
3448 | 3453 | | |
3449 | 3454 | | |
3450 | 3455 | | |
| |||
3463 | 3468 | | |
3464 | 3469 | | |
3465 | 3470 | | |
3466 | | - | |
| 3471 | + | |
| 3472 | + | |
| 3473 | + | |
| 3474 | + | |
| 3475 | + | |
3467 | 3476 | | |
3468 | 3477 | | |
3469 | 3478 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2484 | 2484 | | |
2485 | 2485 | | |
2486 | 2486 | | |
| 2487 | + | |
| 2488 | + | |
| 2489 | + | |
| 2490 | + | |
2487 | 2491 | | |
2488 | 2492 | | |
2489 | 2493 | | |
| |||
4916 | 4920 | | |
4917 | 4921 | | |
4918 | 4922 | | |
| 4923 | + | |
4919 | 4924 | | |
4920 | 4925 | | |
4921 | 4926 | | |
| |||
0 commit comments