DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/3] remove rte_pci_dev_ids.h
@ 2016-08-05 14:09 Ferruh Yigit
  2016-08-05 14:09 ` [dpdk-dev] [PATCH 1/3] net/ixgbe: move PCI device ids to the driver Ferruh Yigit
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Ferruh Yigit @ 2016-08-05 14:09 UTC (permalink / raw)
  To: dev
  Cc: David Marchand, Helin Zhang, Konstantin Ananyev, Wenzhuo Lu,
	Thomas Monjalon

This patchset moves remaining PCI device ids for ixgbe and igb drivers,
updates KNI code which uses these ids to use pci_device_ids from kni/ethtool
drivers,
and finally removes the rte_pci_dev_ids.h and updates document refers it.

Ferruh Yigit (3):
  net/ixgbe: move PCI device ids to the driver
  net/igb: move PCI device ids to the driver
  eal: remove rte_pci_dev_ids.h

 doc/guides/prog_guide/dev_kit_build_system.rst     |  28 +-
 drivers/net/e1000/igb_ethdev.c                     |  55 +++-
 drivers/net/ixgbe/ixgbe_ethdev.c                   |  79 ++++-
 lib/librte_eal/common/Makefile                     |   2 +-
 lib/librte_eal/common/include/rte_pci_dev_ids.h    | 326 ---------------------
 lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c |   2 +-
 lib/librte_eal/linuxapp/kni/kni_misc.c             |  33 +--
 7 files changed, 139 insertions(+), 386 deletions(-)
 delete mode 100644 lib/librte_eal/common/include/rte_pci_dev_ids.h

-- 
2.7.4

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

* [dpdk-dev] [PATCH 1/3] net/ixgbe: move PCI device ids to the driver
  2016-08-05 14:09 [dpdk-dev] [PATCH 0/3] remove rte_pci_dev_ids.h Ferruh Yigit
@ 2016-08-05 14:09 ` Ferruh Yigit
  2016-08-08  6:36   ` David Marchand
  2016-08-05 14:09 ` [dpdk-dev] [PATCH 2/3] net/igb: " Ferruh Yigit
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 11+ messages in thread
From: Ferruh Yigit @ 2016-08-05 14:09 UTC (permalink / raw)
  To: dev
  Cc: David Marchand, Helin Zhang, Konstantin Ananyev, Wenzhuo Lu,
	Thomas Monjalon

PCI device ids moved from common header into ixgbe driver itself.

KNI starts using pci_device_id from kni/ethtool/ixgbe driver, this is
only for KNI ethtool support, KNI data path is not effected.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.c                |  79 ++++++++++--
 lib/librte_eal/common/include/rte_pci_dev_ids.h | 156 ------------------------
 lib/librte_eal/linuxapp/kni/kni_misc.c          |  17 ++-
 3 files changed, 76 insertions(+), 176 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
index d478a15..fb618ef 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.c
+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
@@ -429,23 +429,80 @@ static int ixgbe_dev_udp_tunnel_port_del(struct rte_eth_dev *dev,
  * The set of PCI devices this driver supports
  */
 static const struct rte_pci_id pci_id_ixgbe_map[] = {
-
-#define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) {RTE_PCI_DEVICE(vend, dev)},
-#include "rte_pci_dev_ids.h"
-
-{ .vendor_id = 0, /* sentinel */ },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_BX) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_DUAL_PORT) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_SINGLE_PORT) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AT) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AT2) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_SFP_LOM) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_CX4) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_CX4_DUAL_PORT) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_DA_DUAL_PORT) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_XF_LR) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_KX4) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_KX4_MEZZ) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_KR) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_COMBO_BACKPLANE) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_SUBDEV_ID_82599_KX4_KR_MEZZ) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_CX4) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_SUBDEV_ID_82599_SFP) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_SUBDEV_ID_82599_RNDC) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_SUBDEV_ID_82599_560FLR) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_SUBDEV_ID_82599_ECNA_DP) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_BACKPLANE_FCOE) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_FCOE) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_EM) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_SF2) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_SF_QP) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_QSFP_SF_QP) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599EN_SFP) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_XAUI_LOM) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_T3_LOM) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_LS) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T1) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_SFP) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_10G_T) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_1G_T) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550T) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550T1) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_KR) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_KR_L) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SFP_N) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SGMII) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SGMII_L) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_10G_T) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_QSFP) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_QSFP_N) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SFP) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_1G_T) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_1G_T_L) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_KX4) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_KR) },
+#ifdef RTE_NIC_BYPASS
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_BYPASS) },
+#endif
+	{ .vendor_id = 0, /* sentinel */ },
 };
 
-
 /*
  * The set of PCI devices this driver supports (for 82599 VF)
  */
 static const struct rte_pci_id pci_id_ixgbevf_map[] = {
-
-#define RTE_PCI_DEV_ID_DECL_IXGBEVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)},
-#include "rte_pci_dev_ids.h"
-{ .vendor_id = 0, /* sentinel */ },
-
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_VF) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_VF_HV) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540_VF) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540_VF_HV) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550_VF_HV) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550_VF) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_VF) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_VF_HV) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_VF) },
+	{ RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_VF_HV) },
+	{ .vendor_id = 0, /* sentinel */ },
 };
 
 static const struct rte_eth_desc_lim rx_desc_lim = {
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 6ec8ae8..1f9d372 100644
--- a/lib/librte_eal/common/include/rte_pci_dev_ids.h
+++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h
@@ -65,14 +65,6 @@
 #define RTE_PCI_DEV_ID_DECL_IGBVF(vend, dev)
 #endif
 
-#ifndef RTE_PCI_DEV_ID_DECL_IXGBE
-#define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev)
-#endif
-
-#ifndef RTE_PCI_DEV_ID_DECL_IXGBEVF
-#define RTE_PCI_DEV_ID_DECL_IXGBEVF(vend, dev)
-#endif
-
 #ifndef PCI_VENDOR_ID_INTEL
 /** Vendor ID used by Intel devices */
 #define PCI_VENDOR_ID_INTEL 0x8086
@@ -159,128 +151,6 @@ RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_SERDES)
 RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_BACKPLANE)
 RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_SFP)
 
