summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2016-02-01 14:22:25 -0800
committerGerrit Code Review <gerrit@fd.io>2016-02-01 23:47:41 +0000
commitaed4d03268ab970208c9173892715d9cebcf75d2 (patch)
tree9b4c4f3c02080d326bf5d8ae4bf622e518497477
parenta2f0d74c433a2c63354a390e7e26d496a78aeb75 (diff)
remove igb_uio static pci id table patch, use new_id for all NICs
Change-Id: I1db64d62c19c28b50f58f9d0b009e3e89e331f71 Signed-off-by: Damjan Marion <damarion@cisco.com>
-rw-r--r--dpdk/dpdk-2.1.0_patches/0007-igb_uio-Reinstate-PCI-device-id-table-build-system-c.patch49
-rw-r--r--vnet/vnet/devices/dpdk/init.c24
2 files changed, 5 insertions, 68 deletions
diff --git a/dpdk/dpdk-2.1.0_patches/0007-igb_uio-Reinstate-PCI-device-id-table-build-system-c.patch b/dpdk/dpdk-2.1.0_patches/0007-igb_uio-Reinstate-PCI-device-id-table-build-system-c.patch
deleted file mode 100644
index b92fca4cb5d..00000000000
--- a/dpdk/dpdk-2.1.0_patches/0007-igb_uio-Reinstate-PCI-device-id-table-build-system-c.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 3ac6cb020c0f2ddb42dcd790cf64118453e966a2 Mon Sep 17 00:00:00 2001
-From: Shesha Sreenivasamurthy <shesha@cisco.com>
-Date: Wed, 2 Sep 2015 08:48:41 -0700
-Subject: [PATCH 7/9] igb_uio: Reinstate PCI device id table, build system
- changes
-
----
- lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 18 +++++++++++++++++-
- 3 files changed, 34 insertions(+), 1 deletion(-)
-
-diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
-index 865a276..16d2a55 100644
---- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
-+++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c
-@@ -61,6 +61,22 @@ struct rte_uio_pci_dev {
- static char *intr_mode = NULL;
- static enum rte_intr_mode igbuio_intr_mode_preferred = RTE_INTR_MODE_MSIX;
-
-+/* PCI device id table */
-+static struct pci_device_id igbuio_pci_ids[] = {
-+#define RTE_PCI_DEV_ID_DECL_EM(vend, dev) {PCI_DEVICE(vend, dev)},
-+#define RTE_PCI_DEV_ID_DECL_IGB(vend, dev) {PCI_DEVICE(vend, dev)},
-+#define RTE_PCI_DEV_ID_DECL_IGBVF(vend, dev) {PCI_DEVICE(vend, dev)},
-+#define RTE_PCI_DEV_ID_DECL_IXGBE(vend, dev) {PCI_DEVICE(vend, dev)},
-+#define RTE_PCI_DEV_ID_DECL_IXGBEVF(vend, dev) {PCI_DEVICE(vend, dev)},
-+#define RTE_PCI_DEV_ID_DECL_VIRTIO(vend, dev) {PCI_DEVICE(vend, dev)},
-+#define RTE_PCI_DEV_ID_DECL_VMXNET3(vend, dev) {PCI_DEVICE(vend, dev)},
-+#define RTE_PCI_DEV_ID_DECL_VICE(vend, dev) {PCI_DEVICE(vend, dev)},
-+#include <rte_pci_dev_ids.h>
-+{ 0, },
-+};
-+
-+MODULE_DEVICE_TABLE(pci, igbuio_pci_ids);
-+
- static inline struct rte_uio_pci_dev *
- igbuio_get_uio_pci_dev(struct uio_info *info)
- {
-@@ -606,7 +622,7 @@ igbuio_config_intr_mode(char *intr_str)
-
- static struct pci_driver igbuio_pci_driver = {
- .name = "igb_uio",
-- .id_table = NULL,
-+ .id_table = igbuio_pci_ids,
- .probe = igbuio_pci_probe,
- .remove = igbuio_pci_remove,
- };
---
-2.5.0
-
diff --git a/vnet/vnet/devices/dpdk/init.c b/vnet/vnet/devices/dpdk/init.c
index f2ba79d4dba..67ed251c88f 100644
--- a/vnet/vnet/devices/dpdk/init.c
+++ b/vnet/vnet/devices/dpdk/init.c
@@ -862,25 +862,11 @@ static clib_error_t * dpdk_bind_eth_kernel_drivers (vlib_main_t * vm,
*/
if (bind_uio)
{
- int pci_vendor_id = strtol((char *) pci_vid, NULL, 16);
- int pci_device_id = strtol((char *) pci_did, NULL, 16);
-
- /*
- * Set PCI ID to ".../virtio-pci/new_id" for Intel fortvile adapaters
- */
- if (pci_vendor_id == 0x8086 &&
- (pci_device_id == I40E_DEV_ID_10G_BASE_T ||
- pci_device_id == I40E_DEV_ID_SFP_XL710 ||
- pci_device_id == I40E_DEV_ID_QSFP_A ||
- pci_device_id == I40E_DEV_ID_QSFP_B ||
- pci_device_id == I40E_DEV_ID_QSFP_C))
- {
- _vec_len (path) = 0;
- path = format (path, "/sys/bus/pci/drivers/%s/new_id%c", driver_name, 0);
- error = write_sys_fs ((char *) path, "%s %s", pci_vid, pci_did);
- if (error)
- continue;
- }
+ _vec_len (path) = 0;
+ path = format (path, "/sys/bus/pci/drivers/%s/new_id%c", driver_name, 0);
+ error = write_sys_fs ((char *) path, "%s %s", pci_vid, pci_did);
+ if (error)
+ continue;
_vec_len (path) = 0;
path = format (path, "/sys/bus/pci/drivers/%s/bind%c", driver_name, 0);