Skip to content

Commit 2a30f5c

Browse files
authored
Merge pull request #902 from liujinhui-job/change_ff_config_pci_whitelist_to_allow
Change ff config pci whitelist to allow
2 parents 90645f4 + a673443 commit 2a30f5c

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

lib/ff_config.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -879,8 +879,8 @@ ini_parse_handler(void* user, const char* section, const char* name,
879879
pconfig->dpdk.base_virtaddr= strdup(value);
880880
} else if (MATCH("dpdk", "file_prefix")) {
881881
pconfig->dpdk.file_prefix = strdup(value);
882-
} else if (MATCH("dpdk", "pci_whitelist")) {
883-
pconfig->dpdk.pci_whitelist = strdup(value);
882+
} else if (MATCH("dpdk", "allow")) {
883+
pconfig->dpdk.allow = strdup(value);
884884
} else if (MATCH("dpdk", "port_list")) {
885885
return parse_port_list(pconfig, value);
886886
} else if (MATCH("dpdk", "nb_vdev")) {
@@ -998,15 +998,14 @@ dpdk_args_setup(struct ff_config *cfg)
998998
sprintf(temp, "--file-prefix=container-%s", cfg->dpdk.file_prefix);
999999
dpdk_argv[n++] = strdup(temp);
10001000
}
1001-
if (cfg->dpdk.pci_whitelist) {
1001+
if (cfg->dpdk.allow) {
10021002
char* token;
1003-
char* rest = cfg->dpdk.pci_whitelist;
1003+
char* rest = cfg->dpdk.allow;
10041004

10051005
while ((token = strtok_r(rest, ",", &rest))){
10061006
sprintf(temp, "--allow=%s", token);
10071007
dpdk_argv[n++] = strdup(temp);
10081008
}
1009-
10101009
}
10111010

10121011
if (cfg->dpdk.nb_vdev) {

lib/ff_config.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ struct ff_config {
207207
/* allow processes that do not want to co-operate to have different memory regions */
208208
char *file_prefix;
209209

210-
/* load an external driver */
211-
char *pci_whitelist;
210+
/* pci whiltelist */
211+
char *allow;
212212

213213
int nb_channel;
214214
int memory;

0 commit comments

Comments
 (0)