-/****************** Physical IXGBE devices from ixgbe_type.h ******************/
-
-#define IXGBE_DEV_ID_82598                      0x10B6
-#define IXGBE_DEV_ID_82598_BX                   0x1508
-#define IXGBE_DEV_ID_82598AF_DUAL_PORT          0x10C6
-#define IXGBE_DEV_ID_82598AF_SINGLE_PORT        0x10C7
-#define IXGBE_DEV_ID_82598AT                    0x10C8
-#define IXGBE_DEV_ID_82598AT2                   0x150B
-#define IXGBE_DEV_ID_82598EB_SFP_LOM            0x10DB
-#define IXGBE_DEV_ID_82598EB_CX4                0x10DD
-#define IXGBE_DEV_ID_82598_CX4_DUAL_PORT        0x10EC
-#define IXGBE_DEV_ID_82598_DA_DUAL_PORT         0x10F1
-#define IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM      0x10E1
-#define IXGBE_DEV_ID_82598EB_XF_LR              0x10F4
-#define IXGBE_DEV_ID_82599_KX4                  0x10F7
-#define IXGBE_DEV_ID_82599_KX4_MEZZ             0x1514
-#define IXGBE_DEV_ID_82599_KR                   0x1517
-#define IXGBE_DEV_ID_82599_COMBO_BACKPLANE      0x10F8
-#define IXGBE_SUBDEV_ID_82599_KX4_KR_MEZZ       0x000C
-#define IXGBE_DEV_ID_82599_CX4                  0x10F9
-#define IXGBE_DEV_ID_82599_SFP                  0x10FB
-#define IXGBE_SUBDEV_ID_82599_SFP               0x11A9
-#define IXGBE_SUBDEV_ID_82599_RNDC              0x1F72
-#define IXGBE_SUBDEV_ID_82599_560FLR            0x17D0
-#define IXGBE_SUBDEV_ID_82599_ECNA_DP           0x0470
-#define IXGBE_DEV_ID_82599_BACKPLANE_FCOE       0x152A
-#define IXGBE_DEV_ID_82599_SFP_FCOE             0x1529
-#define IXGBE_DEV_ID_82599_SFP_EM               0x1507
-#define IXGBE_DEV_ID_82599_SFP_SF2              0x154D
-#define IXGBE_DEV_ID_82599_SFP_SF_QP            0x154A
-#define IXGBE_DEV_ID_82599_QSFP_SF_QP           0x1558
-#define IXGBE_DEV_ID_82599EN_SFP                0x1557
-#define IXGBE_DEV_ID_82599_XAUI_LOM             0x10FC
-#define IXGBE_DEV_ID_82599_T3_LOM               0x151C
-#define IXGBE_DEV_ID_82599_LS                   0x154F
-#define IXGBE_DEV_ID_X540T                      0x1528
-#define IXGBE_DEV_ID_X540T1                     0x1560
-#define IXGBE_DEV_ID_X550EM_X_SFP               0x15AC
-#define IXGBE_DEV_ID_X550EM_X_10G_T             0x15AD
-#define IXGBE_DEV_ID_X550EM_X_1G_T              0x15AE
-#define IXGBE_DEV_ID_X550T                      0x1563
-#define IXGBE_DEV_ID_X550T1                     0x15D1
-#define IXGBE_DEV_ID_X550EM_A_KR                0x15C2
-#define IXGBE_DEV_ID_X550EM_A_KR_L              0x15C3
-#define IXGBE_DEV_ID_X550EM_A_SFP_N             0x15C4
-#define IXGBE_DEV_ID_X550EM_A_SGMII             0x15C6
-#define IXGBE_DEV_ID_X550EM_A_SGMII_L           0x15C7
-#define IXGBE_DEV_ID_X550EM_A_10G_T             0x15C8
-#define IXGBE_DEV_ID_X550EM_A_QSFP              0x15CA
-#define IXGBE_DEV_ID_X550EM_A_QSFP_N            0x15CC
-#define IXGBE_DEV_ID_X550EM_A_SFP               0x15CE
-#define IXGBE_DEV_ID_X550EM_A_1G_T              0x15E4
-#define IXGBE_DEV_ID_X550EM_A_1G_T_L            0x15E5
-#define IXGBE_DEV_ID_X550EM_X_KX4               0x15AA
-#define IXGBE_DEV_ID_X550EM_X_KR                0x15AB
-
-#ifdef RTE_NIC_BYPASS
-#define IXGBE_DEV_ID_82599_BYPASS               0x155D
-#endif
-
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598_BX)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598AF_DUAL_PORT)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, \
-	IXGBE_DEV_ID_82598AF_SINGLE_PORT)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598AT)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598AT2)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598EB_SFP_LOM)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598EB_CX4)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598_CX4_DUAL_PORT)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598_DA_DUAL_PORT)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, \
-	IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598EB_XF_LR)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_KX4)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_KX4_MEZZ)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_KR)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, \
-	IXGBE_DEV_ID_82599_COMBO_BACKPLANE)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, \
-	IXGBE_SUBDEV_ID_82599_KX4_KR_MEZZ)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_CX4)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_SFP)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_RNDC)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_560FLR)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_ECNA_DP)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_BACKPLANE_FCOE)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_FCOE)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_EM)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_SF2)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_SF_QP)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_QSFP_SF_QP)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599EN_SFP)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_XAUI_LOM)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_T3_LOM)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_LS)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540T)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540T1)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_SFP)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_10G_T)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_1G_T)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550T)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550T1)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_KR)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_KR_L)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_SFP_N)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_SGMII)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_SGMII_L)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_10G_T)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_QSFP)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_QSFP_N)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_SFP)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_1G_T)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_1G_T_L)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_KX4)
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_KR)
-
-#ifdef RTE_NIC_BYPASS
-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_BYPASS)
-#endif
-
 /****************** Virtual IGB devices from e1000_hw.h ******************/
 
 #define E1000_DEV_ID_82576_VF                   0x10CA
