summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
8ebd792)
Example:
dpdk {
dev 0000:01:00.0 { name eth0 }
dev 0000:02:00.0 { name eth1 }
}
Change-Id: I11e60e969a7e3548c99ac0c0c3531767819cb157
Signed-off-by: Damjan Marion <damarion@cisco.com>
u16 nb_tx_desc;
CLIB_CACHE_LINE_ALIGN_MARK (cacheline1);
u16 nb_tx_desc;
CLIB_CACHE_LINE_ALIGN_MARK (cacheline1);
u8 *interface_name_suffix;
/* number of sub-interfaces */
u8 *interface_name_suffix;
/* number of sub-interfaces */
typedef struct
{
vlib_pci_addr_t pci_addr;
typedef struct
{
vlib_pci_addr_t pci_addr;
u8 is_blacklisted;
u8 vlan_strip_offload;
#define DPDK_DEVICE_VLAN_STRIP_DEFAULT 0
u8 is_blacklisted;
u8 vlan_strip_offload;
#define DPDK_DEVICE_VLAN_STRIP_DEFAULT 0
struct rte_pci_device *pci_dev;
u8 *ret;
struct rte_pci_device *pci_dev;
u8 *ret;
+ if (xd->name)
+ return format (s, "%s", xd->name);
+
if (dm->conf->interface_name_format_decimal)
devname_format = "%s%d/%d/%d";
else
if (dm->conf->interface_name_format_decimal)
devname_format = "%s%d/%d/%d";
else
- 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);
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)
{
;
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))
;
## Whitelist specific interface by specifying PCI address
# dev 0000:02:00.0
## Whitelist specific interface by specifying PCI address
# dev 0000:02:00.0
+ ## Set interface name
+ # dev 0000:02:00.1 {
+ # name eth0
+ # }
+
## Whitelist specific interface by specifying PCI address and in
## addition specify custom parameters for this interface
# dev 0000:02:00.1 {
## Whitelist specific interface by specifying PCI address and in
## addition specify custom parameters for this interface
# dev 0000:02:00.1 {