[RAMEN9610-21776]ANDROID: net: bpf: Allow TC programs to call BPF_FUNC_skb_change_head
authorLorenzo Colitti <lorenzo@google.com>
Tue, 18 Feb 2020 06:33:50 +0000 (15:33 +0900)
committerxiaoqin li <xiaoqin.li@samsung.com>
Tue, 24 Nov 2020 06:21:47 +0000 (14:21 +0800)
This enables ebpf tethering offload from a cellular interface with
no L2 mac header to a wifi/ethernet/usb interface with one.

Will pursue upstreaming this along with further mtu related fixups.

Test: builds, real testing with identical patch on a 4.14 flame device
Bug: 149724482
Signed-off-by: Lorenzo Colitti <lorenzo@google.com>
Signed-off-by: Maciej Żenczykowski <maze@google.com>
Change-Id: Ic182320bf1abb248d0f86fa2973c60208710f664

net/core/filter.c

index 549c49b63218a5dd0daf157a28299782bac28d05..a28fb69f791667c462d16be89b43395676b78fa1 100644 (file)
@@ -3261,6 +3261,8 @@ tc_cls_act_func_proto(enum bpf_func_id func_id)
                return &bpf_skb_adjust_room_proto;
        case BPF_FUNC_skb_change_tail:
                return &bpf_skb_change_tail_proto;
+       case BPF_FUNC_skb_change_head:
+               return &bpf_skb_change_head_proto;
        case BPF_FUNC_skb_get_tunnel_key:
                return &bpf_skb_get_tunnel_key_proto;
        case BPF_FUNC_skb_set_tunnel_key: