From a067bff618bd31bb0cad3391b0db4a74d2061902 Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Mon, 19 Sep 2016 14:27:37 +0200 Subject: [PATCH] fix dkms of rte_kni for kernel >=4.8 Linux kernel v4.8 removes macro DEFINE_PCI_DEVICE_TABLE Linux: 7e9321599011 ("treewide: remove references to the now unnecessary DEFINE_PCI_DEVICE_TABLE") Replaced macro with its value in kni ethtool drivers. Backport of upstream http://dpdk.org/dev/patchwork/patch/15717/ Change-Id: I7d6cef8e1087c7f71d5a8783c282bf64ab0278a4 Signed-off-by: Christian Ehrhardt --- ...dpdk-dev-v2-kni-fix-build-with-kernel-4.8.patch | 35 ++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 36 insertions(+) create mode 100644 debian/patches/dpdk-dev-v2-kni-fix-build-with-kernel-4.8.patch diff --git a/debian/patches/dpdk-dev-v2-kni-fix-build-with-kernel-4.8.patch b/debian/patches/dpdk-dev-v2-kni-fix-build-with-kernel-4.8.patch new file mode 100644 index 00000000..92751472 --- /dev/null +++ b/debian/patches/dpdk-dev-v2-kni-fix-build-with-kernel-4.8.patch @@ -0,0 +1,35 @@ +Description: Linux kernel v4.8 removes macro DEFINE_PCI_DEVICE_TABLE + +Linux: 7e9321599011 ("treewide: remove references to the now unnecessary +DEFINE_PCI_DEVICE_TABLE") + +Replaced macro with its value in kni ethtool drivers. + +Signed-off-by: Ferruh Yigit + +Origin: Upstream, http://dpdk.org/dev/patchwork/patch/15717/ +Author: Christian Ehrhardt +Last-Update: 2016-09-19 + +--- 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_copyright[] = + "Copyright (c) 2007-2013 Intel Corporation."; + +-static DEFINE_PCI_DEVICE_TABLE(igb_pci_tbl) = { ++const struct pci_device_id 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) }, +--- a/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_main.c ++++ b/lib/librte_eal/linuxapp/kni/ethtool/ixgbe/ixgbe_main.c +@@ -86,7 +86,7 @@ + * { Vendor ID, Device ID, SubVendor ID, SubDevice ID, + * Class, Class Mask, private data (not used) } + */ +-DEFINE_PCI_DEVICE_TABLE(ixgbe_pci_tbl) = { ++const struct pci_device_id ixgbe_pci_tbl[] = { + {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598)}, + {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598AF_DUAL_PORT)}, + {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598AF_SINGLE_PORT)}, diff --git a/debian/patches/series b/debian/patches/series index 13c6c03e..a1e65826 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -10,3 +10,4 @@ dpdk-dev-v2-1-4-doc-move-tool-guides-in-their-own-subdirectory.patch dpdk-dev-v2-2-4-doc-rendering-and-installation-of-man-pages.patch dpdk-dev-v2-3-4-doc-add-basic-invocation-info-for-dpdk-pmdinfo.patch dpdk-dev-v2-4-4-doc-add-basic-invocation-info-for-dpdk-devbind.patch +dpdk-dev-v2-kni-fix-build-with-kernel-4.8.patch -- 2.16.6