@@ -293,34 +163,8 @@ RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_VF_HV)
 RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_VF)
 RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_VF_HV)
 
-/****************** Virtual IXGBE devices from ixgbe_type.h ******************/
-
-#define IXGBE_DEV_ID_82599_VF                   0x10ED
-#define IXGBE_DEV_ID_82599_VF_HV                0x152E
-#define IXGBE_DEV_ID_X540_VF                    0x1515
-#define IXGBE_DEV_ID_X540_VF_HV                 0x1530
-#define IXGBE_DEV_ID_X550_VF_HV                 0x1564
-#define IXGBE_DEV_ID_X550_VF                    0x1565
-#define IXGBE_DEV_ID_X550EM_A_VF                0x15C5
-#define IXGBE_DEV_ID_X550EM_A_VF_HV             0x15B4
-#define IXGBE_DEV_ID_X550EM_X_VF                0x15A8
-#define IXGBE_DEV_ID_X550EM_X_VF_HV             0x15A9
-
-RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_VF)
-RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_VF_HV)
-RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540_VF)
-RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540_VF_HV)
-RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550_VF_HV)
-RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550_VF)
-RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_VF)
-RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_VF_HV)
-RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_VF)
-RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_VF_HV)
-
 /*
  * Undef all RTE_PCI_DEV_ID_DECL_* here.
  */
 #undef RTE_PCI_DEV_ID_DECL_IGB
 #undef RTE_PCI_DEV_ID_DECL_IGBVF
-#undef RTE_PCI_DEV_ID_DECL_IXGBE
-#undef RTE_PCI_DEV_ID_DECL_IXGBEVF
diff --git a/lib/librte_eal/linuxapp/kni/kni_misc.c b/lib/librte_eal/linuxapp/kni/kni_misc.c
index 59d15ca..66bf519 100644
--- a/lib/librte_eal/linuxapp/kni/kni_misc.c
+++ b/lib/librte_eal/linuxapp/kni/kni_misc.c
@@ -55,6 +55,7 @@ extern void kni_set_ethtool_ops(struct net_device *netdev);
 
 extern int ixgbe_kni_probe(struct pci_dev *pdev, struct net_device **lad_dev);
 extern void ixgbe_kni_remove(struct pci_dev *pdev);
+extern struct pci_device_id ixgbe_pci_tbl[];
 extern int igb_kni_probe(struct pci_dev *pdev, struct net_device **lad_dev);
 extern void igb_kni_remove(struct pci_dev *pdev);
 
@@ -353,15 +354,14 @@ kni_dev_remove(struct kni_dev *dev)
 	if (!dev)
 		return -ENODEV;
 
+	if (pci_match_id(ixgbe_pci_tbl, dev->pci_dev))
+		ixgbe_kni_remove(dev->pci_dev);
+
 	switch (dev->device_id) {
 	#define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) case (dev):
 	#include <rte_pci_dev_ids.h>
 		igb_kni_remove(dev->pci_dev);
 		break;
-	#define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) case (dev):
-	#include <rte_pci_dev_ids.h>
-		ixgbe_kni_remove(dev->pci_dev);
-		break;
 	default:
 		break;
 	}
