patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH v4 05/10] net/ifc: store only registered device instance
       [not found] ` <20181214211612.167681-1-xiao.w.wang@intel.com>
@ 2018-12-14 21:16   ` Xiao Wang
  2018-12-16  9:12     ` Maxime Coquelin
  0 siblings, 1 reply; 2+ messages in thread
From: Xiao Wang @ 2018-12-14 21:16 UTC (permalink / raw)
  To: tiwei.bie, maxime.coquelin
  Cc: alejandro.lucero, dev, zhihong.wang, xiaolong.ye, Xiao Wang, stable

If driver fails to register ifc VF device into vhost lib, then this
device should not be stored.

Fixes: a3f8150eac6d ("net/ifcvf: add ifcvf vDPA driver")
cc: stable@dpdk.org

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
---
 drivers/net/ifc/ifcvf_vdpa.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ifc/ifcvf_vdpa.c b/drivers/net/ifc/ifcvf_vdpa.c
index aacd5f9bf..6fcd50b73 100644
--- a/drivers/net/ifc/ifcvf_vdpa.c
+++ b/drivers/net/ifc/ifcvf_vdpa.c
@@ -781,10 +781,6 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 	internal->dev_addr.type = PCI_ADDR;
 	list->internal = internal;
 
-	pthread_mutex_lock(&internal_list_lock);
-	TAILQ_INSERT_TAIL(&internal_list, list, next);
-	pthread_mutex_unlock(&internal_list_lock);
-
 	internal->did = rte_vdpa_register_device(&internal->dev_addr,
 				&ifcvf_ops);
 	if (internal->did < 0) {
@@ -792,6 +788,10 @@ ifcvf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 		goto error;
 	}
 
+	pthread_mutex_lock(&internal_list_lock);
+	TAILQ_INSERT_TAIL(&internal_list, list, next);
+	pthread_mutex_unlock(&internal_list_lock);
+
 	rte_atomic32_set(&internal->started, 1);
 	update_datapath(internal);
 
-- 
2.15.1

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

* Re: [dpdk-stable] [PATCH v4 05/10] net/ifc: store only registered device instance
  2018-12-14 21:16   ` [dpdk-stable] [PATCH v4 05/10] net/ifc: store only registered device instance Xiao Wang
@ 2018-12-16  9:12     ` Maxime Coquelin
  0 siblings, 0 replies; 2+ messages in thread
From: Maxime Coquelin @ 2018-12-16  9:12 UTC (permalink / raw)
  To: Xiao Wang, tiwei.bie
  Cc: alejandro.lucero, dev, zhihong.wang, xiaolong.ye, stable



On 12/14/18 10:16 PM, Xiao Wang wrote:
> If driver fails to register ifc VF device into vhost lib, then this
> device should not be stored.
> 
> Fixes: a3f8150eac6d ("net/ifcvf: add ifcvf vDPA driver")
> cc: stable@dpdk.org
> 
> Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
> ---
>   drivers/net/ifc/ifcvf_vdpa.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime

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

end of thread, other threads:[~2018-12-16  9:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20181213100910.13087-2-xiao.w.wang@intel.com>
     [not found] ` <20181214211612.167681-1-xiao.w.wang@intel.com>
2018-12-14 21:16   ` [dpdk-stable] [PATCH v4 05/10] net/ifc: store only registered device instance Xiao Wang
2018-12-16  9:12     ` Maxime Coquelin

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