DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH] nfp: copy pci info from pci to ethdev
@ 2016-03-23 15:51 Stephen Hemminger
  2016-03-25 12:31 ` Bruce Richardson
  0 siblings, 1 reply; 4+ messages in thread
From: Stephen Hemminger @ 2016-03-23 15:51 UTC (permalink / raw)
  To: alejandro.lucero; +Cc: dev, Stephen Hemminger

The NFP driver (unlike other PCI devices) was not copying the pci info
from the pci_dev to the eth_dev.  This would make the driver_name be
null (and other unset fields) when application uses dev_info_get.

This was found by code review; do not have the hardware.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/nfp/nfp_net.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index 8810704..10ba0ec 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -2319,6 +2319,8 @@ nfp_net_init(struct rte_eth_dev *eth_dev)
 		return 0;
 
 	pci_dev = eth_dev->pci_dev;
+	rte_eth_copy_pci_info(eth_dev, pci_dev);
+
 	hw->device_id = pci_dev->id.device_id;
 	hw->vendor_id = pci_dev->id.vendor_id;
 	hw->subsystem_device_id = pci_dev->id.subsystem_device_id;
-- 
2.1.4

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

* Re: [dpdk-dev] [PATCH] nfp: copy pci info from pci to ethdev
  2016-03-23 15:51 [dpdk-dev] [PATCH] nfp: copy pci info from pci to ethdev Stephen Hemminger
@ 2016-03-25 12:31 ` Bruce Richardson
  2016-03-29  7:16   ` Alejandro Lucero
  0 siblings, 1 reply; 4+ messages in thread
From: Bruce Richardson @ 2016-03-25 12:31 UTC (permalink / raw)
  To: Alejandro Lucero; +Cc: dev, Stephen Hemminger

On Wed, Mar 23, 2016 at 08:51:36AM -0700, Stephen Hemminger wrote:
> The NFP driver (unlike other PCI devices) was not copying the pci info
> from the pci_dev to the eth_dev.  This would make the driver_name be
> null (and other unset fields) when application uses dev_info_get.
> 
> This was found by code review; do not have the hardware.
> 
> Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> ---
Alejandro,

any review or ack on this patch for nfp driver?

Regards,
/Bruce

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

* Re: [dpdk-dev] [PATCH] nfp: copy pci info from pci to ethdev
  2016-03-25 12:31 ` Bruce Richardson
@ 2016-03-29  7:16   ` Alejandro Lucero
  2016-03-31 13:27     ` Thomas Monjalon
  0 siblings, 1 reply; 4+ messages in thread
From: Alejandro Lucero @ 2016-03-29  7:16 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: dev, Stephen Hemminger

Hi guys,

Sorry for the delay but I was on a Easter break.

That patch is OK for me. In fact, I had one patch ready for upstreaming
with this change needed for supporting hotplug. I was waiting for some
feedback from one internal project needing this hotplug functionality
before submitting.

Regards


On Fri, Mar 25, 2016 at 12:31 PM, Bruce Richardson <
bruce.richardson@intel.com> wrote:

> On Wed, Mar 23, 2016 at 08:51:36AM -0700, Stephen Hemminger wrote:
> > The NFP driver (unlike other PCI devices) was not copying the pci info
> > from the pci_dev to the eth_dev.  This would make the driver_name be
> > null (and other unset fields) when application uses dev_info_get.
> >
> > This was found by code review; do not have the hardware.
> >
> > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
> > ---
> Alejandro,
>
> any review or ack on this patch for nfp driver?
>
> Regards,
> /Bruce
>

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

* Re: [dpdk-dev] [PATCH] nfp: copy pci info from pci to ethdev
  2016-03-29  7:16   ` Alejandro Lucero
@ 2016-03-31 13:27     ` Thomas Monjalon
  0 siblings, 0 replies; 4+ messages in thread
From: Thomas Monjalon @ 2016-03-31 13:27 UTC (permalink / raw)
  To: Stephen Hemminger; +Cc: dev, Alejandro Lucero, Bruce Richardson

2016-03-29 08:16, Alejandro Lucero:
> Hi guys,
> 
> Sorry for the delay but I was on a Easter break.
> 
> That patch is OK for me. In fact, I had one patch ready for upstreaming
> with this change needed for supporting hotplug. I was waiting for some
> feedback from one internal project needing this hotplug functionality
> before submitting.
[...]
> > On Wed, Mar 23, 2016 at 08:51:36AM -0700, Stephen Hemminger wrote:
> > > The NFP driver (unlike other PCI devices) was not copying the pci info
> > > from the pci_dev to the eth_dev.  This would make the driver_name be
> > > null (and other unset fields) when application uses dev_info_get.
> > >
> > > This was found by code review; do not have the hardware.
> > >
> > > Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>

Applied, thanks

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

end of thread, other threads:[~2016-03-31 13:29 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-03-23 15:51 [dpdk-dev] [PATCH] nfp: copy pci info from pci to ethdev Stephen Hemminger
2016-03-25 12:31 ` Bruce Richardson
2016-03-29  7:16   ` Alejandro Lucero
2016-03-31 13:27     ` 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).