On 1/20/2022 11:12 AM, Kumara Parameshwaran wrote:
From: Kumara Parameshwaran <kparamesh...@vmware.com>
When a tap device is hotplugged to primary process which in turn
adds the device to all secondary process, the secondary process
does a tap_mp_attach_queues, but the fds are not populated in
the primary during the probe they are populated during the queue_setup,
added a fix to sync the queues during rte_eth_dev_start
Can you please make this a two patches set?
First one is the new API patch,
second one is the tap patch that uses the new API.
Signed-off-by: Kumara Parameshwaran <kparamesh...@vmware.com
<...>
diff --git a/lib/ethdev/rte_ethdev.h b/lib/ethdev/rte_ethdev.h
index 096b676fc1..d9594c0460 100644
--- a/lib/ethdev/rte_ethdev.h
+++ b/lib/ethdev/rte_ethdev.h
@@ -4987,6 +4987,22 @@ rte_eth_read_clock(uint16_t port_id, uint64_t *clock);
int
rte_eth_dev_get_port_by_name(const char *name, uint16_t *port_id);
+/**
+* Get rte_eth_dev from device name. The device name should be specified
+* as below:
+* - PCIe address (Domain:Bus:Device.Function), for example- 0000:2:00.0
+* - SoC device name, for example- fsl-gmac0
+* - vdev dpdk name, for example- net_[pcap0|null0|tap0]
+*
+* @param name
+* pci address or name of the device
+* @return
+* - rte_eth_dev if sucessful
+* - NULL on failure
+*/
+struct rte_eth_dev*
+rte_get_eth_dev_by_name(const char *name);
+
Can you please move this to 'ethdev_driver.h'?
/**
* Get the device name from port ID. The device name is specified as below:
* - PCIe address (Domain:Bus:Device.Function), for example- 0000:02:00.0
diff --git a/lib/ethdev/version.map b/lib/ethdev/version.map
index c2fb0669a4..168898a27c 100644
--- a/lib/ethdev/version.map
+++ b/lib/ethdev/version.map
@@ -128,6 +128,7 @@ DPDK_22 {
rte_flow_isolate;
rte_flow_query;
rte_flow_validate;
+ rte_get_eth_dev_by_name;
And move this to 'INTERNAL' block?
local: *;
};