[dpdk-dev,03/16] nfp: add support for new pci id

Message ID 1503591622-16232-4-git-send-email-alejandro.lucero@netronome.com (mailing list archive)
State Changes Requested, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Alejandro Lucero Aug. 24, 2017, 4:20 p.m. UTC
  A NFP PF PCI devices can have PCI ID 4000 or 6000.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
---
 drivers/net/nfp/nfp_net.c     | 4 ++++
 drivers/net/nfp/nfp_net_pmd.h | 1 +
 2 files changed, 5 insertions(+)
  

Comments

Ferruh Yigit Aug. 28, 2017, 4:43 p.m. UTC | #1
On 8/24/2017 5:20 PM, Alejandro Lucero wrote:
> A NFP PF PCI devices can have PCI ID 4000 or 6000.
> 
> Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>

<...>

> @@ -2682,6 +2682,10 @@ static int nfp_pf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
>  static const struct rte_pci_id pci_id_nfp_pf_net_map[] = {
>  	{
>  		RTE_PCI_DEVICE(PCI_VENDOR_ID_NETRONOME,
> +			       PCI_DEVICE_ID_NFP4000_PF_NIC)

I have seen nfp documentation updated with this new device, and I
believe it also worth updating release notes to mention new device
support (doc/guides/rel_notes/release_17_11.rst)

Also supported nics web page (http://dpdk.org/doc/nics), needs updating
(http://dpdk.org/browse/tools/dpdk-web/)

> +	},
> +	{
> +		RTE_PCI_DEVICE(PCI_VENDOR_ID_NETRONOME,
>  			       PCI_DEVICE_ID_NFP6000_PF_NIC)
<...>
  
Alejandro Lucero Aug. 31, 2017, 9:08 a.m. UTC | #2
On Mon, Aug 28, 2017 at 5:43 PM, Ferruh Yigit <ferruh.yigit@intel.com>
wrote:

> On 8/24/2017 5:20 PM, Alejandro Lucero wrote:
> > A NFP PF PCI devices can have PCI ID 4000 or 6000.
> >
> > Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
>
> <...>
>
> > @@ -2682,6 +2682,10 @@ static int nfp_pf_pci_probe(struct rte_pci_driver
> *pci_drv __rte_unused,
> >  static const struct rte_pci_id pci_id_nfp_pf_net_map[] = {
> >       {
> >               RTE_PCI_DEVICE(PCI_VENDOR_ID_NETRONOME,
> > +                            PCI_DEVICE_ID_NFP4000_PF_NIC)
>
> I have seen nfp documentation updated with this new device, and I
> believe it also worth updating release notes to mention new device
> support (doc/guides/rel_notes/release_17_11.rst)
>
>
Yes, I agree. I should add this as well.


> Also supported nics web page (http://dpdk.org/doc/nics), needs updating
> (http://dpdk.org/browse/tools/dpdk-web/)
>
>
Not sure about this one. I could not find any file in the repo for changing
this. How should I manage it?


> > +     },
> > +     {
> > +             RTE_PCI_DEVICE(PCI_VENDOR_ID_NETRONOME,
> >                              PCI_DEVICE_ID_NFP6000_PF_NIC)
> <...>
>
>
  
Ferruh Yigit Aug. 31, 2017, 9:13 a.m. UTC | #3
On 8/31/2017 10:08 AM, Alejandro Lucero wrote:
> 
> 
> On Mon, Aug 28, 2017 at 5:43 PM, Ferruh Yigit <ferruh.yigit@intel.com
> <mailto:ferruh.yigit@intel.com>> wrote:
> 
>     On 8/24/2017 5:20 PM, Alejandro Lucero wrote:
>     > A NFP PF PCI devices can have PCI ID 4000 or 6000.
>     >
>     > Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com <mailto:alejandro.lucero@netronome.com>>
> 
>     <...>
> 
>     > @@ -2682,6 +2682,10 @@ static int nfp_pf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
>     >  static const struct rte_pci_id pci_id_nfp_pf_net_map[] = {
>     >       {
>     >               RTE_PCI_DEVICE(PCI_VENDOR_ID_NETRONOME,
>     > +                            PCI_DEVICE_ID_NFP4000_PF_NIC)
> 
>     I have seen nfp documentation updated with this new device, and I
>     believe it also worth updating release notes to mention new device
>     support (doc/guides/rel_notes/release_17_11.rst)
> 
> 
> Yes, I agree. I should add this as well.
>  
> 
>     Also supported nics web page (http://dpdk.org/doc/nics), needs updating
>     (http://dpdk.org/browse/tools/dpdk-web/
>     <http://dpdk.org/browse/tools/dpdk-web/>)
> 
> 
> Not sure about this one. I could not find any file in the repo for
> changing this. How should I manage it?

Please check [1], currently it lists NFP-6xxx only.

[1]
http://dpdk.org/browse/tools/dpdk-web/tree/doc/nics.html#n93

>  
> 
>     > +     },
>     > +     {
>     > +             RTE_PCI_DEVICE(PCI_VENDOR_ID_NETRONOME,
>     >                              PCI_DEVICE_ID_NFP6000_PF_NIC)
>     <...>
> 
>
  
Alejandro Lucero Aug. 31, 2017, 9:24 a.m. UTC | #4
On Thu, Aug 31, 2017 at 10:13 AM, Ferruh Yigit <ferruh.yigit@intel.com>
wrote:

> On 8/31/2017 10:08 AM, Alejandro Lucero wrote:
> >
> >
> > On Mon, Aug 28, 2017 at 5:43 PM, Ferruh Yigit <ferruh.yigit@intel.com
> > <mailto:ferruh.yigit@intel.com>> wrote:
> >
> >     On 8/24/2017 5:20 PM, Alejandro Lucero wrote:
> >     > A NFP PF PCI devices can have PCI ID 4000 or 6000.
> >     >
> >     > Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com
> <mailto:alejandro.lucero@netronome.com>>
> >
> >     <...>
> >
> >     > @@ -2682,6 +2682,10 @@ static int nfp_pf_pci_probe(struct
> rte_pci_driver *pci_drv __rte_unused,
> >     >  static const struct rte_pci_id pci_id_nfp_pf_net_map[] = {
> >     >       {
> >     >               RTE_PCI_DEVICE(PCI_VENDOR_ID_NETRONOME,
> >     > +                            PCI_DEVICE_ID_NFP4000_PF_NIC)
> >
> >     I have seen nfp documentation updated with this new device, and I
> >     believe it also worth updating release notes to mention new device
> >     support (doc/guides/rel_notes/release_17_11.rst)
> >
> >
> > Yes, I agree. I should add this as well.
> >
> >
> >     Also supported nics web page (http://dpdk.org/doc/nics), needs
> updating
> >     (http://dpdk.org/browse/tools/dpdk-web/
> >     <http://dpdk.org/browse/tools/dpdk-web/>)
> >
> >
> > Not sure about this one. I could not find any file in the repo for
> > changing this. How should I manage it?
>
> Please check [1], currently it lists NFP-6xxx only.
>
> [1]
> http://dpdk.org/browse/tools/dpdk-web/tree/doc/nics.html#n93
>
>
I did not realize there is a repo for this.

Thanks


> >
> >
> >     > +     },
> >     > +     {
> >     > +             RTE_PCI_DEVICE(PCI_VENDOR_ID_NETRONOME,
> >     >                              PCI_DEVICE_ID_NFP6000_PF_NIC)
> >     <...>
> >
> >
>
>
  

Patch

diff --git a/drivers/net/nfp/nfp_net.c b/drivers/net/nfp/nfp_net.c
index e2fe83a..1890a4a 100644
--- a/drivers/net/nfp/nfp_net.c
+++ b/drivers/net/nfp/nfp_net.c
@@ -2682,6 +2682,10 @@  static int nfp_pf_pci_probe(struct rte_pci_driver *pci_drv __rte_unused,
 static const struct rte_pci_id pci_id_nfp_pf_net_map[] = {
 	{
 		RTE_PCI_DEVICE(PCI_VENDOR_ID_NETRONOME,
+			       PCI_DEVICE_ID_NFP4000_PF_NIC)
+	},
+	{
+		RTE_PCI_DEVICE(PCI_VENDOR_ID_NETRONOME,
 			       PCI_DEVICE_ID_NFP6000_PF_NIC)
 	},
 	{
diff --git a/drivers/net/nfp/nfp_net_pmd.h b/drivers/net/nfp/nfp_net_pmd.h
index c6bddaa..3818130 100644
--- a/drivers/net/nfp/nfp_net_pmd.h
+++ b/drivers/net/nfp/nfp_net_pmd.h
@@ -42,6 +42,7 @@ 
 
 #define NFP_NET_PMD_VERSION "0.1"
 #define PCI_VENDOR_ID_NETRONOME         0x19ee
+#define PCI_DEVICE_ID_NFP4000_PF_NIC    0x4000
 #define PCI_DEVICE_ID_NFP6000_PF_NIC    0x6000
 #define PCI_DEVICE_ID_NFP6000_VF_NIC    0x6003