From: David Marchand <david.marchand@6wind.com>
To: dev@dpdk.org
Cc: bruce.richardson@intel.com, thomas.monjalon@6wind.com,
nhorman@tuxdriver.com, pmatilai@redhat.com,
christian.ehrhardt@canonical.com, stephen@networkplumber.com,
Helin Zhang <helin.zhang@intel.com>,
Jingjing Wu <jingjing.wu@intel.com>
Subject: [dpdk-dev] [PATCH v4 03/10] net/i40e: move PCI device ids to the driver
Date: Mon, 11 Jul 2016 16:40:38 +0200 [thread overview]
Message-ID: <1468248045-3495-4-git-send-email-david.marchand@6wind.com> (raw)
In-Reply-To: <1468248045-3495-1-git-send-email-david.marchand@6wind.com>
Reused defines from the driver.
Used RTE_PCI_DEVICE in place of RTE_PCI_DEV_ID_DECL* stuff.
Signed-off-by: David Marchand <david.marchand@6wind.com>
---
Changes since v3
- added new pci ids from HEAD
---
drivers/net/i40e/i40e_ethdev.c | 25 +++++++--
drivers/net/i40e/i40e_ethdev_vf.c | 9 ++--
lib/librte_eal/common/include/rte_pci_dev_ids.h | 70 -------------------------
3 files changed, 28 insertions(+), 76 deletions(-)
diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index 31c2e11..daac236 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -454,9 +454,28 @@ static void i40e_set_default_mac_addr(struct rte_eth_dev *dev,
static int i40e_dev_mtu_set(struct rte_eth_dev *dev, uint16_t mtu);
static const struct rte_pci_id pci_id_i40e_map[] = {
-#define RTE_PCI_DEV_ID_DECL_I40E(vend, dev) {RTE_PCI_DEVICE(vend, dev)},
-#include "rte_pci_dev_ids.h"
-{ .vendor_id = 0, /* sentinel */ },
+ { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_SFP_XL710) },
+ { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_QEMU) },
+ { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_KX_B) },
+ { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_KX_C) },
+ { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_QSFP_A) },
+ { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_QSFP_B) },
+ { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_QSFP_C) },
+ { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_10G_BASE_T) },
+ { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_20G_KR2) },
+ { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_20G_KR2_A) },
+ { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_10G_BASE_T4) },
+ { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_25G_B) },
+ { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_25G_SFP28) },
+ { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_X722_A0) },
+ { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_KX_X722) },
+ { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_QSFP_X722) },
+ { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_SFP_X722) },
+ { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_1G_BASE_T_X722) },
+ { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_10G_BASE_T_X722) },
+ { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_SFP_I_X722) },
+ { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_QSFP_I_X722) },
+ { .vendor_id = 0, /* sentinel */ },
};
static const struct eth_dev_ops i40e_eth_dev_ops = {
diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c
index 31547db..a616ae0 100644
--- a/drivers/net/i40e/i40e_ethdev_vf.c
+++ b/drivers/net/i40e/i40e_ethdev_vf.c
@@ -1110,9 +1110,12 @@ i40evf_get_link_status(struct rte_eth_dev *dev, struct rte_eth_link *link)
}
static const struct rte_pci_id pci_id_i40evf_map[] = {
-#define RTE_PCI_DEV_ID_DECL_I40EVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)},
-#include "rte_pci_dev_ids.h"
-{ .vendor_id = 0, /* sentinel */ },
+ { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_VF) },
+ { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_VF_HV) },
+ { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_X722_A0_VF) },
+ { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_X722_VF) },
+ { RTE_PCI_DEVICE(I40E_INTEL_VENDOR_ID, I40E_DEV_ID_X722_VF_HV) },
+ { .vendor_id = 0, /* sentinel */ },
};
static inline int
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 1b22adb..30fcdee 100644
--- a/lib/librte_eal/common/include/rte_pci_dev_ids.h
+++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h
@@ -73,14 +73,6 @@
#define RTE_PCI_DEV_ID_DECL_IXGBEVF(vend, dev)
#endif
-#ifndef RTE_PCI_DEV_ID_DECL_I40E
-#define RTE_PCI_DEV_ID_DECL_I40E(vend, dev)
-#endif
-
-#ifndef RTE_PCI_DEV_ID_DECL_I40EVF
-#define RTE_PCI_DEV_ID_DECL_I40EVF(vend, dev)
-#endif
-
#ifndef RTE_PCI_DEV_ID_DECL_VIRTIO
#define RTE_PCI_DEV_ID_DECL_VIRTIO(vend, dev)
#endif
@@ -341,52 +333,6 @@ RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_KR)
RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_BYPASS)
#endif
-/*************** Physical I40E devices from i40e_type.h *****************/
-
-#define I40E_DEV_ID_SFP_XL710 0x1572
-#define I40E_DEV_ID_QEMU 0x1574
-#define I40E_DEV_ID_KX_B 0x1580
-#define I40E_DEV_ID_KX_C 0x1581
-#define I40E_DEV_ID_QSFP_A 0x1583
-#define I40E_DEV_ID_QSFP_B 0x1584
-#define I40E_DEV_ID_QSFP_C 0x1585
-#define I40E_DEV_ID_10G_BASE_T 0x1586
-#define I40E_DEV_ID_20G_KR2 0x1587
-#define I40E_DEV_ID_20G_KR2_A 0x1588
-#define I40E_DEV_ID_10G_BASE_T4 0x1589
-#define I40E_DEV_ID_25G_B 0x158A
-#define I40E_DEV_ID_25G_SFP28 0x158B
-#define I40E_DEV_ID_X722_A0 0x374C
-#define I40E_DEV_ID_KX_X722 0x37CE
-#define I40E_DEV_ID_QSFP_X722 0x37CF
-#define I40E_DEV_ID_SFP_X722 0x37D0
-#define I40E_DEV_ID_1G_BASE_T_X722 0x37D1
-#define I40E_DEV_ID_10G_BASE_T_X722 0x37D2
-#define I40E_DEV_ID_SFP_I_X722 0x37D3
-#define I40E_DEV_ID_QSFP_I_X722 0x37D4
-
-RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_SFP_XL710)
-RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_QEMU)
-RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_KX_B)
-RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_KX_C)
-RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_QSFP_A)
-RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_QSFP_B)
-RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_QSFP_C)
-RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_10G_BASE_T)
-RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_20G_KR2)
-RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_20G_KR2_A)
-RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_10G_BASE_T4)
-RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_25G_B)
-RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_25G_SFP28)
-RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_X722_A0)
-RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_KX_X722)
-RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_QSFP_X722)
-RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_SFP_X722)
-RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_1G_BASE_T_X722)
-RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_10G_BASE_T_X722)
-RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_SFP_I_X722)
-RTE_PCI_DEV_ID_DECL_I40E(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_QSFP_I_X722)
-
/*************** Physical FM10K devices from fm10k_type.h ***************/
#define FM10K_DEV_ID_PF 0x15A4
@@ -431,20 +377,6 @@ 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)
-/****************** Virtual I40E devices from i40e_type.h ********************/
-
-#define I40E_DEV_ID_VF 0x154C
-#define I40E_DEV_ID_VF_HV 0x1571
-#define I40E_DEV_ID_X722_A0_VF 0x374D
-#define I40E_DEV_ID_X722_VF 0x37CD
-#define I40E_DEV_ID_X722_VF_HV 0x37D9
-
-RTE_PCI_DEV_ID_DECL_I40EVF(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_VF)
-RTE_PCI_DEV_ID_DECL_I40EVF(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_VF_HV)
-RTE_PCI_DEV_ID_DECL_I40EVF(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_X722_A0_VF)
-RTE_PCI_DEV_ID_DECL_I40EVF(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_X722_VF)
-RTE_PCI_DEV_ID_DECL_I40EVF(PCI_VENDOR_ID_INTEL, I40E_DEV_ID_X722_VF_HV)
-
/****************** Virtio devices from virtio.h ******************/
#define QUMRANET_DEV_ID_VIRTIO 0x1000
@@ -549,8 +481,6 @@ RTE_PCI_DEV_ID_DECL_BNXT(PCI_VENDOR_ID_BROADCOM, BROADCOM_DEV_ID_57314)
#undef RTE_PCI_DEV_ID_DECL_IGBVF
#undef RTE_PCI_DEV_ID_DECL_IXGBE
#undef RTE_PCI_DEV_ID_DECL_IXGBEVF
-#undef RTE_PCI_DEV_ID_DECL_I40E
-#undef RTE_PCI_DEV_ID_DECL_I40EVF
#undef RTE_PCI_DEV_ID_DECL_VIRTIO
#undef RTE_PCI_DEV_ID_DECL_VMXNET3
#undef RTE_PCI_DEV_ID_DECL_FM10K
--
1.9.1
next prev parent reply other threads:[~2016-07-11 14:41 UTC|newest]
Thread overview: 92+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-05 19:37 [dpdk-dev] time to kill rte_pci_dev_ids.h Stephen Hemminger
2016-01-06 1:40 ` Thomas Monjalon
2016-01-08 13:20 ` David Marchand
2016-01-10 12:50 ` [dpdk-dev] [PATCH 00/11] kill global pci device id list David Marchand
2016-01-10 12:50 ` [dpdk-dev] [PATCH 01/11] e1000: move pci device ids to driver David Marchand
2016-01-10 12:50 ` [dpdk-dev] [PATCH 02/11] ixgbe: " David Marchand
2016-01-10 12:50 ` [dpdk-dev] [PATCH 03/11] i40e: " David Marchand
2016-01-10 20:02 ` Stephen Hemminger
2016-01-12 8:45 ` David Marchand
2016-01-10 12:50 ` [dpdk-dev] [PATCH 04/11] fm10k: " David Marchand
2016-01-10 12:50 ` [dpdk-dev] [PATCH 05/11] virtio: " David Marchand
2016-01-10 12:50 ` [dpdk-dev] [PATCH 06/11] vmxnet3: " David Marchand
2016-01-10 12:50 ` [dpdk-dev] [PATCH 07/11] enic: " David Marchand
2016-01-10 12:50 ` [dpdk-dev] [PATCH 08/11] bnx2x: " David Marchand
2016-01-10 12:50 ` [dpdk-dev] [PATCH 09/11] doc: refresh headers list David Marchand
2016-01-12 14:06 ` Mcnamara, John
2016-01-16 15:10 ` David Marchand
2016-01-18 9:47 ` Thomas Monjalon
2016-01-18 16:25 ` Mcnamara, John
2016-01-10 12:50 ` [dpdk-dev] [PATCH 10/11] pci: no need for global device ids list David Marchand
2016-01-10 12:50 ` [dpdk-dev] [PATCH 11/11] pci: place all uio pci device ids in a dedicated section David Marchand
2016-01-10 12:58 ` [dpdk-dev] [PATCH 00/11] kill global pci device id list David Marchand
2016-01-10 13:24 ` Thomas Monjalon
2016-01-10 13:26 ` David Marchand
2016-01-10 13:27 ` David Marchand
2016-01-10 15:53 ` Zhang, Helin
2016-01-16 15:02 ` David Marchand
2016-01-21 1:12 ` Zhang, Helin
2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 00/10] " David Marchand
2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 01/10] e1000: move pci device ids to driver David Marchand
2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 02/10] ixgbe: " David Marchand
2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 03/10] i40e: " David Marchand
2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 04/10] fm10k: " David Marchand
2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 05/10] virtio: " David Marchand
2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 06/10] vmxnet3: " David Marchand
2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 07/10] enic: " David Marchand
2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 08/10] bnx2x: " David Marchand
2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 09/10] pci: no need for global device ids list David Marchand
2016-01-18 12:30 ` [dpdk-dev] [PATCH v2 10/10] pci: place all uio pci device ids in a dedicated section David Marchand
2016-01-19 7:30 ` Thomas Monjalon
2016-01-19 14:29 ` Neil Horman
2016-01-19 16:10 ` Stephen Hemminger
2016-01-19 20:56 ` Neil Horman
2016-01-19 21:35 ` Stephen Hemminger
2016-01-20 15:40 ` Neil Horman
2016-02-24 11:37 ` Bruce Richardson
2016-02-24 11:50 ` Thomas Monjalon
2016-02-24 14:18 ` Neil Horman
2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 00/13] kill global pci device id list David Marchand
2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 01/13] e1000: move pci device ids to driver David Marchand
2016-04-20 13:29 ` Neil Horman
2016-04-20 13:39 ` David Marchand
2016-04-20 18:15 ` Neil Horman
2016-04-21 7:27 ` David Marchand
2016-04-21 12:08 ` Neil Horman
2016-04-21 12:41 ` Thomas Monjalon
2016-04-22 12:13 ` Neil Horman
2016-04-22 13:22 ` Thomas Monjalon
2016-07-08 13:31 ` Thomas Monjalon
2016-07-11 5:33 ` Yuanhan Liu
2016-07-11 5:56 ` Thomas Monjalon
2016-07-11 6:05 ` Yuanhan Liu
2016-07-11 11:35 ` David Marchand
2016-07-11 12:05 ` Yuanhan Liu
2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 02/13] ixgbe: " David Marchand
2016-04-29 1:34 ` Wu, Jingjing
2016-05-04 8:26 ` David Marchand
2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 03/13] i40e: " David Marchand
2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 04/13] fm10k: " David Marchand
2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 05/13] virtio: " David Marchand
2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 06/13] vmxnet3: " David Marchand
2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 07/13] enic: " David Marchand
2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 08/13] bnx2x: " David Marchand
2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 09/13] ena: remove unneeded pci macro David Marchand
2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 10/13] pci: no need for global device ids list David Marchand
2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 11/13] drivers: constify pci id tables David Marchand
2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 12/13] drivers: export pci drivers David Marchand
2016-04-20 12:43 ` [dpdk-dev] [PATCH v3 13/13] app: introduce dpdk-obj-info tool David Marchand
2016-04-21 8:07 ` [dpdk-dev] [PATCH v3 00/13] kill global pci device id list David Marchand
2016-04-21 12:13 ` Neil Horman
2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 00/10] kill global pci device id list (almost) David Marchand
2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 01/10] eal: remove PCI device ids header from doxygen David Marchand
2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 02/10] net/e1000: move em PCI device ids to the driver David Marchand
2016-07-11 14:40 ` David Marchand [this message]
2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 04/10] net/fm10k: move " David Marchand
2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 05/10] net/virtio: " David Marchand
2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 06/10] net/vmxnet3: " David Marchand
2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 07/10] net/enic: " David Marchand
2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 08/10] net/bnx2x: " David Marchand
2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 09/10] net/bnxt: " David Marchand
2016-07-11 14:40 ` [dpdk-dev] [PATCH v4 10/10] net/ena: remove unneeded PCI macro David Marchand
2016-07-11 16:27 ` [dpdk-dev] [PATCH v4 00/10] kill global pci device id list (almost) Thomas Monjalon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1468248045-3495-4-git-send-email-david.marchand@6wind.com \
--to=david.marchand@6wind.com \
--cc=bruce.richardson@intel.com \
--cc=christian.ehrhardt@canonical.com \
--cc=dev@dpdk.org \
--cc=helin.zhang@intel.com \
--cc=jingjing.wu@intel.com \
--cc=nhorman@tuxdriver.com \
--cc=pmatilai@redhat.com \
--cc=stephen@networkplumber.com \
--cc=thomas.monjalon@6wind.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).