History

bpf: introduce BPF_F_XDP_HAS_FRAGS flag in prog_flags loading the ebpf program

Introduce BPF_F_XDP_HAS_FRAGS and the related field in bpf_prog_aux in order to notify the driver the loaded program support xdp frags.

Lorenzo Bianconi committed 4 years ago

Commit c2f2cdb1 parent c41ced04 files · +14 −1Browse files

Showing the changes to include (2 of 4 files). Show all

Unified · Split

2 files
  1. include/linux/bpf.h +1 −0
  2. include/uapi/linux/bpf.h +5 −0
include/linux/bpf.h+1−0
@@ -933,6 +933,7 @@ struct bpf_prog_aux { · 932 unmodified lines
933 bool func_proto_unreliable;933 bool func_proto_unreliable;
934 bool sleepable;934 bool sleepable;
935 bool tail_call_reachable;935 bool tail_call_reachable;
936 bool xdp_has_frags;
936 struct hlist_node tramp_hlist;937 struct hlist_node tramp_hlist;
937 /* BTF_KIND_FUNC_PROTO for valid attach_btf_id */938 /* BTF_KIND_FUNC_PROTO for valid attach_btf_id */
938 const struct btf_type *attach_func_proto;939 const struct btf_type *attach_func_proto;
include/uapi/linux/bpf.h+5−0
@@ -1113,6 +1113,11 @@ enum bpf_link_type { · 1112 unmodified lines
1113 */1113 */
1114#define BPF_F_SLEEPABLE (1U << 4)1114#define BPF_F_SLEEPABLE (1U << 4)
1115 1115
1116/* If BPF_F_XDP_HAS_FRAGS is used in BPF_PROG_LOAD command, the loaded program
1117 * fully support xdp frags.
1118 */
1119#define BPF_F_XDP_HAS_FRAGS (1U << 5)
1120
1116/* When BPF ldimm64's insn[0].src_reg != 0 then this can have1121/* When BPF ldimm64's insn[0].src_reg != 0 then this can have
1117 * the following extensions:1122 * the following extensions:
1118 *1123 *

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t