@@ -259,8 +259,8 @@ struct bpf_cfg_in {
.off = 0, \
.imm = 0 })
-int bpf_parse_common(struct bpf_cfg_in *cfg, const struct bpf_cfg_ops *ops,
- void *nl);
+int bpf_parse_and_load_common(struct bpf_cfg_in *cfg,
+ const struct bpf_cfg_ops *ops, void *nl);
const char *bpf_prog_to_default_section(enum bpf_prog_type type);
@@ -75,7 +75,7 @@ int xdp_parse(int *argc, char ***argv, struct iplink_req *req, bool generic,
return xdp_delete(&xdp);
}
- if (bpf_parse_common(&cfg, &bpf_cb_ops, &xdp))
+ if (bpf_parse_and_load_common(&cfg, &bpf_cb_ops, &xdp))
return -1;
*argc = cfg.argc;
@@ -884,7 +884,7 @@ static int lwt_parse_bpf(struct rtattr *rta, size_t len,
int err;
nest = rta_nest(rta, len, attr);
- err = bpf_parse_common(&cfg, &bpf_cb_ops, &x);
+ err = bpf_parse_and_load_common(&cfg, &bpf_cb_ops, &x);
if (err < 0) {
fprintf(stderr, "Failed to parse eBPF program: %s\n",
strerror(-err));
@@ -953,8 +953,8 @@ static int bpf_parse_opt_tbl(struct bpf_cfg_in *cfg,
return 0;
}
-int bpf_parse_common(struct bpf_cfg_in *cfg, const struct bpf_cfg_ops *ops,
- void *nl)
+int bpf_parse_and_load_common(struct bpf_cfg_in *cfg,
+ const struct bpf_cfg_ops *ops, void *nl)
{
bool opt_tbl[BPF_MODE_MAX] = {};
@@ -107,7 +107,7 @@ static int bpf_parse_opt(struct filter_util *qu, char *handle,
cfg.argc = argc;
cfg.argv = argv;
- if (bpf_parse_common(&cfg, &bpf_cb_ops, n))
+ if (bpf_parse_and_load_common(&cfg, &bpf_cb_ops, n))
return -1;
argc = cfg.argc;
@@ -102,7 +102,7 @@ static int bpf_parse_opt(struct action_util *a, int *ptr_argc, char ***ptr_argv,
cfg.argc = argc;
cfg.argv = argv;
- if (bpf_parse_common(&cfg, &bpf_cb_ops, n))
+ if (bpf_parse_and_load_common(&cfg, &bpf_cb_ops, n))
return -1;
argc = cfg.argc;