From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stephen Hemminger Subject: [PATCH 05/13] pmd: remove useless reset of dev_info->dev_pci Date: Mon, 19 Dec 2016 13:59:36 -0800 Message-ID: <20161219215944.17226-6-sthemmin@microsoft.com> References: <20161219215944.17226-1-sthemmin@microsoft.com> Cc: Stephen Hemminger To: dev@dpdk.org Return-path: Received: from mail-io0-f172.google.com (mail-io0-f172.google.com [209.85.223.172]) by dpdk.org (Postfix) with ESMTP id 943C8FABC for ; Mon, 19 Dec 2016 22:59:58 +0100 (CET) Received: by mail-io0-f172.google.com with SMTP id 136so164445232iou.3 for ; Mon, 19 Dec 2016 13:59:58 -0800 (PST) In-Reply-To: <20161219215944.17226-1-sthemmin@microsoft.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Since rte_eth_dev_info_get does memset() on dev_info before calling device specific code, the explicit assignment of NULL in all these virtual drivers has no effect. Signed-off-by: Stephen Hemminger --- app/test/virtual_pmd.c | 1 - drivers/net/af_packet/rte_eth_af_packet.c | 1 - drivers/net/bonding/rte_eth_bond_pmd.c | 1 - drivers/net/null/rte_eth_null.c | 1 - drivers/net/pcap/rte_eth_pcap.c | 1 - drivers/net/ring/rte_eth_ring.c | 1 - drivers/net/xenvirt/rte_eth_xenvirt.c | 1 - 7 files changed, 7 deletions(-) diff --git a/app/test/virtual_pmd.c b/app/test/virtual_pmd.c index 65b44c64..e0447fda 100644 --- a/app/test/virtual_pmd.c +++ b/app/test/virtual_pmd.c @@ -117,7 +117,6 @@ virtual_ethdev_info_get(struct rte_eth_dev *dev __rte_unused, dev_info->max_tx_queues = (uint16_t)512; dev_info->min_rx_bufsize = 0; - dev_info->pci_dev = NULL; } static int diff --git a/drivers/net/af_packet/rte_eth_af_packet.c b/drivers/net/af_packet/rte_eth_af_packet.c index ff450685..2951f86c 100644 --- a/drivers/net/af_packet/rte_eth_af_packet.c +++ b/drivers/net/af_packet/rte_eth_af_packet.c @@ -287,7 +287,6 @@ eth_dev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) dev_info->max_rx_queues = (uint16_t)internals->nb_queues; dev_info->max_tx_queues = (uint16_t)internals->nb_queues; dev_info->min_rx_bufsize = 0; - dev_info->pci_dev = NULL; } static void diff --git a/drivers/net/bonding/rte_eth_bond_pmd.c b/drivers/net/bonding/rte_eth_bond_pmd.c index a80b6fa9..74af6589 100644 --- a/drivers/net/bonding/rte_eth_bond_pmd.c +++ b/drivers/net/bonding/rte_eth_bond_pmd.c @@ -1675,7 +1675,6 @@ bond_ethdev_info(struct rte_eth_dev *dev, struct rte_eth_dev_info *dev_info) dev_info->max_tx_queues = (uint16_t)512; dev_info->min_rx_bufsize = 0; - dev_info->pci_dev = NULL; dev_info->rx_offload_capa = internals->rx_offload_capa; dev_info->tx_offload_capa = internals->tx_offload_capa; diff --git a/drivers/net/null/rte_eth_null.c b/drivers/net/null/rte_eth_null.c index 836d982a..b4f253ad 100644 --- a/drivers/net/null/rte_eth_null.c +++ b/drivers/net/null/rte_eth_null.c @@ -301,7 +301,6 @@ eth_dev_info(struct rte_eth_dev *dev, dev_info->max_rx_queues = RTE_DIM(internals->rx_null_queues); dev_info->max_tx_queues = RTE_DIM(internals->tx_null_queues); dev_info->min_rx_bufsize = 0; - dev_info->pci_dev = NULL; dev_info->reta_size = internals->reta_size; dev_info->flow_type_rss_offloads = internals->flow_type_rss_offloads; } diff --git a/drivers/net/pcap/rte_eth_pcap.c b/drivers/net/pcap/rte_eth_pcap.c index 0162f446..7253b9ad 100644 --- a/drivers/net/pcap/rte_eth_pcap.c +++ b/drivers/net/pcap/rte_eth_pcap.c @@ -559,7 +559,6 @@ eth_dev_info(struct rte_eth_dev *dev, dev_info->max_rx_queues = dev->data->nb_rx_queues; dev_info->max_tx_queues = dev->data->nb_tx_queues; dev_info->min_rx_bufsize = 0; - dev_info->pci_dev = NULL; } static void diff --git a/drivers/net/ring/rte_eth_ring.c b/drivers/net/ring/rte_eth_ring.c index c1767c48..dc99a1fe 100644 --- a/drivers/net/ring/rte_eth_ring.c +++ b/drivers/net/ring/rte_eth_ring.c @@ -179,7 +179,6 @@ eth_dev_info(struct rte_eth_dev *dev, dev_info->max_rx_queues = (uint16_t)internals->max_rx_queues; dev_info->max_tx_queues = (uint16_t)internals->max_tx_queues; dev_info->min_rx_bufsize = 0; - dev_info->pci_dev = NULL; } static void diff --git a/drivers/net/xenvirt/rte_eth_xenvirt.c b/drivers/net/xenvirt/rte_eth_xenvirt.c index c08a0568..609824b6 100644 --- a/drivers/net/xenvirt/rte_eth_xenvirt.c +++ b/drivers/net/xenvirt/rte_eth_xenvirt.c @@ -337,7 +337,6 @@ eth_dev_info(struct rte_eth_dev *dev, dev_info->max_rx_queues = (uint16_t)1; dev_info->max_tx_queues = (uint16_t)1; dev_info->min_rx_bufsize = 0; - dev_info->pci_dev = NULL; } static void -- 2.11.0