History

bpf/flow_dissector: pass input flags to BPF flow dissector program

C flow dissector supports input flags that tell it to customize parsing by either stopping early or trying to parse as deep as possible. Pass those flags to the BPF flow dissector so it can make the same decisions. In the next commits I'll add support for those flags to our reference bpf_flow.c v3: * Export copy of flow dissector flags instead of moving (Alexei Starovoitov)

Stanislav Fomichev committed 7 years ago

Commit 086f9561 parent 03cd1d14 files · +17 −4Browse files

Showing the changes to include/uapi/linux (1 of 4 files). Show all

Unified · Split

include/uapi/linux/bpf.h+5−0
@@ -3507,6 +3507,10 @@ enum bpf_task_fd_type { · 3506 unmodified lines
3507 BPF_FD_TYPE_URETPROBE, /* filename + offset */3507 BPF_FD_TYPE_URETPROBE, /* filename + offset */
3508};3508};
3509 3509
3510#define BPF_FLOW_DISSECTOR_F_PARSE_1ST_FRAG (1U << 0)
3511#define BPF_FLOW_DISSECTOR_F_STOP_AT_FLOW_LABEL (1U << 1)
3512#define BPF_FLOW_DISSECTOR_F_STOP_AT_ENCAP (1U << 2)
3513
3510struct bpf_flow_keys {3514struct bpf_flow_keys {
3511 __u16 nhoff;3515 __u16 nhoff;
3512 __u16 thoff;3516 __u16 thoff;
@@ -3528,6 +3532,7 @@ struct bpf_flow_keys { · 15 unmodified lines
3528 __u32 ipv6_dst[4]; /* in6_addr; network order */3532 __u32 ipv6_dst[4]; /* in6_addr; network order */
3529 };3533 };
3530 };3534 };
3535 __u32 flags;
3531};3536};
3532 3537
3533struct bpf_func_info {3538struct bpf_func_info {