@@ -510,16 +510,15 @@ kni_ioctl_create(struct net *net,
 			(PCI_SLOT(pci->devfn) == dev_info.devid) &&
 			(PCI_FUNC(pci->devfn) == dev_info.function)) {
 			found_pci = pci;
+
+			if (pci_match_id(ixgbe_pci_tbl, found_pci))
+				ret = ixgbe_kni_probe(found_pci, &lad_dev);
+
 			switch (dev_info.device_id) {
 			#define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) case (dev):
 			#include <rte_pci_dev_ids.h>
 				ret = igb_kni_probe(found_pci, &lad_dev);
 				break;
-			#define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) \
-							case (dev):
-			#include <rte_pci_dev_ids.h>
-				ret = ixgbe_kni_probe(found_pci, &lad_dev);
-				break;
 			default:
 				ret = -1;
 				break;
-- 
2.7.4

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

* [dpdk-dev] [PATCH 2/3] net/igb: move PCI device ids to the driver
  2016-08-05 14:09 [dpdk-dev] [PATCH 0/3] remove rte_pci_dev_ids.h Ferruh Yigit
  2016-08-05 14:09 ` [dpdk-dev] [PATCH 1/3] net/ixgbe: move PCI device ids to the driver Ferruh Yigit
@ 2016-08-05 14:09 ` Ferruh Yigit
  2016-08-05 14:09 ` [dpdk-dev] [PATCH 3/3] eal: remove rte_pci_dev_ids.h Ferruh Yigit
  2016-08-23 13:37 ` [dpdk-dev] [PATCH 0/3] " Thomas Monjalon
  3 siblings, 0 replies; 11+ messages in thread
From: Ferruh Yigit @ 2016-08-05 14:09 UTC (permalink / raw)
  To: dev
  Cc: David Marchand, Helin Zhang, Konstantin Ananyev, Wenzhuo Lu,
	Thomas Monjalon

PCI device ids moved from common header into igb driver itself.

KNI starts using pci_device_id from kni/ethtool/igb driver, this is only
for KNI ethtool support, KNI data path is not effected.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/e1000/igb_ethdev.c                     |  55 +++++++++--
 lib/librte_eal/common/include/rte_pci_dev_ids.h    | 107 ---------------------
 lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c |   2 +-
 lib/librte_eal/linuxapp/kni/kni_misc.c             |  20 +---
 4 files changed, 50 insertions(+), 134 deletions(-)

diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
index fbf4d09..4e9e6a3 100644
--- a/drivers/net/e1000/igb_ethdev.c
+++ b/drivers/net/e1000/igb_ethdev.c
@@ -306,22 +306,57 @@ static enum e1000_fc_mode igb_fc_setting = e1000_fc_full;
  * The set of PCI devices this driver supports
  */
 static const struct rte_pci_id pci_id_igb_map[] = {
-
-#define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) {RTE_PCI_DEVICE(vend, dev)},
-#include "rte_pci_dev_ids.h"
-
-{0},
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82576) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82576_FIBER) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82576_SERDES) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82576_QUAD_COPPER) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82576_QUAD_COPPER_ET2) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82576_NS) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82576_NS_SERDES) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82576_SERDES_QUAD) },
+
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82575EB_COPPER) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82575EB_FIBER_SERDES) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82575GB_QUAD_COPPER) },
+
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82580_COPPER) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82580_FIBER) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82580_SERDES) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82580_SGMII) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82580_COPPER_DUAL) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82580_QUAD_FIBER) },
+
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I350_COPPER) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I350_FIBER) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I350_SERDES) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I350_SGMII) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I350_DA4) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I210_COPPER) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I210_COPPER_OEM1) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I210_COPPER_IT) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I210_FIBER) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I210_SERDES) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I210_SGMII) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I211_COPPER) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I354_BACKPLANE_1GBPS) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I354_SGMII) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I354_BACKPLANE_2_5GBPS) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_DH89XXCC_SGMII) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_DH89XXCC_SERDES) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_DH89XXCC_BACKPLANE) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_DH89XXCC_SFP) },
+	{ .vendor_id = 0, /* sentinel */ },
 };
 
 /*
  * The set of PCI devices this driver supports (for 82576&I350 VF)
  */
 static const struct rte_pci_id pci_id_igbvf_map[] = {
-
-#define RTE_PCI_DEV_ID_DECL_IGBVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)},
-#include "rte_pci_dev_ids.h"
-
-{0},
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82576_VF) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82576_VF_HV) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I350_VF) },
+	{ RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I350_VF_HV) },
+	{ .vendor_id = 0, /* sentinel */ },
 };
 
 static const struct rte_eth_desc_lim rx_desc_lim = {
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 1f9d372..1aae6f7 100644
--- a/lib/librte_eal/common/include/rte_pci_dev_ids.h
+++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h
@@ -57,114 +57,7 @@
  *
  */
 
-#ifndef RTE_PCI_DEV_ID_DECL_IGB
-#define RTE_PCI_DEV_ID_DECL_IGB(vend, dev)
-#endif
-
-#ifndef RTE_PCI_DEV_ID_DECL_IGBVF
-#define RTE_PCI_DEV_ID_DECL_IGBVF(vend, dev)
-#endif
-
 #ifndef PCI_VENDOR_ID_INTEL
 /** Vendor ID used by Intel devices */
 #define PCI_VENDOR_ID_INTEL 0x8086
 #endif
-
-/******************** Physical IGB devices from e1000_hw.h ********************/
-
-#define E1000_DEV_ID_82576                      0x10C9
-#define E1000_DEV_ID_82576_FIBER                0x10E6
-#define E1000_DEV_ID_82576_SERDES               0x10E7
-#define E1000_DEV_ID_82576_QUAD_COPPER          0x10E8
-#define E1000_DEV_ID_82576_QUAD_COPPER_ET2      0x1526
-#define E1000_DEV_ID_82576_NS                   0x150A
-#define E1000_DEV_ID_82576_NS_SERDES            0x1518
-#define E1000_DEV_ID_82576_SERDES_QUAD          0x150D
-#define E1000_DEV_ID_82575EB_COPPER             0x10A7
-#define E1000_DEV_ID_82575EB_FIBER_SERDES       0x10A9
-#define E1000_DEV_ID_82575GB_QUAD_COPPER        0x10D6
-#define E1000_DEV_ID_82580_COPPER               0x150E
-#define E1000_DEV_ID_82580_FIBER                0x150F
-#define E1000_DEV_ID_82580_SERDES               0x1510
-#define E1000_DEV_ID_82580_SGMII                0x1511
-#define E1000_DEV_ID_82580_COPPER_DUAL          0x1516
-#define E1000_DEV_ID_82580_QUAD_FIBER           0x1527
-#define E1000_DEV_ID_I350_COPPER                0x1521
-#define E1000_DEV_ID_I350_FIBER                 0x1522
-#define E1000_DEV_ID_I350_SERDES                0x1523
-#define E1000_DEV_ID_I350_SGMII                 0x1524
-#define E1000_DEV_ID_I350_DA4                   0x1546
-#define E1000_DEV_ID_I210_COPPER                0x1533
-#define E1000_DEV_ID_I210_COPPER_OEM1           0x1534
-#define E1000_DEV_ID_I210_COPPER_IT             0x1535
-#define E1000_DEV_ID_I210_FIBER                 0x1536
-#define E1000_DEV_ID_I210_SERDES                0x1537
-#define E1000_DEV_ID_I210_SGMII                 0x1538
-#define E1000_DEV_ID_I210_COPPER_FLASHLESS      0x157B
-#define E1000_DEV_ID_I210_SERDES_FLASHLESS      0x157C
-#define E1000_DEV_ID_I211_COPPER                0x1539
-#define E1000_DEV_ID_I354_BACKPLANE_1GBPS       0x1F40
-#define E1000_DEV_ID_I354_SGMII                 0x1F41
-#define E1000_DEV_ID_I354_BACKPLANE_2_5GBPS     0x1F45
-#define E1000_DEV_ID_DH89XXCC_SGMII             0x0438
-#define E1000_DEV_ID_DH89XXCC_SERDES            0x043A
-#define E1000_DEV_ID_DH89XXCC_BACKPLANE         0x043C
-#define E1000_DEV_ID_DH89XXCC_SFP               0x0440
-
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_FIBER)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_SERDES)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_QUAD_COPPER)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_QUAD_COPPER_ET2)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_NS)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_NS_SERDES)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_SERDES_QUAD)
-
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82575EB_COPPER)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82575EB_FIBER_SERDES)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82575GB_QUAD_COPPER)
-
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_COPPER)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_FIBER)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_SERDES)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_SGMII)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_COPPER_DUAL)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_QUAD_FIBER)
-
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_COPPER)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_FIBER)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_SERDES)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_SGMII)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_DA4)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_COPPER)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_COPPER_OEM1)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_COPPER_IT)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_FIBER)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_SERDES)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_SGMII)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I211_COPPER)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I354_BACKPLANE_1GBPS)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I354_SGMII)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I354_BACKPLANE_2_5GBPS)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_SGMII)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_SERDES)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_BACKPLANE)
-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_SFP)
-
-/****************** Virtual IGB devices from e1000_hw.h ******************/
-
-#define E1000_DEV_ID_82576_VF                   0x10CA
-#define E1000_DEV_ID_82576_VF_HV                0x152D
-#define E1000_DEV_ID_I350_VF                    0x1520
-#define E1000_DEV_ID_I350_VF_HV                 0x152F
-
-RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_VF)
-RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_VF_HV)
-RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_VF)
-RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_VF_HV)
-
-/*
- * Undef all RTE_PCI_DEV_ID_DECL_* here.
- */
-#undef RTE_PCI_DEV_ID_DECL_IGB
-#undef RTE_PCI_DEV_ID_DECL_IGBVF
diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
index 96acec5..bd803c0 100644
--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
@@ -76,7 +76,7 @@ static const char igb_driver_string[] =
 static const char igb_copyright[] =
 				"Copyright (c) 2007-2013 Intel Corporation.";
 
