DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] bus/pci: pcidev access from secondary process
@ 2020-04-24 17:08 Vijaya Mohan Guvva
  2020-04-25 20:28 ` Thomas Monjalon
  0 siblings, 1 reply; 7+ messages in thread
From: Vijaya Mohan Guvva @ 2020-04-24 17:08 UTC (permalink / raw)
  To: dev; +Cc: Vijaya Mohan Guvva, stable

For pci devices presented through igb_uio, pcidev->mem_resource[] is
not populated when the device is initialized for secondary process.

Initialize pcidev->mem_resource[] with pci-bar mapped addresses.

Fixes: c752998b (pci: introduce library and driver)
Cc: stable@dpdk.org

Signed-off-by: Vijaya Mohan Guvva <vijay1054@gmail.com>
---
 drivers/bus/pci/pci_common_uio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/bus/pci/pci_common_uio.c b/drivers/bus/pci/pci_common_uio.c
index 7ea73db..f4dca9d 100644
--- a/drivers/bus/pci/pci_common_uio.c
+++ b/drivers/bus/pci/pci_common_uio.c
@@ -70,6 +70,7 @@
 				}
 				return -1;
 			}
+			dev->mem_resource[i].addr = mapaddr;
 		}
 		return 0;
 	}
-- 
1.8.3.1


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

* Re: [dpdk-dev] [PATCH] bus/pci: pcidev access from secondary process
  2020-04-24 17:08 [dpdk-dev] [PATCH] bus/pci: pcidev access from secondary process Vijaya Mohan Guvva
@ 2020-04-25 20:28 ` Thomas Monjalon
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2020-04-25 20:28 UTC (permalink / raw)
  To: Vijaya Mohan Guvva; +Cc: dev, stable, ferruh.yigit

24/04/2020 19:08, Vijaya Mohan Guvva:
> For pci devices presented through igb_uio, pcidev->mem_resource[] is
> not populated when the device is initialized for secondary process.
> 
> Initialize pcidev->mem_resource[] with pci-bar mapped addresses.
> 
> Fixes: c752998b (pci: introduce library and driver)
> Cc: stable@dpdk.org
> 
> Signed-off-by: Vijaya Mohan Guvva <vijay1054@gmail.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Applied, thanks



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

* Re: [dpdk-dev] [PATCH] bus/pci: pcidev access from secondary process
  2020-03-31  2:12     ` vijay mohan
@ 2020-03-31  9:11       ` Thomas Monjalon
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2020-03-31  9:11 UTC (permalink / raw)
  To: vijay mohan; +Cc: dev, Trahe, Fiona, Ferruh Yigit

31/03/2020 04:12, vijay mohan:
> On Mon, 30 Mar 2020 at 18:54, Thomas Monjalon <thomas@monjalon.net> wrote:
> > 06/03/2020 13:28, Ferruh Yigit:
> > > On 3/6/2020 12:02 AM, Vijaya Mohan Guvva wrote:
> > > > For pci devices presented through igb_uio, pcidev->mem_resource[] is
> > > > not populated when the device is initialized for secondary process.
> > > >
> > > > Initialize pcidev->mem_resource[] with pci-bar mapped addresses.
> > > >
> > > > Signed-off-by: Vijaya Mohan Guvva <vijay1054@gmail.com>
> > >
> > > Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
> >
> > Do you mean secondary process never worked with igb_uio?
> > Or is there a specific case?
> 
> As long as pmd or application doesn't access
> dev->mem_resource[i].addr, secondary process works with igb_uio.
> But for pci devices like crypto_qat, pmd checks for
> dev->mem_resource[i].addr and bails out if the address is null.
> 
> > What is the root cause?
> 
> Root cause is, not initializing the mapped address in rte_pcidev when
> device is exposed through igb_uio.

So the issue has always been there?
In this case, you should specify the origin commit in "Fixes:" line.

> > Should it be backported to stable?

I think it needs to be backported. So please add Cc: stable@dpdk.org
in the commit log.



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

