Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
dpdk: allow interface name to be specified from startup.conf
[vpp.git]
/
src
/
plugins
/
dpdk
/
device
/
init.c
diff --git
a/src/plugins/dpdk/device/init.c
b/src/plugins/dpdk/device/init.c
index
c2e4d22
..
6cde041
100644
(file)
--- a/
src/plugins/dpdk/device/init.c
+++ b/
src/plugins/dpdk/device/init.c
@@
-320,10
+320,6
@@
dpdk_lib_init (dpdk_main_t * dm)
pci_addr.as_u32);
}
pci_addr.as_u32);
}
- if (p)
- devconf = pool_elt_at_index (dm->conf->dev_confs, p[0]);
- else
- devconf = &dm->conf->default_devconf;
/* Create vnet interface */
vec_add2_aligned (dm->devices, xd, 1, CLIB_CACHE_LINE_BYTES);
/* Create vnet interface */
vec_add2_aligned (dm->devices, xd, 1, CLIB_CACHE_LINE_BYTES);
@@
-331,6
+327,14
@@
dpdk_lib_init (dpdk_main_t * dm)
xd->nb_tx_desc = DPDK_NB_TX_DESC_DEFAULT;
xd->cpu_socket = (i8) rte_eth_dev_socket_id (i);
xd->nb_tx_desc = DPDK_NB_TX_DESC_DEFAULT;
xd->cpu_socket = (i8) rte_eth_dev_socket_id (i);
+ if (p)
+ {
+ devconf = pool_elt_at_index (dm->conf->dev_confs, p[0]);
+ xd->name = devconf->name;
+ }
+ else
+ devconf = &dm->conf->default_devconf;
+
/* Handle interface naming for devices with multiple ports sharing same PCI ID */
if (pci_dev)
{
/* Handle interface naming for devices with multiple ports sharing same PCI ID */
if (pci_dev)
{
@@
-1028,6
+1032,8
@@
dpdk_device_config (dpdk_config_main_t * conf, vlib_pci_addr_t pci_addr,
;
else if (unformat (input, "num-tx-desc %u", &devconf->num_tx_desc))
;
;
else if (unformat (input, "num-tx-desc %u", &devconf->num_tx_desc))
;
+ else if (unformat (input, "name %s", &devconf->name))
+ ;
else if (unformat (input, "workers %U", unformat_bitmap_list,
&devconf->workers))
;
else if (unformat (input, "workers %U", unformat_bitmap_list,
&devconf->workers))
;