You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
aya/aya-bpf-macros/src
Dave Tucker 7eebdcbdeb aya-bpf-macros: Cleanup and remove required_args
This commit cleans up the recently refactored aya-bpf-macros
to be a little easier to maintain:

Cosmetic changes:

1. The flow of the parse function is the same in each file
2. Useless if !attrs.is_empty() guards were removed
3. The compile error when cgroup_sock programs have an invalid
   attach_type was in the wrong location

Functional changes:

1. Remove pop_required_arg. All args are optional and making them
   required was a mistake on my part. We may revisit this later.
2. Rename pop_arg to pop_string_arg
3. Implement pop_bool_arg to allow for single idents to be mixed with
   our key/value pair syntax in macro attributes. This is used for
   `sleepable` and `frags` in XDP programs.

Signed-off-by: Dave Tucker <dave@dtucker.co.uk>
1 year ago
..
args.rs aya-bpf-macros: Cleanup and remove required_args 1 year ago
btf_tracepoint.rs aya-bpf-macros: Cleanup and remove required_args 1 year ago
cgroup_device.rs aya-bpf-macros: Refactor for ease of testing 1 year ago
cgroup_skb.rs aya-bpf-macros: Cleanup and remove required_args 1 year ago
cgroup_sock.rs aya-bpf-macros: Cleanup and remove required_args 1 year ago
cgroup_sock_addr.rs aya-bpf-macros: Cleanup and remove required_args 1 year ago
cgroup_sockopt.rs aya-bpf-macros: Cleanup and remove required_args 1 year ago
cgroup_sysctl.rs aya-bpf-macros: Refactor for ease of testing 1 year ago
fentry.rs aya-bpf-macros: Cleanup and remove required_args 1 year ago
fexit.rs aya-bpf-macros: Cleanup and remove required_args 1 year ago
kprobe.rs aya-bpf-macros: Cleanup and remove required_args 1 year ago
lib.rs aya-bpf-macros: Cleanup and remove required_args 1 year ago
lsm.rs aya-bpf-macros: Cleanup and remove required_args 1 year ago
map.rs aya-bpf-macros: Cleanup and remove required_args 1 year ago
perf_event.rs aya-bpf-macros: Refactor for ease of testing 1 year ago
raw_tracepoint.rs aya-bpf-macros: Cleanup and remove required_args 1 year ago
sk_lookup.rs aya-bpf-macros: Refactor for ease of testing 1 year ago
sk_msg.rs aya-bpf-macros: Refactor for ease of testing 1 year ago
sk_skb.rs aya-bpf-macros: Refactor for ease of testing 1 year ago
sock_ops.rs aya-bpf-macros: Refactor for ease of testing 1 year ago
socket_filter.rs aya-bpf-macros: Refactor for ease of testing 1 year ago
tc.rs aya-bpf-macros: Refactor for ease of testing 1 year ago
tracepoint.rs aya-bpf-macros: Cleanup and remove required_args 1 year ago
uprobe.rs aya-bpf-macros: Cleanup and remove required_args 1 year ago
xdp.rs aya-bpf-macros: Cleanup and remove required_args 1 year ago