[dpdk-dev,3/6] qede: add QLogic PCI ids

Message ID 1455982831-21682-4-git-send-email-harish.patil@qlogic.com (mailing list archive)
State Changes Requested, archived
Delegated to: Bruce Richardson
Headers

Commit Message

Harish Patil Feb. 20, 2016, 3:40 p.m. UTC
  Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Signed-off-by: Rasesh Mody <rasesh.mody@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
---
 lib/librte_eal/common/include/rte_pci_dev_ids.h | 44 +++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
  

Comments

Stephen Hemminger Feb. 21, 2016, 1:17 a.m. UTC | #1
On Sat, 20 Feb 2016 07:40:28 -0800
Harish Patil <harish.patil@qlogic.com> wrote:

> diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h b/lib/librte_eal/common/include/rte_pci_dev_ids.h
> index d088191..0c1a3fe 100644
> --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h
> +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h
> @@ -152,6 +152,14 @@
>  #define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev)
>  #endif
>  
> +#ifndef RTE_PCI_DEV_ID_DECL_QEDE
> +#define RTE_PCI_DEV_ID_DECL_QEDE(vend, dev)
> +#endif
> +
> +#ifndef RTE_PCI_DEV_ID_DECL_QEDEVF
> +#define RTE_PCI_DEV_ID_DECL_QEDEVF(vend, dev)
> +#endif
> +
>  #ifndef PCI_VENDOR_ID_INTEL
>  /** Vendor ID used by Intel devices */
>  #define PCI_VENDOR_ID_INTEL 0x8086
> @@ -177,6 +185,11 @@
>  #define PCI_VENDOR_ID_BROADCOM 0x14E4
>  #endif
>  
> +#ifndef PCI_VENDOR_ID_QLOGIC
> +/** Vendor ID used by QLogic devices */
> +#define PCI_VENDOR_ID_QLOGIC 0x1077
> +#endif
> +

The goal is get away from having every PCI id for every device
stuffed into rte_pci_dev_ids.h. So it would be good not to add
more now.
  
Harish Patil Feb. 22, 2016, 11:23 p.m. UTC | #2
>


>On Sat, 20 Feb 2016 07:40:28 -0800

>Harish Patil <harish.patil@qlogic.com> wrote:

>

>> diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h

>>b/lib/librte_eal/common/include/rte_pci_dev_ids.h

>> index d088191..0c1a3fe 100644

>> --- a/lib/librte_eal/common/include/rte_pci_dev_ids.h

>> +++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h

>> @@ -152,6 +152,14 @@

>>  #define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev)

>>  #endif

>>

>> +#ifndef RTE_PCI_DEV_ID_DECL_QEDE

>> +#define RTE_PCI_DEV_ID_DECL_QEDE(vend, dev)

>> +#endif

>> +

>> +#ifndef RTE_PCI_DEV_ID_DECL_QEDEVF

>> +#define RTE_PCI_DEV_ID_DECL_QEDEVF(vend, dev)

>> +#endif

>> +

>>  #ifndef PCI_VENDOR_ID_INTEL

>>  /** Vendor ID used by Intel devices */

>>  #define PCI_VENDOR_ID_INTEL 0x8086

>> @@ -177,6 +185,11 @@

>>  #define PCI_VENDOR_ID_BROADCOM 0x14E4

>>  #endif

>>

>> +#ifndef PCI_VENDOR_ID_QLOGIC

>> +/** Vendor ID used by QLogic devices */

>> +#define PCI_VENDOR_ID_QLOGIC 0x1077

>> +#endif

>> +

>

>The goal is get away from having every PCI id for every device

>stuffed into rte_pci_dev_ids.h. So it would be good not to add

>more now.

>


Okay, I shall make the PCI ids local to this driver.

Thanks,
Harish


________________________________

This message and any attached documents contain information from the sending company or its parent company(s), subsidiaries, divisions or branch offices that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.
  

Patch

diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h b/lib/librte_eal/common/include/rte_pci_dev_ids.h
index d088191..0c1a3fe 100644
--- a/lib/librte_eal/common/include/rte_pci_dev_ids.h
+++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h
@@ -152,6 +152,14 @@ 
 #define RTE_PCI_DEV_ID_DECL_BNX2XVF(vend, dev)
 #endif
 
+#ifndef RTE_PCI_DEV_ID_DECL_QEDE
+#define RTE_PCI_DEV_ID_DECL_QEDE(vend, dev)
+#endif
+
+#ifndef RTE_PCI_DEV_ID_DECL_QEDEVF
+#define RTE_PCI_DEV_ID_DECL_QEDEVF(vend, dev)
+#endif
+
 #ifndef PCI_VENDOR_ID_INTEL
 /** Vendor ID used by Intel devices */
 #define PCI_VENDOR_ID_INTEL 0x8086
@@ -177,6 +185,11 @@ 
 #define PCI_VENDOR_ID_BROADCOM 0x14E4
 #endif
 
+#ifndef PCI_VENDOR_ID_QLOGIC
+/** Vendor ID used by QLogic devices */
+#define PCI_VENDOR_ID_QLOGIC 0x1077
+#endif
+
 /******************** Physical EM devices from e1000_hw.h ********************/
 
 #define E1000_DEV_ID_82542                    0x1000
@@ -651,6 +664,35 @@  RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57811_MF)
 RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_MF)
 #endif
 
+/****************** QLogic 25G/40G devices  ******************/
+#define CHIP_NUM_57980E                 0x1634
+#define CHIP_NUM_57980S                 0x1629
+#define CHIP_NUM_VF                     0x1630
+#define CHIP_NUM_57980S_40              0x1634
+#define CHIP_NUM_57980S_VF              0x1637 /* will change to 1664 */
+#define CHIP_NUM_57980S_25              0x1656
+#define CHIP_NUM_57980S_IOV             0x1664
+#define CHIP_NUM_AH                     0x8070
+
+#ifndef PCI_DEVICE_ID_NX2_57980E
+#define PCI_DEVICE_ID_NX2_57980E        CHIP_NUM_57980E
+#define PCI_DEVICE_ID_NX2_57980S        CHIP_NUM_57980S
+#define PCI_DEVICE_ID_NX2_VF            CHIP_NUM_VF
+#define PCI_DEVICE_ID_57980S_40         CHIP_NUM_57980S_40
+#define PCI_DEVICE_ID_57980S_VF         CHIP_NUM_57980S_VF
+#define PCI_DEVICE_ID_57980S_25         CHIP_NUM_57980S_25
+#define PCI_DEVICE_ID_57980S_IOV        CHIP_NUM_57980S_IOV
+#define PCI_DEVICE_ID_AH                CHIP_NUM_AH
+#endif
+
+RTE_PCI_DEV_ID_DECL_QEDE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_NX2_57980E)
+RTE_PCI_DEV_ID_DECL_QEDE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_NX2_57980S)
+RTE_PCI_DEV_ID_DECL_QEDE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_57980S_40)
+RTE_PCI_DEV_ID_DECL_QEDE(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_57980S_25)
+RTE_PCI_DEV_ID_DECL_QEDEVF(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_NX2_VF)
+RTE_PCI_DEV_ID_DECL_QEDEVF(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_57980S_VF)
+RTE_PCI_DEV_ID_DECL_QEDEVF(PCI_VENDOR_ID_QLOGIC, PCI_DEVICE_ID_57980S_IOV)
+
 /*
  * Undef all RTE_PCI_DEV_ID_DECL_* here.
  */
@@ -667,3 +709,5 @@  RTE_PCI_DEV_ID_DECL_BNX2X(PCI_VENDOR_ID_BROADCOM, BNX2X_DEV_ID_57840_MF)
 #undef RTE_PCI_DEV_ID_DECL_VMXNET3
 #undef RTE_PCI_DEV_ID_DECL_FM10K
 #undef RTE_PCI_DEV_ID_DECL_FM10KVF
+#undef RTE_PCI_DEV_ID_DECL_QEDE
+#undef RTE_PCI_DEV_ID_DECL_QEDEVF