DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] devargs: backup entry when inserting duplicated item
@ 2021-04-17 15:15 Xueming Li
  2021-04-19 16:15 ` Thomas Monjalon
  0 siblings, 1 reply; 2+ messages in thread
From: Xueming Li @ 2021-04-17 15:15 UTC (permalink / raw)
  Cc: dev, xuemingl, Harris James R, Gaetan Rivet, Ray Kinsella

When insert devargs that already in list, existing one was reset and
replaced completely by new once, the entry info was lost during copy.

This patch backups entry info before copy.

Fixes: 64051bb1f144 ("devargs: unify scratch buffer storage")

Signed-off-by: Xueming Li <xuemingl@nvidia.com>
---
 lib/librte_eal/common/eal_common_devargs.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/librte_eal/common/eal_common_devargs.c b/lib/librte_eal/common/eal_common_devargs.c
index e40b91ea66..96e0456d20 100644
--- a/lib/librte_eal/common/eal_common_devargs.c
+++ b/lib/librte_eal/common/eal_common_devargs.c
@@ -295,6 +295,7 @@ rte_devargs_insert(struct rte_devargs **da)
 		if (strcmp(listed_da->bus->name, (*da)->bus->name) == 0 &&
 				strcmp(listed_da->name, (*da)->name) == 0) {
 			/* device already in devargs list, must be updated */
+			(*da)->next = listed_da->next;
 			rte_devargs_reset(listed_da);
 			*listed_da = **da;
 			/* replace provided devargs with found one */
-- 
2.25.1


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

* Re: [dpdk-dev] [PATCH] devargs: backup entry when inserting duplicated item
  2021-04-17 15:15 [dpdk-dev] [PATCH] devargs: backup entry when inserting duplicated item Xueming Li
@ 2021-04-19 16:15 ` Thomas Monjalon
  0 siblings, 0 replies; 2+ messages in thread
From: Thomas Monjalon @ 2021-04-19 16:15 UTC (permalink / raw)
  To: Xueming Li; +Cc: dev, Harris James R, Gaetan Rivet, Ray Kinsella

17/04/2021 17:15, Xueming Li:
> When insert devargs that already in list, existing one was reset and
> replaced completely by new once, the entry info was lost during copy.
> 
> This patch backups entry info before copy.
> 
> Fixes: 64051bb1f144 ("devargs: unify scratch buffer storage")
> 
Reported-by: Jim Harris <james.r.harris@intel.com>

> Signed-off-by: Xueming Li <xuemingl@nvidia.com>

Applied, thanks



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

end of thread, other threads:[~2021-04-19 16:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-17 15:15 [dpdk-dev] [PATCH] devargs: backup entry when inserting duplicated item Xueming Li
2021-04-19 16:15 ` Thomas Monjalon

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