-static DEFINE_PCI_DEVICE_TABLE(igb_pci_tbl) = {
+DEFINE_PCI_DEVICE_TABLE(igb_pci_tbl) = {
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I354_BACKPLANE_1GBPS) },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I354_SGMII) },
 	{ PCI_VDEVICE(INTEL, E1000_DEV_ID_I354_BACKPLANE_2_5GBPS) },
diff --git a/lib/librte_eal/linuxapp/kni/kni_misc.c b/lib/librte_eal/linuxapp/kni/kni_misc.c
index 66bf519..67e9b7d 100644
--- a/lib/librte_eal/linuxapp/kni/kni_misc.c
+++ b/lib/librte_eal/linuxapp/kni/kni_misc.c
@@ -58,6 +58,7 @@ extern void ixgbe_kni_remove(struct pci_dev *pdev);
 extern struct pci_device_id ixgbe_pci_tbl[];
 extern int igb_kni_probe(struct pci_dev *pdev, struct net_device **lad_dev);
 extern void igb_kni_remove(struct pci_dev *pdev);
+extern struct pci_device_id igb_pci_tbl[];
 
 static int kni_open(struct inode *inode, struct file *file);
 static int kni_release(struct inode *inode, struct file *file);
@@ -356,15 +357,8 @@ kni_dev_remove(struct kni_dev *dev)
 
 	if (pci_match_id(ixgbe_pci_tbl, dev->pci_dev))
 		ixgbe_kni_remove(dev->pci_dev);
