summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>2016-10-14 08:40:17 (GMT)
committerSaul Wold <sgw@linux.intel.com>2016-10-17 15:12:13 (GMT)
commit6adafe510efbc9721f163adccbc7245e7751b730 (patch)
tree0f76ecea062ef6d3fe5079cd24b6fa4c0259736b
parent755c4a95e951342cdcdfc680ddb2d0807ff4d6c5 (diff)
downloadmeta-intel-6adafe510efbc9721f163adccbc7245e7751b730.tar.gz
meta-isg: dpdk: fix build with kernel v4.8
Backported fixes from upstream dpdk sources to ensure dpdk 16.07 compiles against kernel 4.8. Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
-rw-r--r--meta-isg/common/recipes-extended/dpdk/dpdk.inc3
-rw-r--r--meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-16.07-kni-fix-build-with-kernel-4.8.patch55
-rw-r--r--meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-16.07-net-igb-move-PCI-device-IDs-from-EAL.patch278
-rw-r--r--meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-16.07-net-ixgbe-move-PCI-device-IDs-from-EAL.patch356
4 files changed, 692 insertions, 0 deletions
diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk.inc b/meta-isg/common/recipes-extended/dpdk/dpdk.inc
index f972029..e90b13f 100644
--- a/meta-isg/common/recipes-extended/dpdk/dpdk.inc
+++ b/meta-isg/common/recipes-extended/dpdk/dpdk.inc
@@ -11,6 +11,9 @@ SRC_URI = "http://dpdk.org/browse/dpdk/snapshot/dpdk-${PV}.tar.gz;name=dpdk \
11 file://dpdk-16.07-dpdk-fix-installation-warning-and-issue.patch \ 11 file://dpdk-16.07-dpdk-fix-installation-warning-and-issue.patch \
12 file://dpdk-16.04-dpdk-fix-compilation-with-dynamic-libs.patch \ 12 file://dpdk-16.04-dpdk-fix-compilation-with-dynamic-libs.patch \
13 file://dpdk-16.07-dpdk-fix-for-parellel-make-issue.patch \ 13 file://dpdk-16.07-dpdk-fix-for-parellel-make-issue.patch \
14 file://dpdk-16.07-net-ixgbe-move-PCI-device-IDs-from-EAL.patch \
15 file://dpdk-16.07-net-igb-move-PCI-device-IDs-from-EAL.patch \
16 file://dpdk-16.07-kni-fix-build-with-kernel-4.8.patch \
14 " 17 "
15 18
16COMPATIBLE_MACHINE = "crystalforest|intel-corei7-64" 19COMPATIBLE_MACHINE = "crystalforest|intel-corei7-64"
diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-16.07-kni-fix-build-with-kernel-4.8.patch b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-16.07-kni-fix-build-with-kernel-4.8.patch
new file mode 100644
index 0000000..f7938c7
--- /dev/null
+++ b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-16.07-kni-fix-build-with-kernel-4.8.patch
@@ -0,0 +1,55 @@
1From d1807cc225db36a467a9ae81ac23a6eb7368730e Mon Sep 17 00:00:00 2001
2From: Ferruh Yigit <ferruh.yigit@intel.com>
3Date: Thu, 8 Sep 2016 19:32:09 +0100
4Subject: [PATCH 3/3] kni: fix build with kernel 4.8
5
6Upstream-Status: Backport [http://dpdk.org/browse/dpdk/commit/?id=
77f5565592c5ab2f3541951d2b4e65188d01d5d00]
8
9Linux kernel v4.8 removes macro DEFINE_PCI_DEVICE_TABLE
10
11Linux: 7e9321599011 ("treewide: remove references to the now unnecessary
12DEFINE_PCI_DEVICE_TABLE")
13
14Replaced macro with its value in kni ethtool drivers.
15
16Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
17Acked-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
18Acked-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
19Acked-by: Stephen Hemminger <stephen@networkplumber.org>
20(cherry picked from commit 7f5565592c5ab2f3541951d2b4e65188d01d5d00)
21Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
22---
23 lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 2 +-
24 lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_main.c | 2 +-
25 2 files changed, 2 insertions(+), 2 deletions(-)
26
27diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
28index bd803c0..efd39c6 100644
29--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
30+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
31@@ -76,7 +76,7 @@ static const char igb_driver_string[] =
32 static const char igb_copyright[] =
33 "Copyright (c) 2007-2013 Intel Corporation.";
34
35-DEFINE_PCI_DEVICE_TABLE(igb_pci_tbl) = {
36+const struct pci_device_id igb_pci_tbl[] = {
37 { PCI_VDEVICE(INTEL, E1000_DEV_ID_I354_BACKPLANE_1GBPS) },
38 { PCI_VDEVICE(INTEL, E1000_DEV_ID_I354_SGMII) },
39 { PCI_VDEVICE(INTEL, E1000_DEV_ID_I354_BACKPLANE_2_5GBPS) },
40diff --git a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_main.c b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_main.c
41index 92fc9fc..238028d 100644
42--- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_main.c
43+++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_main.c
44@@ -86,7 +86,7 @@ const char ixgbe_driver_version[] = DRV_VERSION;
45 * { Vendor ID, Device ID, SubVendor ID, SubDevice ID,
46 * Class, Class Mask, private data (not used) }
47 */
48-DEFINE_PCI_DEVICE_TABLE(ixgbe_pci_tbl) = {
49+const struct pci_device_id ixgbe_pci_tbl[] = {
50 {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598)},
51 {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598AF_DUAL_PORT)},
52 {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598AF_SINGLE_PORT)},
53--
541.9.1
55
diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-16.07-net-igb-move-PCI-device-IDs-from-EAL.patch b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-16.07-net-igb-move-PCI-device-IDs-from-EAL.patch
new file mode 100644
index 0000000..22fb6f8
--- /dev/null
+++ b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-16.07-net-igb-move-PCI-device-IDs-from-EAL.patch
@@ -0,0 +1,278 @@
1From 368fd936258873ee848f2c265e4ffd8e5d21d20e Mon Sep 17 00:00:00 2001
2From: Ferruh Yigit <ferruh.yigit@intel.com>
3Date: Fri, 5 Aug 2016 15:09:30 +0100
4Subject: [PATCH 2/3] net/igb: move PCI device IDs from EAL
5
6Upstream-Status: Backport [http://dpdk.org/browse/dpdk/commit/?id=
7109febfe58f93c5b425772563c35d4414a1a2c1c]
8
9PCI device ids moved from common header into igb driver itself.
10
11KNI starts using pci_device_id from kni/ethtool/igb driver, this is only
12for KNI ethtool support, KNI data path is not affected.
13
14Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
15(cherry picked from commit 109febfe58f93c5b425772563c35d4414a1a2c1c)
16Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
17---
18 drivers/net/e1000/igb_ethdev.c | 55 +++++++++--
19 lib/librte_eal/common/include/rte_pci_dev_ids.h | 107 ---------------------
20 lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c | 2 +-
21 lib/librte_eal/linuxapp/kni/kni_misc.c | 20 +---
22 4 files changed, 50 insertions(+), 134 deletions(-)
23
24diff --git a/drivers/net/e1000/igb_ethdev.c b/drivers/net/e1000/igb_ethdev.c
25index fbf4d09..4e9e6a3 100644
26--- a/drivers/net/e1000/igb_ethdev.c
27+++ b/drivers/net/e1000/igb_ethdev.c
28@@ -306,22 +306,57 @@ static enum e1000_fc_mode igb_fc_setting = e1000_fc_full;
29 * The set of PCI devices this driver supports
30 */
31 static const struct rte_pci_id pci_id_igb_map[] = {
32-
33-#define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) {RTE_PCI_DEVICE(vend, dev)},
34-#include "rte_pci_dev_ids.h"
35-
36-{0},
37+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82576) },
38+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82576_FIBER) },
39+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82576_SERDES) },
40+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82576_QUAD_COPPER) },
41+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82576_QUAD_COPPER_ET2) },
42+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82576_NS) },
43+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82576_NS_SERDES) },
44+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82576_SERDES_QUAD) },
45+
46+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82575EB_COPPER) },
47+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82575EB_FIBER_SERDES) },
48+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82575GB_QUAD_COPPER) },
49+
50+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82580_COPPER) },
51+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82580_FIBER) },
52+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82580_SERDES) },
53+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82580_SGMII) },
54+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82580_COPPER_DUAL) },
55+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82580_QUAD_FIBER) },
56+
57+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I350_COPPER) },
58+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I350_FIBER) },
59+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I350_SERDES) },
60+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I350_SGMII) },
61+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I350_DA4) },
62+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I210_COPPER) },
63+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I210_COPPER_OEM1) },
64+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I210_COPPER_IT) },
65+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I210_FIBER) },
66+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I210_SERDES) },
67+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I210_SGMII) },
68+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I211_COPPER) },
69+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I354_BACKPLANE_1GBPS) },
70+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I354_SGMII) },
71+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I354_BACKPLANE_2_5GBPS) },
72+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_DH89XXCC_SGMII) },
73+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_DH89XXCC_SERDES) },
74+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_DH89XXCC_BACKPLANE) },
75+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_DH89XXCC_SFP) },
76+ { .vendor_id = 0, /* sentinel */ },
77 };
78
79 /*
80 * The set of PCI devices this driver supports (for 82576&I350 VF)
81 */
82 static const struct rte_pci_id pci_id_igbvf_map[] = {
83-
84-#define RTE_PCI_DEV_ID_DECL_IGBVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)},
85-#include "rte_pci_dev_ids.h"
86-
87-{0},
88+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82576_VF) },
89+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_82576_VF_HV) },
90+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I350_VF) },
91+ { RTE_PCI_DEVICE(E1000_INTEL_VENDOR_ID, E1000_DEV_ID_I350_VF_HV) },
92+ { .vendor_id = 0, /* sentinel */ },
93 };
94
95 static const struct rte_eth_desc_lim rx_desc_lim = {
96diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h b/lib/librte_eal/common/include/rte_pci_dev_ids.h
97index 1f9d372..1aae6f7 100644
98--- a/lib/librte_eal/common/include/rte_pci_dev_ids.h
99+++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h
100@@ -57,114 +57,7 @@
101 *
102 */
103
104-#ifndef RTE_PCI_DEV_ID_DECL_IGB
105-#define RTE_PCI_DEV_ID_DECL_IGB(vend, dev)
106-#endif
107-
108-#ifndef RTE_PCI_DEV_ID_DECL_IGBVF
109-#define RTE_PCI_DEV_ID_DECL_IGBVF(vend, dev)
110-#endif
111-
112 #ifndef PCI_VENDOR_ID_INTEL
113 /** Vendor ID used by Intel devices */
114 #define PCI_VENDOR_ID_INTEL 0x8086
115 #endif
116-
117-/******************** Physical IGB devices from e1000_hw.h ********************/
118-
119-#define E1000_DEV_ID_82576 0x10C9
120-#define E1000_DEV_ID_82576_FIBER 0x10E6
121-#define E1000_DEV_ID_82576_SERDES 0x10E7
122-#define E1000_DEV_ID_82576_QUAD_COPPER 0x10E8
123-#define E1000_DEV_ID_82576_QUAD_COPPER_ET2 0x1526
124-#define E1000_DEV_ID_82576_NS 0x150A
125-#define E1000_DEV_ID_82576_NS_SERDES 0x1518
126-#define E1000_DEV_ID_82576_SERDES_QUAD 0x150D
127-#define E1000_DEV_ID_82575EB_COPPER 0x10A7
128-#define E1000_DEV_ID_82575EB_FIBER_SERDES 0x10A9
129-#define E1000_DEV_ID_82575GB_QUAD_COPPER 0x10D6
130-#define E1000_DEV_ID_82580_COPPER 0x150E
131-#define E1000_DEV_ID_82580_FIBER 0x150F
132-#define E1000_DEV_ID_82580_SERDES 0x1510
133-#define E1000_DEV_ID_82580_SGMII 0x1511
134-#define E1000_DEV_ID_82580_COPPER_DUAL 0x1516
135-#define E1000_DEV_ID_82580_QUAD_FIBER 0x1527
136-#define E1000_DEV_ID_I350_COPPER 0x1521
137-#define E1000_DEV_ID_I350_FIBER 0x1522
138-#define E1000_DEV_ID_I350_SERDES 0x1523
139-#define E1000_DEV_ID_I350_SGMII 0x1524
140-#define E1000_DEV_ID_I350_DA4 0x1546
141-#define E1000_DEV_ID_I210_COPPER 0x1533
142-#define E1000_DEV_ID_I210_COPPER_OEM1 0x1534
143-#define E1000_DEV_ID_I210_COPPER_IT 0x1535
144-#define E1000_DEV_ID_I210_FIBER 0x1536
145-#define E1000_DEV_ID_I210_SERDES 0x1537
146-#define E1000_DEV_ID_I210_SGMII 0x1538
147-#define E1000_DEV_ID_I210_COPPER_FLASHLESS 0x157B
148-#define E1000_DEV_ID_I210_SERDES_FLASHLESS 0x157C
149-#define E1000_DEV_ID_I211_COPPER 0x1539
150-#define E1000_DEV_ID_I354_BACKPLANE_1GBPS 0x1F40
151-#define E1000_DEV_ID_I354_SGMII 0x1F41
152-#define E1000_DEV_ID_I354_BACKPLANE_2_5GBPS 0x1F45
153-#define E1000_DEV_ID_DH89XXCC_SGMII 0x0438
154-#define E1000_DEV_ID_DH89XXCC_SERDES 0x043A
155-#define E1000_DEV_ID_DH89XXCC_BACKPLANE 0x043C
156-#define E1000_DEV_ID_DH89XXCC_SFP 0x0440
157-
158-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576)
159-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_FIBER)
160-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_SERDES)
161-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_QUAD_COPPER)
162-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_QUAD_COPPER_ET2)
163-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_NS)
164-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_NS_SERDES)
165-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_SERDES_QUAD)
166-
167-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82575EB_COPPER)
168-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82575EB_FIBER_SERDES)
169-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82575GB_QUAD_COPPER)
170-
171-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_COPPER)
172-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_FIBER)
173-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_SERDES)
174-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_SGMII)
175-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_COPPER_DUAL)
176-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82580_QUAD_FIBER)
177-
178-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_COPPER)
179-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_FIBER)
180-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_SERDES)
181-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_SGMII)
182-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_DA4)
183-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_COPPER)
184-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_COPPER_OEM1)
185-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_COPPER_IT)
186-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_FIBER)
187-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_SERDES)
188-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I210_SGMII)
189-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I211_COPPER)
190-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I354_BACKPLANE_1GBPS)
191-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I354_SGMII)
192-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I354_BACKPLANE_2_5GBPS)
193-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_SGMII)
194-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_SERDES)
195-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_BACKPLANE)
196-RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_SFP)
197-
198-/****************** Virtual IGB devices from e1000_hw.h ******************/
199-
200-#define E1000_DEV_ID_82576_VF 0x10CA
201-#define E1000_DEV_ID_82576_VF_HV 0x152D
202-#define E1000_DEV_ID_I350_VF 0x1520
203-#define E1000_DEV_ID_I350_VF_HV 0x152F
204-
205-RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_VF)
206-RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_VF_HV)
207-RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_VF)
208-RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_VF_HV)
209-
210-/*
211- * Undef all RTE_PCI_DEV_ID_DECL_* here.
212- */
213-#undef RTE_PCI_DEV_ID_DECL_IGB
214-#undef RTE_PCI_DEV_ID_DECL_IGBVF
215diff --git a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
216index 96acec5..bd803c0 100644
217--- a/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
218+++ b/lib/librte_eal/linuxapp/kni/ethtool/igb/igb_main.c
219@@ -76,7 +76,7 @@ static const char igb_driver_string[] =
220 static const char igb_copyright[] =
221 "Copyright (c) 2007-2013 Intel Corporation.";
222
223-static DEFINE_PCI_DEVICE_TABLE(igb_pci_tbl) = {
224+DEFINE_PCI_DEVICE_TABLE(igb_pci_tbl) = {
225 { PCI_VDEVICE(INTEL, E1000_DEV_ID_I354_BACKPLANE_1GBPS) },
226 { PCI_VDEVICE(INTEL, E1000_DEV_ID_I354_SGMII) },
227 { PCI_VDEVICE(INTEL, E1000_DEV_ID_I354_BACKPLANE_2_5GBPS) },
228diff --git a/lib/librte_eal/linuxapp/kni/kni_misc.c b/lib/librte_eal/linuxapp/kni/kni_misc.c
229index 66bf519..67e9b7d 100644
230--- a/lib/librte_eal/linuxapp/kni/kni_misc.c
231+++ b/lib/librte_eal/linuxapp/kni/kni_misc.c
232@@ -58,6 +58,7 @@ extern void ixgbe_kni_remove(struct pci_dev *pdev);
233 extern struct pci_device_id ixgbe_pci_tbl[];
234 extern int igb_kni_probe(struct pci_dev *pdev, struct net_device **lad_dev);
235 extern void igb_kni_remove(struct pci_dev *pdev);
236+extern struct pci_device_id igb_pci_tbl[];
237
238 static int kni_open(struct inode *inode, struct file *file);
239 static int kni_release(struct inode *inode, struct file *file);
240@@ -356,15 +357,8 @@ kni_dev_remove(struct kni_dev *dev)
241
242 if (pci_match_id(ixgbe_pci_tbl, dev->pci_dev))
243 ixgbe_kni_remove(dev->pci_dev);
244-
245- switch (dev->device_id) {
246- #define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) case (dev):
247- #include <rte_pci_dev_ids.h>
248+ else if (pci_match_id(igb_pci_tbl, dev->pci_dev))
249 igb_kni_remove(dev->pci_dev);
250- break;
251- default:
252- break;
253- }
254
255 if (dev->net_dev) {
256 unregister_netdev(dev->net_dev);
257@@ -513,16 +507,10 @@ kni_ioctl_create(struct net *net,
258
259 if (pci_match_id(ixgbe_pci_tbl, found_pci))
260 ret = ixgbe_kni_probe(found_pci, &lad_dev);
261-
262- switch (dev_info.device_id) {
263- #define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) case (dev):
264- #include <rte_pci_dev_ids.h>
265+ else if (pci_match_id(igb_pci_tbl, found_pci))
266 ret = igb_kni_probe(found_pci, &lad_dev);
267- break;
268- default:
269+ else
270 ret = -1;
271- break;
272- }
273
274 KNI_DBG("PCI found: pci=0x%p, lad_dev=0x%p\n",
275 pci, lad_dev);
276--
2771.9.1
278
diff --git a/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-16.07-net-ixgbe-move-PCI-device-IDs-from-EAL.patch b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-16.07-net-ixgbe-move-PCI-device-IDs-from-EAL.patch
new file mode 100644
index 0000000..d8b04a9
--- /dev/null
+++ b/meta-isg/common/recipes-extended/dpdk/dpdk/dpdk-16.07-net-ixgbe-move-PCI-device-IDs-from-EAL.patch
@@ -0,0 +1,356 @@
1From 11b4f5db07e4e48d1548671ac44f3d328523e93d Mon Sep 17 00:00:00 2001
2From: Ferruh Yigit <ferruh.yigit@intel.com>
3Date: Fri, 5 Aug 2016 15:09:29 +0100
4Subject: [PATCH 1/3] net/ixgbe: move PCI device IDs from EAL
5
6Upstream-Status: Backport [http://dpdk.org/browse/dpdk/commit/?id=
7221fba3b987c49964aa2b3d14d7a07397bebdf73]
8
9PCI device ids moved from common header into ixgbe driver itself.
10
11KNI starts using pci_device_id from kni/ethtool/ixgbe driver, this is
12only for KNI ethtool support, KNI data path is not affected.
13
14Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
15(cherry picked from commit 221fba3b987c49964aa2b3d14d7a07397bebdf73)
16Signed-off-by: Rahul Kumar Gupta <rahul.kumarxx.gupta@intel.com>
17---
18 drivers/net/ixgbe/ixgbe_ethdev.c | 79 ++++++++++--
19 lib/librte_eal/common/include/rte_pci_dev_ids.h | 156 ------------------------
20 lib/librte_eal/linuxapp/kni/kni_misc.c | 17 ++-
21 3 files changed, 76 insertions(+), 176 deletions(-)
22
23diff --git a/drivers/net/ixgbe/ixgbe_ethdev.c b/drivers/net/ixgbe/ixgbe_ethdev.c
24index d478a15..fb618ef 100644
25--- a/drivers/net/ixgbe/ixgbe_ethdev.c
26+++ b/drivers/net/ixgbe/ixgbe_ethdev.c
27@@ -429,23 +429,80 @@ static int ixgbe_dev_udp_tunnel_port_del(struct rte_eth_dev *dev,
28 * The set of PCI devices this driver supports
29 */
30 static const struct rte_pci_id pci_id_ixgbe_map[] = {
31-
32-#define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) {RTE_PCI_DEVICE(vend, dev)},
33-#include "rte_pci_dev_ids.h"
34-
35-{ .vendor_id = 0, /* sentinel */ },
36+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598) },
37+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_BX) },
38+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_DUAL_PORT) },
39+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AF_SINGLE_PORT) },
40+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AT) },
41+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598AT2) },
42+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_SFP_LOM) },
43+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_CX4) },
44+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_CX4_DUAL_PORT) },
45+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_DA_DUAL_PORT) },
46+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM) },
47+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82598EB_XF_LR) },
48+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_KX4) },
49+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_KX4_MEZZ) },
50+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_KR) },
51+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_COMBO_BACKPLANE) },
52+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_SUBDEV_ID_82599_KX4_KR_MEZZ) },
53+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_CX4) },
54+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP) },
55+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_SUBDEV_ID_82599_SFP) },
56+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_SUBDEV_ID_82599_RNDC) },
57+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_SUBDEV_ID_82599_560FLR) },
58+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_SUBDEV_ID_82599_ECNA_DP) },
59+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_BACKPLANE_FCOE) },
60+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_FCOE) },
61+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_EM) },
62+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_SF2) },
63+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_SFP_SF_QP) },
64+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_QSFP_SF_QP) },
65+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599EN_SFP) },
66+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_XAUI_LOM) },
67+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_T3_LOM) },
68+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_LS) },
69+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T) },
70+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540T1) },
71+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_SFP) },
72+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_10G_T) },
73+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_1G_T) },
74+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550T) },
75+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550T1) },
76+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_KR) },
77+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_KR_L) },
78+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SFP_N) },
79+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SGMII) },
80+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SGMII_L) },
81+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_10G_T) },
82+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_QSFP) },
83+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_QSFP_N) },
84+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_SFP) },
85+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_1G_T) },
86+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_1G_T_L) },
87+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_KX4) },
88+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_KR) },
89+#ifdef RTE_NIC_BYPASS
90+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_BYPASS) },
91+#endif
92+ { .vendor_id = 0, /* sentinel */ },
93 };
94
95-
96 /*
97 * The set of PCI devices this driver supports (for 82599 VF)
98 */
99 static const struct rte_pci_id pci_id_ixgbevf_map[] = {
100-
101-#define RTE_PCI_DEV_ID_DECL_IXGBEVF(vend, dev) {RTE_PCI_DEVICE(vend, dev)},
102-#include "rte_pci_dev_ids.h"
103-{ .vendor_id = 0, /* sentinel */ },
104-
105+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_VF) },
106+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_82599_VF_HV) },
107+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540_VF) },
108+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X540_VF_HV) },
109+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550_VF_HV) },
110+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550_VF) },
111+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_VF) },
112+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_A_VF_HV) },
113+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_VF) },
114+ { RTE_PCI_DEVICE(IXGBE_INTEL_VENDOR_ID, IXGBE_DEV_ID_X550EM_X_VF_HV) },
115+ { .vendor_id = 0, /* sentinel */ },
116 };
117
118 static const struct rte_eth_desc_lim rx_desc_lim = {
119diff --git a/lib/librte_eal/common/include/rte_pci_dev_ids.h b/lib/librte_eal/common/include/rte_pci_dev_ids.h
120index 6ec8ae8..1f9d372 100644
121--- a/lib/librte_eal/common/include/rte_pci_dev_ids.h
122+++ b/lib/librte_eal/common/include/rte_pci_dev_ids.h
123@@ -65,14 +65,6 @@
124 #define RTE_PCI_DEV_ID_DECL_IGBVF(vend, dev)
125 #endif
126
127-#ifndef RTE_PCI_DEV_ID_DECL_IXGBE
128-#define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev)
129-#endif
130-
131-#ifndef RTE_PCI_DEV_ID_DECL_IXGBEVF
132-#define RTE_PCI_DEV_ID_DECL_IXGBEVF(vend, dev)
133-#endif
134-
135 #ifndef PCI_VENDOR_ID_INTEL
136 /** Vendor ID used by Intel devices */
137 #define PCI_VENDOR_ID_INTEL 0x8086
138@@ -159,128 +151,6 @@ RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_SERDES)
139 RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_BACKPLANE)
140 RTE_PCI_DEV_ID_DECL_IGB(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_DH89XXCC_SFP)
141
142-/****************** Physical IXGBE devices from ixgbe_type.h ******************/
143-
144-#define IXGBE_DEV_ID_82598 0x10B6
145-#define IXGBE_DEV_ID_82598_BX 0x1508
146-#define IXGBE_DEV_ID_82598AF_DUAL_PORT 0x10C6
147-#define IXGBE_DEV_ID_82598AF_SINGLE_PORT 0x10C7
148-#define IXGBE_DEV_ID_82598AT 0x10C8
149-#define IXGBE_DEV_ID_82598AT2 0x150B
150-#define IXGBE_DEV_ID_82598EB_SFP_LOM 0x10DB
151-#define IXGBE_DEV_ID_82598EB_CX4 0x10DD
152-#define IXGBE_DEV_ID_82598_CX4_DUAL_PORT 0x10EC
153-#define IXGBE_DEV_ID_82598_DA_DUAL_PORT 0x10F1
154-#define IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM 0x10E1
155-#define IXGBE_DEV_ID_82598EB_XF_LR 0x10F4
156-#define IXGBE_DEV_ID_82599_KX4 0x10F7
157-#define IXGBE_DEV_ID_82599_KX4_MEZZ 0x1514
158-#define IXGBE_DEV_ID_82599_KR 0x1517
159-#define IXGBE_DEV_ID_82599_COMBO_BACKPLANE 0x10F8
160-#define IXGBE_SUBDEV_ID_82599_KX4_KR_MEZZ 0x000C
161-#define IXGBE_DEV_ID_82599_CX4 0x10F9
162-#define IXGBE_DEV_ID_82599_SFP 0x10FB
163-#define IXGBE_SUBDEV_ID_82599_SFP 0x11A9
164-#define IXGBE_SUBDEV_ID_82599_RNDC 0x1F72
165-#define IXGBE_SUBDEV_ID_82599_560FLR 0x17D0
166-#define IXGBE_SUBDEV_ID_82599_ECNA_DP 0x0470
167-#define IXGBE_DEV_ID_82599_BACKPLANE_FCOE 0x152A
168-#define IXGBE_DEV_ID_82599_SFP_FCOE 0x1529
169-#define IXGBE_DEV_ID_82599_SFP_EM 0x1507
170-#define IXGBE_DEV_ID_82599_SFP_SF2 0x154D
171-#define IXGBE_DEV_ID_82599_SFP_SF_QP 0x154A
172-#define IXGBE_DEV_ID_82599_QSFP_SF_QP 0x1558
173-#define IXGBE_DEV_ID_82599EN_SFP 0x1557
174-#define IXGBE_DEV_ID_82599_XAUI_LOM 0x10FC
175-#define IXGBE_DEV_ID_82599_T3_LOM 0x151C
176-#define IXGBE_DEV_ID_82599_LS 0x154F
177-#define IXGBE_DEV_ID_X540T 0x1528
178-#define IXGBE_DEV_ID_X540T1 0x1560
179-#define IXGBE_DEV_ID_X550EM_X_SFP 0x15AC
180-#define IXGBE_DEV_ID_X550EM_X_10G_T 0x15AD
181-#define IXGBE_DEV_ID_X550EM_X_1G_T 0x15AE
182-#define IXGBE_DEV_ID_X550T 0x1563
183-#define IXGBE_DEV_ID_X550T1 0x15D1
184-#define IXGBE_DEV_ID_X550EM_A_KR 0x15C2
185-#define IXGBE_DEV_ID_X550EM_A_KR_L 0x15C3
186-#define IXGBE_DEV_ID_X550EM_A_SFP_N 0x15C4
187-#define IXGBE_DEV_ID_X550EM_A_SGMII 0x15C6
188-#define IXGBE_DEV_ID_X550EM_A_SGMII_L 0x15C7
189-#define IXGBE_DEV_ID_X550EM_A_10G_T 0x15C8
190-#define IXGBE_DEV_ID_X550EM_A_QSFP 0x15CA
191-#define IXGBE_DEV_ID_X550EM_A_QSFP_N 0x15CC
192-#define IXGBE_DEV_ID_X550EM_A_SFP 0x15CE
193-#define IXGBE_DEV_ID_X550EM_A_1G_T 0x15E4
194-#define IXGBE_DEV_ID_X550EM_A_1G_T_L 0x15E5
195-#define IXGBE_DEV_ID_X550EM_X_KX4 0x15AA
196-#define IXGBE_DEV_ID_X550EM_X_KR 0x15AB
197-
198-#ifdef RTE_NIC_BYPASS
199-#define IXGBE_DEV_ID_82599_BYPASS 0x155D
200-#endif
201-
202-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598)
203-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598_BX)
204-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598AF_DUAL_PORT)
205-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, \
206- IXGBE_DEV_ID_82598AF_SINGLE_PORT)
207-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598AT)
208-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598AT2)
209-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598EB_SFP_LOM)
210-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598EB_CX4)
211-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598_CX4_DUAL_PORT)
212-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598_DA_DUAL_PORT)
213-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, \
214- IXGBE_DEV_ID_82598_SR_DUAL_PORT_EM)
215-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82598EB_XF_LR)
216-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_KX4)
217-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_KX4_MEZZ)
218-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_KR)
219-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, \
220- IXGBE_DEV_ID_82599_COMBO_BACKPLANE)
221-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, \
222- IXGBE_SUBDEV_ID_82599_KX4_KR_MEZZ)
223-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_CX4)
224-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP)
225-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_SFP)
226-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_RNDC)
227-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_560FLR)
228-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_SUBDEV_ID_82599_ECNA_DP)
229-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_BACKPLANE_FCOE)
230-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_FCOE)
231-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_EM)
232-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_SF2)
233-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_SFP_SF_QP)
234-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_QSFP_SF_QP)
235-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599EN_SFP)
236-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_XAUI_LOM)
237-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_T3_LOM)
238-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_LS)
239-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540T)
240-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540T1)
241-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_SFP)
242-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_10G_T)
243-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_1G_T)
244-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550T)
245-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550T1)
246-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_KR)
247-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_KR_L)
248-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_SFP_N)
249-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_SGMII)
250-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_SGMII_L)
251-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_10G_T)
252-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_QSFP)
253-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_QSFP_N)
254-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_SFP)
255-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_1G_T)
256-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_1G_T_L)
257-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_KX4)
258-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_KR)
259-
260-#ifdef RTE_NIC_BYPASS
261-RTE_PCI_DEV_ID_DECL_IXGBE(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_BYPASS)
262-#endif
263-
264 /****************** Virtual IGB devices from e1000_hw.h ******************/
265
266 #define E1000_DEV_ID_82576_VF 0x10CA
267@@ -293,34 +163,8 @@ RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_82576_VF_HV)
268 RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_VF)
269 RTE_PCI_DEV_ID_DECL_IGBVF(PCI_VENDOR_ID_INTEL, E1000_DEV_ID_I350_VF_HV)
270
271-/****************** Virtual IXGBE devices from ixgbe_type.h ******************/
272-
273-#define IXGBE_DEV_ID_82599_VF 0x10ED
274-#define IXGBE_DEV_ID_82599_VF_HV 0x152E
275-#define IXGBE_DEV_ID_X540_VF 0x1515
276-#define IXGBE_DEV_ID_X540_VF_HV 0x1530
277-#define IXGBE_DEV_ID_X550_VF_HV 0x1564
278-#define IXGBE_DEV_ID_X550_VF 0x1565
279-#define IXGBE_DEV_ID_X550EM_A_VF 0x15C5
280-#define IXGBE_DEV_ID_X550EM_A_VF_HV 0x15B4
281-#define IXGBE_DEV_ID_X550EM_X_VF 0x15A8
282-#define IXGBE_DEV_ID_X550EM_X_VF_HV 0x15A9
283-
284-RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_VF)
285-RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_82599_VF_HV)
286-RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540_VF)
287-RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X540_VF_HV)
288-RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550_VF_HV)
289-RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550_VF)
290-RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_VF)
291-RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_A_VF_HV)
292-RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_VF)
293-RTE_PCI_DEV_ID_DECL_IXGBEVF(PCI_VENDOR_ID_INTEL, IXGBE_DEV_ID_X550EM_X_VF_HV)
294-
295 /*
296 * Undef all RTE_PCI_DEV_ID_DECL_* here.
297 */
298 #undef RTE_PCI_DEV_ID_DECL_IGB
299 #undef RTE_PCI_DEV_ID_DECL_IGBVF
300-#undef RTE_PCI_DEV_ID_DECL_IXGBE
301-#undef RTE_PCI_DEV_ID_DECL_IXGBEVF
302diff --git a/lib/librte_eal/linuxapp/kni/kni_misc.c b/lib/librte_eal/linuxapp/kni/kni_misc.c
303index 59d15ca..66bf519 100644
304--- a/lib/librte_eal/linuxapp/kni/kni_misc.c
305+++ b/lib/librte_eal/linuxapp/kni/kni_misc.c
306@@ -55,6 +55,7 @@ extern void kni_set_ethtool_ops(struct net_device *netdev);
307
308 extern int ixgbe_kni_probe(struct pci_dev *pdev, struct net_device **lad_dev);
309 extern void ixgbe_kni_remove(struct pci_dev *pdev);
310+extern struct pci_device_id ixgbe_pci_tbl[];
311 extern int igb_kni_probe(struct pci_dev *pdev, struct net_device **lad_dev);
312 extern void igb_kni_remove(struct pci_dev *pdev);
313
314@@ -353,15 +354,14 @@ kni_dev_remove(struct kni_dev *dev)
315 if (!dev)
316 return -ENODEV;
317
318+ if (pci_match_id(ixgbe_pci_tbl, dev->pci_dev))
319+ ixgbe_kni_remove(dev->pci_dev);
320+
321 switch (dev->device_id) {
322 #define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) case (dev):
323 #include <rte_pci_dev_ids.h>
324 igb_kni_remove(dev->pci_dev);
325 break;
326- #define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) case (dev):
327- #include <rte_pci_dev_ids.h>
328- ixgbe_kni_remove(dev->pci_dev);
329- break;
330 default:
331 break;
332 }
333@@ -510,16 +510,15 @@ kni_ioctl_create(struct net *net,
334 (PCI_SLOT(pci->devfn) == dev_info.devid) &&
335 (PCI_FUNC(pci->devfn) == dev_info.function)) {
336 found_pci = pci;
337+
338+ if (pci_match_id(ixgbe_pci_tbl, found_pci))
339+ ret = ixgbe_kni_probe(found_pci, &lad_dev);
340+
341 switch (dev_info.device_id) {
342 #define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) case (dev):
343 #include <rte_pci_dev_ids.h>
344 ret = igb_kni_probe(found_pci, &lad_dev);
345 break;
346- #define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) \
347- case (dev):
348- #include <rte_pci_dev_ids.h>
349- ret = ixgbe_kni_probe(found_pci, &lad_dev);
350- break;
351 default:
352 ret = -1;
353 break;
354--
3551.9.1
356