Commit 875f7b8
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>1 parent c2f8ce5 commit 875f7b8
3 files changed
+20
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1765 | 1765 | | |
1766 | 1766 | | |
1767 | 1767 | | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
1768 | 1772 | | |
1769 | 1773 | | |
1770 | 1774 | | |
| |||
4169 | 4173 | | |
4170 | 4174 | | |
4171 | 4175 | | |
| 4176 | + | |
4172 | 4177 | | |
4173 | 4178 | | |
4174 | 4179 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3412 | 3412 | | |
3413 | 3413 | | |
3414 | 3414 | | |
| 3415 | + | |
3415 | 3416 | | |
3416 | 3417 | | |
3417 | 3418 | | |
| |||
3448 | 3449 | | |
3449 | 3450 | | |
3450 | 3451 | | |
| 3452 | + | |
| 3453 | + | |
| 3454 | + | |
| 3455 | + | |
3451 | 3456 | | |
3452 | 3457 | | |
3453 | 3458 | | |
| |||
3466 | 3471 | | |
3467 | 3472 | | |
3468 | 3473 | | |
3469 | | - | |
| 3474 | + | |
| 3475 | + | |
| 3476 | + | |
| 3477 | + | |
| 3478 | + | |
3470 | 3479 | | |
3471 | 3480 | | |
3472 | 3481 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1765 | 1765 | | |
1766 | 1766 | | |
1767 | 1767 | | |
| 1768 | + | |
| 1769 | + | |
| 1770 | + | |
| 1771 | + | |
1768 | 1772 | | |
1769 | 1773 | | |
1770 | 1774 | | |
| |||
4169 | 4173 | | |
4170 | 4174 | | |
4171 | 4175 | | |
| 4176 | + | |
4172 | 4177 | | |
4173 | 4178 | | |
4174 | 4179 | | |
| |||
0 commit comments