Skip to content

Change ff config pci whitelist to allow #902

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions lib/ff_config.c
Original file line number Diff line number Diff line change
Expand Up @@ -879,8 +879,8 @@ ini_parse_handler(void* user, const char* section, const char* name,
pconfig->dpdk.base_virtaddr= strdup(value);
} else if (MATCH("dpdk", "file_prefix")) {
pconfig->dpdk.file_prefix = strdup(value);
} else if (MATCH("dpdk", "pci_whitelist")) {
pconfig->dpdk.pci_whitelist = strdup(value);
} else if (MATCH("dpdk", "allow")) {
pconfig->dpdk.allow = strdup(value);
} else if (MATCH("dpdk", "port_list")) {
return parse_port_list(pconfig, value);
} else if (MATCH("dpdk", "nb_vdev")) {
Expand Down Expand Up @@ -998,15 +998,14 @@ dpdk_args_setup(struct ff_config *cfg)
sprintf(temp, "--file-prefix=container-%s", cfg->dpdk.file_prefix);
dpdk_argv[n++] = strdup(temp);
}
if (cfg->dpdk.pci_whitelist) {
if (cfg->dpdk.allow) {
char* token;
char* rest = cfg->dpdk.pci_whitelist;
char* rest = cfg->dpdk.allow;

while ((token = strtok_r(rest, ",", &rest))){
sprintf(temp, "--allow=%s", token);
dpdk_argv[n++] = strdup(temp);
}

}

if (cfg->dpdk.nb_vdev) {
Expand Down
4 changes: 2 additions & 2 deletions lib/ff_config.h
Original file line number Diff line number Diff line change
Expand Up @@ -207,8 +207,8 @@ struct ff_config {
/* allow processes that do not want to co-operate to have different memory regions */
char *file_prefix;

/* load an external driver */
char *pci_whitelist;
/* pci whiltelist */
char *allow;

int nb_channel;
int memory;
Expand Down