bpf: rename bpf_parse_common() to bpf_parse_and_load_common()

bpf_parse_common() parses and loads the program.  Rename it
accordingly.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Quentin Monnet <quentin.monnet@netronome.com>
Acked-by: Daniel Borkmann <daniel@iogearbox.net>
This commit is contained in:
Jakub Kicinski 2017-11-23 18:12:02 -08:00 committed by Stephen Hemminger
parent 3f0b9e620c
commit 399db8392b
6 changed files with 8 additions and 8 deletions

View File

@ -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);

View File

@ -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;

View File

@ -898,7 +898,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));

View File

@ -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] = {};

View File

@ -107,7 +107,7 @@ opt_bpf:
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;

View File

@ -102,7 +102,7 @@ opt_bpf:
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;