DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] eal: fix to set the rte_device ptr's device args before hotplug
@ 2020-02-04  9:15 Somnath Kotur
  2020-02-04  9:49 ` Gaetan Rivet
  0 siblings, 1 reply; 11+ messages in thread
From: Somnath Kotur @ 2020-02-04  9:15 UTC (permalink / raw)
  To: dev; +Cc: ferruh.yigit

As per the comments in this code section, "since there is a matching device,
it is now its responsibility to manage the devargs we've just inserted."
But the matching device ptr's devargs is still uninitialized or not pointing
to the newest dev_args that were passed as a parameter to local_dev_probe().
This is needed particularly in the case when *probe is called again* on an
already probed device(the parent device for the representor) as part of adding
a representor port to an OVS switch(OVS-DPDK) like so:
ovs-vsctl add-port ovsbr0 vfrep1 -- set Interface vfrep1 type=dpdk \
options:dpdk-devargs=0000:06:02.0,representor=[1]

Fixes: 7e8b26650146 ("eal: fix hotplug add / remove")

Signed-off-by: Somnath Kotur <somnath.kotur@broadcom.com>
---
 lib/librte_eal/common/eal_common_dev.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_eal/common/eal_common_dev.c b/lib/librte_eal/common/eal_common_dev.c
index 9e4f09d..311eef5 100644
--- a/lib/librte_eal/common/eal_common_dev.c
+++ b/lib/librte_eal/common/eal_common_dev.c
@@ -171,6 +171,7 @@ static int cmp_dev_name(const struct rte_device *dev, const void *_name)
 	 * those devargs shouldn't be removed manually anymore.
 	 */
 
+	dev->devargs = da;
 	ret = dev->bus->plug(dev);
 	if (ret > 0)
 		ret = -ENOTSUP;
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2020-02-14  6:46 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-04  9:15 [dpdk-dev] [PATCH] eal: fix to set the rte_device ptr's device args before hotplug Somnath Kotur
2020-02-04  9:49 ` Gaetan Rivet
2020-02-05  8:52   ` Somnath Kotur
2020-02-05  9:17     ` Gaetan Rivet
2020-02-06  4:06       ` Somnath Kotur
2020-02-07  5:52         ` Somnath Kotur
2020-02-10 14:34           ` Gaetan Rivet
2020-02-10 15:00             ` Gaetan Rivet
2020-02-11  4:33             ` Somnath Kotur
2020-02-11  8:38               ` Gaetan Rivet
2020-02-14  6:46                 ` Somnath Kotur

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).