From patchwork Tue Jan 20 19:15:16 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Remi Pommarel X-Patchwork-Id: 2415 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 8A6245A80; Tue, 20 Jan 2015 20:11:13 +0100 (CET) Received: from relay6-d.mail.gandi.net (relay6-d.mail.gandi.net [217.70.183.198]) by dpdk.org (Postfix) with ESMTP id 664E05A76 for ; Tue, 20 Jan 2015 20:11:12 +0100 (CET) Received: from mfilter23-d.gandi.net (mfilter23-d.gandi.net [217.70.178.151]) by relay6-d.mail.gandi.net (Postfix) with ESMTP id 59690FB8AC; Tue, 20 Jan 2015 20:11:12 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at mfilter23-d.gandi.net Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by mfilter23-d.gandi.net (mfilter23-d.gandi.net [10.0.15.180]) (amavisd-new, port 10024) with ESMTP id 41WLo7kaXOSW; Tue, 20 Jan 2015 20:11:10 +0100 (CET) X-Originating-IP: 78.232.94.57 Received: from localhost (gimmebre.ws [78.232.94.57]) (Authenticated sender: repk@triplefau.lt) by relay6-d.mail.gandi.net (Postfix) with ESMTPSA id D2522FB87F; Tue, 20 Jan 2015 20:11:10 +0100 (CET) From: Remi Pommarel To: dev@dpdk.org Date: Tue, 20 Jan 2015 20:15:16 +0100 Message-Id: <1421781316-19906-1-git-send-email-repk@triplefau.lt> X-Mailer: git-send-email 2.0.1 Subject: [dpdk-dev] [PATCH] pcap: Fix ethernet device's name for pcap port X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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. 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 f12d1e7..aa01464 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;