From: Ferruh Yigit <ferruh.yigit@intel.com>
To: David Marchand <david.marchand@6wind.com>, thomas.monjalon@6wind.com
Cc: dev@dpdk.org, linville@tuxdriver.com, declan.doherty@intel.com,
zlu@ezchip.com, lsun@ezchip.com, alejandro.lucero@netronome.com,
mtetsuyah@gmail.com, nicolas.pernas.maradei@emutex.com,
harish.patil@qlogic.com, rasesh.mody@qlogic.com,
sony.chacko@qlogic.com, bruce.richardson@intel.com,
huawei.xie@intel.com, yuanhan.liu@linux.intel.com,
jianfeng.tan@intel.com
Subject: Re: [dpdk-dev] [PATCH 2/2] net: align ethdev and eal driver names
Date: Thu, 10 Nov 2016 18:46:17 +0000 [thread overview]
Message-ID: <9fcfff29-fc8f-b61b-dc72-0763fe559556@intel.com> (raw)
In-Reply-To: <1478785884-29273-2-git-send-email-david.marchand@6wind.com>
On 11/10/2016 1:51 PM, David Marchand wrote:
> Some virtual pmds report a different name than the vdev driver name
> registered in eal.
> While it does not hurt, let's try to be consistent.
>
> Signed-off-by: David Marchand <david.marchand@6wind.com>
> ---
Since you did all the work, instead of second patch what do you think
doing something like [1] (basically adding eth_dev->rte_driver link) and
when done for all vdevs, remove eth_dev->data->drv_name completely?
[1]
diff --git a/drivers/net/null/rte_eth_null.c
b/drivers/net/null/rte_eth_null.c
index e4fd68f..d657133 100644
--- a/drivers/net/null/rte_eth_null.c
+++ b/drivers/net/null/rte_eth_null.c
@@ -553,9 +553,9 @@ eth_dev_null_create(const char *name,
TAILQ_INIT(ð_dev->link_intr_cbs);
eth_dev->driver = NULL;
+ eth_dev->rte_driver = &pmd_null_drv.driver;
data->dev_flags = RTE_ETH_DEV_DETACHABLE;
data->kdrv = RTE_KDRV_NONE;
- data->drv_name = pmd_null_drv.driver.name;
data->numa_node = numa_node;
/* finally assign rx and tx ops */
diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
index fde8112..0527c4a 100644
--- a/lib/librte_ether/rte_ethdev.c
+++ b/lib/librte_ether/rte_ethdev.c
@@ -259,6 +259,7 @@ rte_eth_dev_pci_probe(struct rte_pci_driver *pci_drv,
}
eth_dev->pci_dev = pci_dev;
eth_dev->driver = eth_drv;
+ eth_dev->rte_driver = pci_drv->driver.name;
eth_dev->data->rx_mbuf_alloc_failed = 0;
/* init user callbacks */
@@ -1557,7 +1558,7 @@ rte_eth_dev_info_get(uint8_t port_id, struct
rte_eth_dev_info *dev_info)
RTE_FUNC_PTR_OR_RET(*dev->dev_ops->dev_infos_get);
(*dev->dev_ops->dev_infos_get)(dev, dev_info);
dev_info->pci_dev = dev->pci_dev;
- dev_info->driver_name = dev->data->drv_name;
+ dev_info->driver_name = dev->rte_driver->name;
dev_info->nb_rx_queues = dev->data->nb_rx_queues;
dev_info->nb_tx_queues = dev->data->nb_tx_queues;
}
@@ -3214,7 +3215,6 @@ rte_eth_copy_pci_info(struct rte_eth_dev *eth_dev,
struct rte_pci_device *pci_de
eth_dev->data->kdrv = pci_dev->kdrv;
eth_dev->data->numa_node = pci_dev->device.numa_node;
- eth_dev->data->drv_name = pci_dev->driver->driver.name;
}
int
diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h
index 9678179..63e7931 100644
--- a/lib/librte_ether/rte_ethdev.h
+++ b/lib/librte_ether/rte_ethdev.h
@@ -1642,6 +1642,7 @@ struct rte_eth_dev {
*/
struct rte_eth_rxtx_callback
*pre_tx_burst_cbs[RTE_MAX_QUEUES_PER_PORT];
uint8_t attached; /**< Flag indicating the port is attached */
+ struct rte_driver *rte_driver;
} __rte_cache_aligned;
struct rte_eth_dev_sriov {
next prev parent reply other threads:[~2016-11-10 18:46 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-10 13:51 [dpdk-dev] [PATCH 1/2] net: remove dead " David Marchand
2016-11-10 13:51 ` [dpdk-dev] [PATCH 2/2] net: align ethdev and eal " David Marchand
2016-11-10 18:46 ` Ferruh Yigit [this message]
2016-11-21 16:31 ` [dpdk-dev] [PATCH 1/2] net: remove dead " Jan Blunck
2016-11-21 18:06 ` [dpdk-dev] [PATCH v2 " David Marchand
2016-11-21 18:06 ` [dpdk-dev] [PATCH v2 2/2] net: align ethdev and eal " David Marchand
2016-11-24 11:42 ` [dpdk-dev] [PATCH v2 1/2] net: remove dead " Ferruh Yigit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=9fcfff29-fc8f-b61b-dc72-0763fe559556@intel.com \
--to=ferruh.yigit@intel.com \
--cc=alejandro.lucero@netronome.com \
--cc=bruce.richardson@intel.com \
--cc=david.marchand@6wind.com \
--cc=declan.doherty@intel.com \
--cc=dev@dpdk.org \
--cc=harish.patil@qlogic.com \
--cc=huawei.xie@intel.com \
--cc=jianfeng.tan@intel.com \
--cc=linville@tuxdriver.com \
--cc=lsun@ezchip.com \
--cc=mtetsuyah@gmail.com \
--cc=nicolas.pernas.maradei@emutex.com \
--cc=rasesh.mody@qlogic.com \
--cc=sony.chacko@qlogic.com \
--cc=thomas.monjalon@6wind.com \
--cc=yuanhan.liu@linux.intel.com \
--cc=zlu@ezchip.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).