DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] bus/pci: fix missing case for virtio-crypto
@ 2018-11-01 12:10 Fan Zhang
  2018-11-01 13:35 ` Thomas Monjalon
  2018-11-06  1:12 ` Thomas Monjalon
  0 siblings, 2 replies; 6+ messages in thread
From: Fan Zhang @ 2018-11-01 12:10 UTC (permalink / raw)
  To: dev; +Cc: thomas, alejandro.lucero

The recent change to rte_pci_read_config() caused virtio-crypto
device initialization always failed as it has a
RTE_KDRV_UIO_GENERIC driver type. This patch fixes the problem.

Fixes: 630deed612ca ("bus/pci: compare kernel driver instead of interrupt handler")

Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>
---
 drivers/bus/pci/linux/pci.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
index 1783ec7f5..0220adc66 100644
--- a/drivers/bus/pci/linux/pci.c
+++ b/drivers/bus/pci/linux/pci.c
@@ -704,6 +704,7 @@ int rte_pci_read_config(const struct rte_pci_device *device,
 
 	switch (device->kdrv) {
 	case RTE_KDRV_IGB_UIO:
+	case RTE_KDRV_UIO_GENERIC:
 		return pci_uio_read_config(intr_handle, buf, len, offset);
 #ifdef VFIO_PRESENT
 	case RTE_KDRV_VFIO:
-- 
2.13.6

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

* Re: [dpdk-dev] [PATCH] bus/pci: fix missing case for virtio-crypto
  2018-11-01 12:10 [dpdk-dev] [PATCH] bus/pci: fix missing case for virtio-crypto Fan Zhang
@ 2018-11-01 13:35 ` Thomas Monjalon
  2018-11-02 10:01   ` Zhang, Roy Fan
  2018-11-06  1:12 ` Thomas Monjalon
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Monjalon @ 2018-11-01 13:35 UTC (permalink / raw)
  To: Fan Zhang; +Cc: dev, alejandro.lucero

01/11/2018 13:10, Fan Zhang:
> The recent change to rte_pci_read_config() caused virtio-crypto
> device initialization always failed as it has a
> RTE_KDRV_UIO_GENERIC driver type. This patch fixes the problem.

Hi Fan,
this issue is not related at all to virtio-crypto.
It can happen with any PMD, right?

In the title, we should mention UIO generic driver.

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

* Re: [dpdk-dev] [PATCH] bus/pci: fix missing case for virtio-crypto
  2018-11-01 13:35 ` Thomas Monjalon
@ 2018-11-02 10:01   ` Zhang, Roy Fan
  2018-11-02 10:39     ` Thomas Monjalon
  0 siblings, 1 reply; 6+ messages in thread
From: Zhang, Roy Fan @ 2018-11-02 10:01 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, alejandro.lucero

Hi Thomas,

You are right, the problem can happen with any PMD falls into RTE_KDRV_UIO_GENERIC and RTE_KDRV_NIC_UIO driver type. As riginally rte_pci_read_config() only covered 2 out of 4 possible driver types' .

The patch was submitted for fixing the Virtio Crypto Initialization Segmentation Fault problem introduced in 18.11 RC1, and it did. The problem is I don't think the patch will fix all problems of rte_pci_read_config(). Even I added RTE_KDRV_UIO_GENERIC type into the switch case there is a remaining RTE_KDRV_NIC_UIO type I am not sure where to fit due to the limited knowledge.

That's why I write the patch title like this. I hope someone else with better bus knowledge could submit a complete fix patch.

Best regards,
Fan

> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas@monjalon.net]
> Sent: Thursday, November 1, 2018 1:35 PM
> To: Zhang, Roy Fan <roy.fan.zhang@intel.com>
> Cc: dev@dpdk.org; alejandro.lucero@netronome.com
> Subject: Re: [PATCH] bus/pci: fix missing case for virtio-crypto
> 
> 01/11/2018 13:10, Fan Zhang:
> > The recent change to rte_pci_read_config() caused virtio-crypto device
> > initialization always failed as it has a RTE_KDRV_UIO_GENERIC driver
> > type. This patch fixes the problem.
> 
> Hi Fan,
> this issue is not related at all to virtio-crypto.
> It can happen with any PMD, right?
> 
> In the title, we should mention UIO generic driver.
> 
> 

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

* Re: [dpdk-dev] [PATCH] bus/pci: fix missing case for virtio-crypto
  2018-11-02 10:01   ` Zhang, Roy Fan
@ 2018-11-02 10:39     ` Thomas Monjalon
  2018-11-05 22:18       ` Thomas Monjalon
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Monjalon @ 2018-11-02 10:39 UTC (permalink / raw)
  To: Zhang, Roy Fan; +Cc: dev, alejandro.lucero, bruce.richardson, ferruh.yigit

+Cc Bruce and Ferruh

02/11/2018 11:01, Zhang, Roy Fan:
> Hi Thomas,
> 
> You are right, the problem can happen with any PMD falls into RTE_KDRV_UIO_GENERIC and RTE_KDRV_NIC_UIO driver type. As riginally rte_pci_read_config() only covered 2 out of 4 possible driver types' .
> 
> The patch was submitted for fixing the Virtio Crypto Initialization Segmentation Fault problem introduced in 18.11 RC1, and it did. The problem is I don't think the patch will fix all problems of rte_pci_read_config(). Even I added RTE_KDRV_UIO_GENERIC type into the switch case there is a remaining RTE_KDRV_NIC_UIO type I am not sure where to fit due to the limited knowledge.
> 
> That's why I write the patch title like this. I hope someone else with better bus knowledge could submit a complete fix patch.
> 
> Best regards,
> Fan
> 
> > -----Original Message-----
> > From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > Sent: Thursday, November 1, 2018 1:35 PM
> > To: Zhang, Roy Fan <roy.fan.zhang@intel.com>
> > Cc: dev@dpdk.org; alejandro.lucero@netronome.com
> > Subject: Re: [PATCH] bus/pci: fix missing case for virtio-crypto
> > 
> > 01/11/2018 13:10, Fan Zhang:
> > > The recent change to rte_pci_read_config() caused virtio-crypto device
> > > initialization always failed as it has a RTE_KDRV_UIO_GENERIC driver
> > > type. This patch fixes the problem.
> > 
> > Hi Fan,
> > this issue is not related at all to virtio-crypto.
> > It can happen with any PMD, right?
> > 
> > In the title, we should mention UIO generic driver.
> > 
> > 
> 

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

* Re: [dpdk-dev] [PATCH] bus/pci: fix missing case for virtio-crypto
  2018-11-02 10:39     ` Thomas Monjalon
@ 2018-11-05 22:18       ` Thomas Monjalon
  0 siblings, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2018-11-05 22:18 UTC (permalink / raw)
  To: Zhang, Roy Fan; +Cc: dev, alejandro.lucero, bruce.richardson, ferruh.yigit

We must also fix rte_pci_write_config()

02/11/2018 11:39, Thomas Monjalon:
> +Cc Bruce and Ferruh
> 
> 02/11/2018 11:01, Zhang, Roy Fan:
> > Hi Thomas,
> > 
> > You are right, the problem can happen with any PMD falls into RTE_KDRV_UIO_GENERIC and RTE_KDRV_NIC_UIO driver type. As riginally rte_pci_read_config() only covered 2 out of 4 possible driver types' .
> > 
> > The patch was submitted for fixing the Virtio Crypto Initialization Segmentation Fault problem introduced in 18.11 RC1, and it did. The problem is I don't think the patch will fix all problems of rte_pci_read_config(). Even I added RTE_KDRV_UIO_GENERIC type into the switch case there is a remaining RTE_KDRV_NIC_UIO type I am not sure where to fit due to the limited knowledge.
> > 
> > That's why I write the patch title like this. I hope someone else with better bus knowledge could submit a complete fix patch.
> > 
> > Best regards,
> > Fan
> > 
> > > -----Original Message-----
> > > From: Thomas Monjalon [mailto:thomas@monjalon.net]
> > > Sent: Thursday, November 1, 2018 1:35 PM
> > > To: Zhang, Roy Fan <roy.fan.zhang@intel.com>
> > > Cc: dev@dpdk.org; alejandro.lucero@netronome.com
> > > Subject: Re: [PATCH] bus/pci: fix missing case for virtio-crypto
> > > 
> > > 01/11/2018 13:10, Fan Zhang:
> > > > The recent change to rte_pci_read_config() caused virtio-crypto device
> > > > initialization always failed as it has a RTE_KDRV_UIO_GENERIC driver
> > > > type. This patch fixes the problem.
> > > 
> > > Hi Fan,
> > > this issue is not related at all to virtio-crypto.
> > > It can happen with any PMD, right?
> > > 
> > > In the title, we should mention UIO generic driver.
> > > 
> > > 
> > 
> 
> 
> 
> 
> 
> 

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

* Re: [dpdk-dev] [PATCH] bus/pci: fix missing case for virtio-crypto
  2018-11-01 12:10 [dpdk-dev] [PATCH] bus/pci: fix missing case for virtio-crypto Fan Zhang
  2018-11-01 13:35 ` Thomas Monjalon
@ 2018-11-06  1:12 ` Thomas Monjalon
  1 sibling, 0 replies; 6+ messages in thread
From: Thomas Monjalon @ 2018-11-06  1:12 UTC (permalink / raw)
  To: Fan Zhang; +Cc: dev, alejandro.lucero

01/11/2018 13:10, Fan Zhang:
> The recent change to rte_pci_read_config() caused virtio-crypto
> device initialization always failed as it has a
> RTE_KDRV_UIO_GENERIC driver type. This patch fixes the problem.
> 
> Fixes: 630deed612ca ("bus/pci: compare kernel driver instead of interrupt handler")
> 
> Signed-off-by: Fan Zhang <roy.fan.zhang@intel.com>

Applied with same change in rte_pci_write_config, and reworded logs, thanks.

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

end of thread, other threads:[~2018-11-06  1:12 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-01 12:10 [dpdk-dev] [PATCH] bus/pci: fix missing case for virtio-crypto Fan Zhang
2018-11-01 13:35 ` Thomas Monjalon
2018-11-02 10:01   ` Zhang, Roy Fan
2018-11-02 10:39     ` Thomas Monjalon
2018-11-05 22:18       ` Thomas Monjalon
2018-11-06  1:12 ` 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).