* Re: [dpdk-dev] [PATCH] bus/pci: pcidev access from secondary process
  2020-03-31  1:54   ` Thomas Monjalon
@ 2020-03-31  2:12     ` vijay mohan
  2020-03-31  9:11       ` Thomas Monjalon
  0 siblings, 1 reply; 7+ messages in thread
From: vijay mohan @ 2020-03-31  2:12 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev, Trahe, Fiona, Ferruh Yigit

Hi Thomas,
As long as pmd or application doesn't access
dev->mem_resource[i].addr, secondary process works with igb_uio.
But for pci devices like crypto_qat, pmd checks for
dev->mem_resource[i].addr and bails out if the address is null.

Root cause is, not initializing the mapped address in rte_pcidev when
device is exposed through igb_uio.

Thanks,
Vijay

On Mon, 30 Mar 2020 at 18:54, Thomas Monjalon <thomas@monjalon.net> wrote:
>
> 06/03/2020 13:28, Ferruh Yigit:
> > On 3/6/2020 12:02 AM, Vijaya Mohan Guvva wrote:
> > > For pci devices presented through igb_uio, pcidev->mem_resource[] is
> > > not populated when the device is initialized for secondary process.
> > >
> > > Initialize pcidev->mem_resource[] with pci-bar mapped addresses.
> > >
> > > Signed-off-by: Vijaya Mohan Guvva <vijay1054@gmail.com>
> >
> > Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
>
> Do you mean secondary process never worked with igb_uio?
> Or is there a specific case?
> What is the root cause?
> Should it be backported to stable?
>
>

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

* Re: [dpdk-dev] [PATCH] bus/pci: pcidev access from secondary process
  2020-03-06 12:28 ` Ferruh Yigit
@ 2020-03-31  1:54   ` Thomas Monjalon
  2020-03-31  2:12     ` vijay mohan
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Monjalon @ 2020-03-31  1:54 UTC (permalink / raw)
  To: Vijaya Mohan Guvva; +Cc: dev, fiona.trahe, Ferruh Yigit

06/03/2020 13:28, Ferruh Yigit:
> On 3/6/2020 12:02 AM, Vijaya Mohan Guvva wrote:
> > For pci devices presented through igb_uio, pcidev->mem_resource[] is
> > not populated when the device is initialized for secondary process.
> > 
> > Initialize pcidev->mem_resource[] with pci-bar mapped addresses.
> > 
> > Signed-off-by: Vijaya Mohan Guvva <vijay1054@gmail.com>
> 
> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

Do you mean secondary process never worked with igb_uio?
Or is there a specific case?
What is the root cause?
Should it be backported to stable?



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

* Re: [dpdk-dev] [PATCH] bus/pci: pcidev access from secondary process
  2020-03-06  0:02 Vijaya Mohan Guvva
@ 2020-03-06 12:28 ` Ferruh Yigit
  2020-03-31  1:54   ` Thomas Monjalon
  0 siblings, 1 reply; 7+ messages in thread
From: Ferruh Yigit @ 2020-03-06 12:28 UTC (permalink / raw)
  To: Vijaya Mohan Guvva; +Cc: dev, fiona.trahe

On 3/6/2020 12:02 AM, Vijaya Mohan Guvva wrote:
> For pci devices presented through igb_uio, pcidev->mem_resource[] is
> not populated when the device is initialized for secondary process.
> 
> Initialize pcidev->mem_resource[] with pci-bar mapped addresses.
> 
> Signed-off-by: Vijaya Mohan Guvva <vijay1054@gmail.com>

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>

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

* [dpdk-dev] [PATCH] bus/pci: pcidev access from secondary process
@ 2020-03-06  0:02 Vijaya Mohan Guvva
  2020-03-06 12:28 ` Ferruh Yigit
  0 siblings, 1 reply; 7+ messages in thread
From: Vijaya Mohan Guvva @ 2020-03-06  0:02 UTC (permalink / raw)
  To: ferruh.yigit; +Cc: dev, fiona.trahe, Vijaya Mohan Guvva

For pci devices presented through igb_uio, pcidev->mem_resource[] is
not populated when the device is initialized for secondary process.

Initialize pcidev->mem_resource[] with pci-bar mapped addresses.

Signed-off-by: Vijaya Mohan Guvva <vijay1054@gmail.com>
---
 drivers/bus/pci/pci_common_uio.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/bus/pci/pci_common_uio.c b/drivers/bus/pci/pci_common_uio.c
index 7ea73db..f4dca9d 100644
--- a/drivers/bus/pci/pci_common_uio.c
+++ b/drivers/bus/pci/pci_common_uio.c
@@ -70,6 +70,7 @@
 				}
 				return -1;
 			}
+			dev->mem_resource[i].addr = mapaddr;
 		}
 		return 0;
 	}
-- 
1.8.3.1


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

end of thread, other threads:[~2020-04-25 20:28 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-04-24 17:08 [dpdk-dev] [PATCH] bus/pci: pcidev access from secondary process Vijaya Mohan Guvva
2020-04-25 20:28 ` Thomas Monjalon
  -- strict thread matches above, loose matches on Subject: below --
2020-03-06  0:02 Vijaya Mohan Guvva
2020-03-06 12:28 ` Ferruh Yigit
2020-03-31  1:54   ` Thomas Monjalon
2020-03-31  2:12     ` vijay mohan
2020-03-31  9:11       ` 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).