-
-	switch (dev->device_id) {
-	#define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) case (dev):
-	#include <rte_pci_dev_ids.h>
+	else if (pci_match_id(igb_pci_tbl, dev->pci_dev))
 		igb_kni_remove(dev->pci_dev);
-		break;
-	default:
-		break;
-	}
 
 	if (dev->net_dev) {
 		unregister_netdev(dev->net_dev);
@@ -513,16 +507,10 @@ kni_ioctl_create(struct net *net,
 
 			if (pci_match_id(ixgbe_pci_tbl, found_pci))
 				ret = ixgbe_kni_probe(found_pci, &lad_dev);
-
-			switch (dev_info.device_id) {
-			#define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) case (dev):
-			#include <rte_pci_dev_ids.h>
+			else if (pci_match_id(igb_pci_tbl, found_pci))
 				ret = igb_kni_probe(found_pci, &lad_dev);
-				break;
-			default:
+			else
 				ret = -1;
-				break;
-			}
 
 			KNI_DBG("PCI found: pci=0x%p, lad_dev=0x%p\n",
 							pci, lad_dev);
-- 
2.7.4

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

* [dpdk-dev] [PATCH 3/3] eal: remove rte_pci_dev_ids.h
  2016-08-05 14:09 [dpdk-dev] [PATCH 0/3] remove rte_pci_dev_ids.h Ferruh Yigit
  2016-08-05 14:09 ` [dpdk-dev] [PATCH 1/3] net/ixgbe: move PCI device ids to the driver Ferruh Yigit
  2016-08-05 14:09 ` [dpdk-dev] [PATCH 2/3] net/igb: " Ferruh Yigit
@ 2016-08-05 14:09 ` Ferruh Yigit
  2016-08-06 12:55   ` Thomas Monjalon
  2016-08-23 13:37 ` [dpdk-dev] [PATCH 0/3] " Thomas Monjalon
  3 siblings, 1 reply; 11+ messages in thread
From: Ferruh Yigit @ 2016-08-05 14:09 UTC (permalink / raw)
  To: dev
  Cc: David Marchand, Helin Zhang, Konstantin Ananyev, Wenzhuo Lu,
	Thomas Monjalon

All PCI device ids moved to drivers, it is safe to delete
rte_pci_dev_ids.h

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 doc/guides/prog_guide/dev_kit_build_system.rst  | 28 +++++------
 lib/librte_eal/common/Makefile                  |  2 +-
 lib/librte_eal/common/include/rte_pci_dev_ids.h | 63 -------------------------
 3 files changed, 15 insertions(+), 78 deletions(-)
 delete mode 100644 lib/librte_eal/common/include/rte_pci_dev_ids.h

diff --git a/doc/guides/prog_guide/dev_kit_build_system.rst b/doc/guides/prog_guide/dev_kit_build_system.rst
index fa2411f..e657e5f 100644
--- a/doc/guides/prog_guide/dev_kit_build_system.rst
+++ b/doc/guides/prog_guide/dev_kit_build_system.rst
@@ -93,20 +93,20 @@ Each build directory contains include files, libraries, and applications:
     cmdline_cirbuf.h           rte_cycles.h         rte_memory.h
     cmdline.h                  rte_debug.h          rte_mempool.h
     cmdline_parse_etheraddr.h  rte_eal.h            rte_memzone.h
-    cmdline_parse.h            rte_errno.h          rte_pci_dev_ids.h
-    cmdline_parse_ipaddr.h     rte_ethdev.h         rte_pci.h
-    cmdline_parse_num.h        rte_ether.h          rte_per_lcore.h
-    cmdline_parse_portlist.h   rte_fbk_hash.h       rte_prefetch.h
-    cmdline_parse_string.h     rte_hash_crc.h       rte_random.h
-    cmdline_rdline.h           rte_hash.h           rte_ring.h
-    cmdline_socket.h           rte_interrupts.h     rte_rwlock.h
-    cmdline_vt100.h            rte_ip.h             rte_sctp.h
-    exec-env                   rte_jhash.h          rte_spinlock.h
-    rte_alarm.h                rte_launch.h         rte_string_fns.h
-    rte_atomic.h               rte_lcore.h          rte_tailq.h
-    rte_branch_prediction.h    rte_log.h            rte_tcp.h
-    rte_byteorder.h            rte_lpm.h            rte_timer.h
-    rte_common.h               rte_malloc.h         rte_udp.h
+    cmdline_parse.h            rte_errno.h          rte_pci.h
+    cmdline_parse_ipaddr.h     rte_ethdev.h         rte_per_lcore.h
+    cmdline_parse_num.h        rte_ether.h          rte_prefetch.h
+    cmdline_parse_portlist.h   rte_fbk_hash.h       rte_random.h
+    cmdline_parse_string.h     rte_hash_crc.h       rte_ring.h
+    cmdline_rdline.h           rte_hash.h           rte_rwlock.h
+    cmdline_socket.h           rte_interrupts.h     rte_sctp.h
+    cmdline_vt100.h            rte_ip.h             rte_spinlock.h
+    exec-env                   rte_jhash.h          rte_string_fns.h
+    rte_alarm.h                rte_launch.h         rte_tailq.h
+    rte_atomic.h               rte_lcore.h          rte_tcp.h
+    rte_branch_prediction.h    rte_log.h            rte_timer.h
+    rte_byteorder.h            rte_lpm.h            rte_udp.h
+    rte_common.h               rte_malloc.h
     rte_config.h               rte_mbuf.h
 
 
diff --git a/lib/librte_eal/common/Makefile b/lib/librte_eal/common/Makefile
index f5ea0ee..bb9810d 100644
--- a/lib/librte_eal/common/Makefile
+++ b/lib/librte_eal/common/Makefile
@@ -34,7 +34,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
 INC := rte_branch_prediction.h rte_common.h
 INC += rte_debug.h rte_eal.h rte_errno.h rte_launch.h rte_lcore.h
 INC += rte_log.h rte_memory.h rte_memzone.h rte_pci.h
-INC += rte_pci_dev_ids.h rte_per_lcore.h rte_random.h
+INC += rte_per_lcore.h rte_random.h
 INC += rte_tailq.h rte_interrupts.h rte_alarm.h
 INC += rte_string_fns.h rte_version.h
 INC += rte_eal_memconfig.h rte_malloc_heap.h
diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h b/lib/librte_eal/common/include/rte_pci_dev_ids.h
deleted file mode 100644
index 1aae6f7..0000000
--- a/lib/librte_eal/common/include/rte_pci_dev_ids.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/*-
- * This file is provided under a dual BSD/GPLv2 license.  When using or
- *   redistributing this file, you may do so under either license.
- *
- *   GPL LICENSE SUMMARY
- *
- *   Copyright(c) 2010-2015 Intel Corporation. All rights reserved.
- *
- *   This program is free software; you can redistribute it and/or modify
- *   it under the terms of version 2 of the GNU General Public License as
- *   published by the Free Software Foundation.
- *
- *   This program is distributed in the hope that it will be useful, but
- *   WITHOUT ANY WARRANTY; without even the implied warranty of
- *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
- *   General Public License for more details.
- *
- *   You should have received a copy of the GNU General Public License
- *   along with this program; if not, write to the Free Software
- *   Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA.
- *   The full GNU General Public License is included in this distribution
- *   in the file called LICENSE.GPL.
- *
- *   Contact Information:
- *   Intel Corporation
- *
- *   BSD LICENSE
- *
- *   Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
- *   All rights reserved.
- *
- *   Redistribution and use in source and binary forms, with or without
- *   modification, are permitted provided that the following conditions
- *   are met:
- *
- *     * Redistributions of source code must retain the above copyright
- *       notice, this list of conditions and the following disclaimer.
- *     * Redistributions in binary form must reproduce the above copyright
- *       notice, this list of conditions and the following disclaimer in
- *       the documentation and/or other materials provided with the
- *       distribution.
- *     * Neither the name of Intel Corporation nor the names of its
- *       contributors may be used to endorse or promote products derived
- *       from this software without specific prior written permission.
- *
- *   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- *   "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- *   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- *   A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- *   OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- *   SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- *   LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- *   DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- *   THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- *   (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- *   OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- */
-
-#ifndef PCI_VENDOR_ID_INTEL
-/** Vendor ID used by Intel devices */
-#define PCI_VENDOR_ID_INTEL 0x8086
-#endif
-- 
2.7.4

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

* Re: [dpdk-dev] [PATCH 3/3] eal: remove rte_pci_dev_ids.h
  2016-08-05 14:09 ` [dpdk-dev] [PATCH 3/3] eal: remove rte_pci_dev_ids.h Ferruh Yigit
@ 2016-08-06 12:55   ` Thomas Monjalon
  2016-08-08  6:20     ` David Marchand
  0 siblings, 1 reply; 11+ messages in thread
From: Thomas Monjalon @ 2016-08-06 12:55 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: dev, David Marchand, Helin Zhang, Konstantin Ananyev, Wenzhuo Lu

2016-08-05 15:09, Ferruh Yigit:
> All PCI device ids moved to drivers, it is safe to delete
> rte_pci_dev_ids.h

Good move. Thanks Ferruh!

> --- a/doc/guides/prog_guide/dev_kit_build_system.rst
> +++ b/doc/guides/prog_guide/dev_kit_build_system.rst
> @@ -93,20 +93,20 @@ Each build directory contains include files, libraries, and applications:
>      cmdline_cirbuf.h           rte_cycles.h         rte_memory.h
>      cmdline.h                  rte_debug.h          rte_mempool.h
>      cmdline_parse_etheraddr.h  rte_eal.h            rte_memzone.h
> -    cmdline_parse.h            rte_errno.h          rte_pci_dev_ids.h
> -    cmdline_parse_ipaddr.h     rte_ethdev.h         rte_pci.h
> -    cmdline_parse_num.h        rte_ether.h          rte_per_lcore.h
> -    cmdline_parse_portlist.h   rte_fbk_hash.h       rte_prefetch.h
> -    cmdline_parse_string.h     rte_hash_crc.h       rte_random.h
> -    cmdline_rdline.h           rte_hash.h           rte_ring.h
> -    cmdline_socket.h           rte_interrupts.h     rte_rwlock.h
> -    cmdline_vt100.h            rte_ip.h             rte_sctp.h
> -    exec-env                   rte_jhash.h          rte_spinlock.h
> -    rte_alarm.h                rte_launch.h         rte_string_fns.h
> -    rte_atomic.h               rte_lcore.h          rte_tailq.h
> -    rte_branch_prediction.h    rte_log.h            rte_tcp.h
> -    rte_byteorder.h            rte_lpm.h            rte_timer.h
> -    rte_common.h               rte_malloc.h         rte_udp.h
> +    cmdline_parse.h            rte_errno.h          rte_pci.h
> +    cmdline_parse_ipaddr.h     rte_ethdev.h         rte_per_lcore.h
> +    cmdline_parse_num.h        rte_ether.h          rte_prefetch.h
> +    cmdline_parse_portlist.h   rte_fbk_hash.h       rte_random.h
> +    cmdline_parse_string.h     rte_hash_crc.h       rte_ring.h
> +    cmdline_rdline.h           rte_hash.h           rte_rwlock.h
> +    cmdline_socket.h           rte_interrupts.h     rte_sctp.h
> +    cmdline_vt100.h            rte_ip.h             rte_spinlock.h
> +    exec-env                   rte_jhash.h          rte_string_fns.h
> +    rte_alarm.h                rte_launch.h         rte_tailq.h
> +    rte_atomic.h               rte_lcore.h          rte_tcp.h
> +    rte_branch_prediction.h    rte_log.h            rte_timer.h
> +    rte_byteorder.h            rte_lpm.h            rte_udp.h
> +    rte_common.h               rte_malloc.h
>      rte_config.h               rte_mbuf.h

What do you think about this list? I would say we can remove it.

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

* Re: [dpdk-dev] [PATCH 3/3] eal: remove rte_pci_dev_ids.h
  2016-08-06 12:55   ` Thomas Monjalon
@ 2016-08-08  6:20     ` David Marchand
  2016-08-23 13:35       ` Thomas Monjalon
  0 siblings, 1 reply; 11+ messages in thread
From: David Marchand @ 2016-08-08  6:20 UTC (permalink / raw)
  To: Thomas Monjalon, Ferruh Yigit
  Cc: dev, Helin Zhang, Konstantin Ananyev, Wenzhuo Lu, Mcnamara, John

On Sat, Aug 6, 2016 at 2:55 PM, Thomas Monjalon
<thomas.monjalon@6wind.com> wrote:
> What do you think about this list? I would say we can remove it.

Yes, we already discussed this with John.
http://dpdk.org/ml/archives/dev/2016-January/031595.html


-- 
David Marchand

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

* Re: [dpdk-dev] [PATCH 1/3] net/ixgbe: move PCI device ids to the driver
  2016-08-05 14:09 ` [dpdk-dev] [PATCH 1/3] net/ixgbe: move PCI device ids to the driver Ferruh Yigit
@ 2016-08-08  6:36   ` David Marchand
  2016-08-08  9:10     ` Ferruh Yigit
  0 siblings, 1 reply; 11+ messages in thread
From: David Marchand @ 2016-08-08  6:36 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: dev, Helin Zhang, Konstantin Ananyev, Wenzhuo Lu, Thomas Monjalon

Hello Ferruh,

On Fri, Aug 5, 2016 at 4:09 PM, Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> PCI device ids moved from common header into ixgbe driver itself.
>
> KNI starts using pci_device_id from kni/ethtool/ixgbe driver, this is
> only for KNI ethtool support, KNI data path is not effected.
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

Thanks for working on this.

The only thing that bothers me using this ("unsynchronised") internal
pci device list is that, if people were using the ethtool part of kni,
there would now be devices that won't be recognised anymore.
Is it intentional ?
If so, we should explain why in the documentation.

Same comment for the igb patch.


-- 
David Marchand

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

* Re: [dpdk-dev] [PATCH 1/3] net/ixgbe: move PCI device ids to the driver
  2016-08-08  6:36   ` David Marchand
@ 2016-08-08  9:10     ` Ferruh Yigit
  2016-08-10 12:07       ` David Marchand
  0 siblings, 1 reply; 11+ messages in thread
From: Ferruh Yigit @ 2016-08-08  9:10 UTC (permalink / raw)
  To: David Marchand
  Cc: dev, Helin Zhang, Konstantin Ananyev, Wenzhuo Lu, Thomas Monjalon

On 8/8/2016 7:36 AM, David Marchand wrote:
> Hello Ferruh,
> 
> On Fri, Aug 5, 2016 at 4:09 PM, Ferruh Yigit <ferruh.yigit@intel.com> wrote:
>> PCI device ids moved from common header into ixgbe driver itself.
>>
>> KNI starts using pci_device_id from kni/ethtool/ixgbe driver, this is
>> only for KNI ethtool support, KNI data path is not effected.
>>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 
> Thanks for working on this.
> 
> The only thing that bothers me using this ("unsynchronised") internal
> pci device list is that, if people were using the ethtool part of kni,
> there would now be devices that won't be recognised anymore.
> Is it intentional ?

I am aware that the list changed, but wasn't sure about updating the
list in drivers or not.

If a device is not listed in driver's pci device id table, it may not be
supported, so ethtool may give wrong output, or it may just be missing,
this is hard to know without testing (although this was the case before
this patch)

Since it is easy to add new id, and we are at the beginning of the
release, I was thinking if somebody reports KNI ethotool support is
missing for a specific device, we can add it instead of adding all by
default.

> If so, we should explain why in the documentation.
> 
> Same comment for the igb patch.
> 
> 

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

* Re: [dpdk-dev] [PATCH 1/3] net/ixgbe: move PCI device ids to the driver
  2016-08-08  9:10     ` Ferruh Yigit
@ 2016-08-10 12:07       ` David Marchand
  0 siblings, 0 replies; 11+ messages in thread
From: David Marchand @ 2016-08-10 12:07 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: dev, Helin Zhang, Konstantin Ananyev, Wenzhuo Lu, Thomas Monjalon

On Mon, Aug 8, 2016 at 11:10 AM, Ferruh Yigit <ferruh.yigit@intel.com> wrote:
> On 8/8/2016 7:36 AM, David Marchand wrote:
>> The only thing that bothers me using this ("unsynchronised") internal
>> pci device list is that, if people were using the ethtool part of kni,
>> there would now be devices that won't be recognised anymore.
>> Is it intentional ?
>
> I am aware that the list changed, but wasn't sure about updating the
> list in drivers or not.
>
> If a device is not listed in driver's pci device id table, it may not be
> supported, so ethtool may give wrong output, or it may just be missing,
> this is hard to know without testing (although this was the case before
> this patch)
>
> Since it is easy to add new id, and we are at the beginning of the
> release, I was thinking if somebody reports KNI ethotool support is
> missing for a specific device, we can add it instead of adding all by
> default.

Ok for me and with this we can know if this ethtool part is used :-)


-- 
David Marchand

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

* Re: [dpdk-dev] [PATCH 3/3] eal: remove rte_pci_dev_ids.h
  2016-08-08  6:20     ` David Marchand
@ 2016-08-23 13:35       ` Thomas Monjalon
  0 siblings, 0 replies; 11+ messages in thread
From: Thomas Monjalon @ 2016-08-23 13:35 UTC (permalink / raw)
  To: David Marchand, Ferruh Yigit
  Cc: dev, Helin Zhang, Konstantin Ananyev, Wenzhuo Lu, Mcnamara, John

2016-08-08 08:20, David Marchand:
> On Sat, Aug 6, 2016 at 2:55 PM, Thomas Monjalon
> <thomas.monjalon@6wind.com> wrote:
> > What do you think about this list? I would say we can remove it.
> 
> Yes, we already discussed this with John.
> http://dpdk.org/ml/archives/dev/2016-January/031595.html

Done: http://dpdk.org/commit/562ad630

This patch will be rebased when applying.

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

* Re: [dpdk-dev] [PATCH 0/3] remove rte_pci_dev_ids.h
  2016-08-05 14:09 [dpdk-dev] [PATCH 0/3] remove rte_pci_dev_ids.h Ferruh Yigit
                   ` (2 preceding siblings ...)
  2016-08-05 14:09 ` [dpdk-dev] [PATCH 3/3] eal: remove rte_pci_dev_ids.h Ferruh Yigit
@ 2016-08-23 13:37 ` Thomas Monjalon
  3 siblings, 0 replies; 11+ messages in thread
From: Thomas Monjalon @ 2016-08-23 13:37 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: dev, David Marchand, Helin Zhang, Konstantin Ananyev, Wenzhuo Lu

2016-08-05 15:09, Ferruh Yigit:
> This patchset moves remaining PCI device ids for ixgbe and igb drivers,
> updates KNI code which uses these ids to use pci_device_ids from kni/ethtool
> drivers,
> and finally removes the rte_pci_dev_ids.h and updates document refers it.
> 
> Ferruh Yigit (3):
>   net/ixgbe: move PCI device ids to the driver
>   net/igb: move PCI device ids to the driver
>   eal: remove rte_pci_dev_ids.h

Applied, thanks

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

end of thread, other threads:[~2016-08-23 13:37 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-05 14:09 [dpdk-dev] [PATCH 0/3] remove rte_pci_dev_ids.h Ferruh Yigit
2016-08-05 14:09 ` [dpdk-dev] [PATCH 1/3] net/ixgbe: move PCI device ids to the driver Ferruh Yigit
2016-08-08  6:36   ` David Marchand
2016-08-08  9:10     ` Ferruh Yigit
2016-08-10 12:07       ` David Marchand
2016-08-05 14:09 ` [dpdk-dev] [PATCH 2/3] net/igb: " Ferruh Yigit
2016-08-05 14:09 ` [dpdk-dev] [PATCH 3/3] eal: remove rte_pci_dev_ids.h Ferruh Yigit
2016-08-06 12:55   ` Thomas Monjalon
2016-08-08  6:20     ` David Marchand
2016-08-23 13:35       ` Thomas Monjalon
2016-08-23 13:37 ` [dpdk-dev] [PATCH 0/3] " 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).