From 616dc65bea06d8178ad145ebcf3f9b9060a976e9 Mon Sep 17 00:00:00 2001 From: Remi Pommarel Date: Tue, 20 Jan 2015 20:15:16 +0100 Subject: [PATCH] pcap: fix device name Ethernet device's data should contain the virtual device name for pcap port. This name is correctly set by rte_eth_dev_allocate() at initialization time, but it is directly lost. Fixes: 83b41136934d ("ethdev: add unique name to devices") Signed-off-by: Remi Pommarel Acked-by: Thomas Monjalon --- lib/librte_pmd_pcap/rte_eth_pcap.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/librte_pmd_pcap/rte_eth_pcap.c b/lib/librte_pmd_pcap/rte_eth_pcap.c index f12d1e7e09..aa01464c3f 100644 --- a/lib/librte_pmd_pcap/rte_eth_pcap.c +++ b/lib/librte_pmd_pcap/rte_eth_pcap.c @@ -735,6 +735,7 @@ rte_pmd_init_internals(const char *name, const unsigned nb_rx_queues, data->dev_private = *internals; data->port_id = (*eth_dev)->data->port_id; + snprintf(data->name, sizeof(data->name), "%s", (*eth_dev)->data->name); data->nb_rx_queues = (uint16_t)nb_rx_queues; data->nb_tx_queues = (uint16_t)nb_tx_queues; data->dev_link = pmd_link; -- 2.20.1