Patch Detail
get:
Show a patch.
patch:
Update a patch.
put:
Update a patch.
GET /api/patches/28331/?format=api
http://patches.dpdk.org/api/patches/28331/?format=api", "web_url": "http://patches.dpdk.org/project/dpdk/patch/1504549066-11067-2-git-send-email-markus.theil@tu-ilmenau.de/", "project": { "id": 1, "url": "http://patches.dpdk.org/api/projects/1/?format=api", "name": "DPDK", "link_name": "dpdk", "list_id": "dev.dpdk.org", "list_email": "dev@dpdk.org", "web_url": "http://core.dpdk.org", "scm_url": "git://dpdk.org/dpdk", "webscm_url": "http://git.dpdk.org/dpdk", "list_archive_url": "https://inbox.dpdk.org/dev", "list_archive_url_format": "https://inbox.dpdk.org/dev/{}", "commit_url_format": "" }, "msgid": "<1504549066-11067-2-git-send-email-markus.theil@tu-ilmenau.de>", "list_archive_url": "https://inbox.dpdk.org/dev/1504549066-11067-2-git-send-email-markus.theil@tu-ilmenau.de", "date": "2017-09-04T18:17:43", "name": "[dpdk-dev,v6,2/5] igb_uio: fix irq disable on recent kernels", "commit_ref": null, "pull_url": null, "state": "superseded", "archived": true, "hash": "de21ba5ca40d2e155ab6901a4ece418112af4ba0", "submitter": { "id": 747, "url": "http://patches.dpdk.org/api/people/747/?format=api", "name": "Markus Theil", "email": "markus.theil@tu-ilmenau.de" }, "delegate": null, "mbox": "http://patches.dpdk.org/project/dpdk/patch/1504549066-11067-2-git-send-email-markus.theil@tu-ilmenau.de/mbox/", "series": [], "comments": "http://patches.dpdk.org/api/patches/28331/comments/", "check": "warning", "checks": "http://patches.dpdk.org/api/patches/28331/checks/", "tags": {}, "related": [], "headers": { "Return-Path": "<dev-bounces@dpdk.org>", "X-Original-To": "patchwork@dpdk.org", "Delivered-To": "patchwork@dpdk.org", "Received": [ "from [92.243.14.124] (localhost [IPv6:::1])\n\tby dpdk.org (Postfix) with ESMTP id 83B077D00;\n\tMon, 4 Sep 2017 20:18:05 +0200 (CEST)", "from smail.rz.tu-ilmenau.de (smail.rz.tu-ilmenau.de\n\t[141.24.186.67]) by dpdk.org (Postfix) with ESMTP id 6ADEA5A6E\n\tfor <dev@dpdk.org>; Mon, 4 Sep 2017 20:18:03 +0200 (CEST)", "from thunderstorm.prakinf.tu-ilmenau.de\n\t(thunderstorm.prakinf.tu-ilmenau.de [141.24.212.108])\n\tby smail.rz.tu-ilmenau.de (Postfix) with ESMTPA id F1EBB58005E;\n\tMon, 4 Sep 2017 20:18:02 +0200 (CEST)" ], "From": "Markus Theil <markus.theil@tu-ilmenau.de>", "To": "dev@dpdk.org", "Cc": "ferruh.yigit@intel.com, stephen@networkplumber.org,\n\tMarkus Theil <markus.theil@tu-ilmenau.de>, nicolas.dichtel@6wind.com", "Date": "Mon, 4 Sep 2017 20:17:43 +0200", "Message-Id": "<1504549066-11067-2-git-send-email-markus.theil@tu-ilmenau.de>", "X-Mailer": "git-send-email 2.7.4", "In-Reply-To": "<1504549066-11067-1-git-send-email-markus.theil@tu-ilmenau.de>", "References": "<1503336825-7700-1-git-send-email-markus.theil@tu-ilmenau.de>\n\t<1504549066-11067-1-git-send-email-markus.theil@tu-ilmenau.de>", "Subject": "[dpdk-dev] [PATCH v6 2/5] igb_uio: fix irq disable on recent kernels", "X-BeenThere": "dev@dpdk.org", "X-Mailman-Version": "2.1.15", "Precedence": "list", "List-Id": "DPDK patches and discussions <dev.dpdk.org>", "List-Unsubscribe": "<http://dpdk.org/ml/options/dev>,\n\t<mailto:dev-request@dpdk.org?subject=unsubscribe>", "List-Archive": "<http://dpdk.org/ml/archives/dev/>", "List-Post": "<mailto:dev@dpdk.org>", "List-Help": "<mailto:dev-request@dpdk.org?subject=help>", "List-Subscribe": "<http://dpdk.org/ml/listinfo/dev>,\n\t<mailto:dev-request@dpdk.org?subject=subscribe>", "Errors-To": "dev-bounces@dpdk.org", "Sender": "\"dev\" <dev-bounces@dpdk.org>" }, "content": "igb_uio already allocates irqs using pci_alloc_irq_vectors on\nrecent kernels >= 4.8. The interrupt disable code was not\nusing the corresponding pci_free_irq_vectors, but the also\ndeprecated pci_disable_msix, before this fix.\n\nFixes: 99bb58f3adc7 (\"igb_uio: switch to new irq function for MSI-X\")\nCc: nicolas.dichtel@6wind.com\n\nSigned-off-by: Markus Theil <markus.theil@tu-ilmenau.de>\n---\n lib/librte_eal/linuxapp/igb_uio/compat.h | 4 ++--\n lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 11 ++++++++---\n 2 files changed, 10 insertions(+), 5 deletions(-)", "diff": "diff --git a/lib/librte_eal/linuxapp/igb_uio/compat.h b/lib/librte_eal/linuxapp/igb_uio/compat.h\nindex b800a53..3825933 100644\n--- a/lib/librte_eal/linuxapp/igb_uio/compat.h\n+++ b/lib/librte_eal/linuxapp/igb_uio/compat.h\n@@ -124,6 +124,6 @@ static bool pci_check_and_mask_intx(struct pci_dev *pdev)\n \n #endif /* < 3.3.0 */\n \n-#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0)\n-#define HAVE_PCI_ENABLE_MSIX\n+#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0)\n+#define HAVE_ALLOC_IRQ_VECTORS 1\n #endif\ndiff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c\nindex e2e9263..9bb74b2 100644\n--- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c\n+++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c\n@@ -312,18 +312,17 @@ static int\n igbuio_pci_enable_interrupts(struct rte_uio_pci_dev *udev)\n {\n \tint err = 0;\n-#ifdef HAVE_PCI_ENABLE_MSIX\n+#ifndef HAVE_ALLOC_IRQ_VECTORS\n \tstruct msix_entry msix_entry;\n #endif\n \n \tswitch (igbuio_intr_mode_preferred) {\n \tcase RTE_INTR_MODE_MSIX:\n \t\t/* Only 1 msi-x vector needed */\n-#ifdef HAVE_PCI_ENABLE_MSIX\n+#ifndef HAVE_ALLOC_IRQ_VECTORS\n \t\tmsix_entry.entry = 0;\n \t\tif (pci_enable_msix(udev->pdev, &msix_entry, 1) == 0) {\n \t\t\tdev_dbg(&udev->pdev->dev, \"using MSI-X\");\n-\t\t\tudev->info.irq_flags = IRQF_NO_THREAD;\n \t\t\tudev->info.irq = msix_entry.vector;\n \t\t\tudev->mode = RTE_INTR_MODE_MSIX;\n \t\t\tbreak;\n@@ -331,6 +330,7 @@ igbuio_pci_enable_interrupts(struct rte_uio_pci_dev *udev)\n #else\n \t\tif (pci_alloc_irq_vectors(udev->pdev, 1, 1, PCI_IRQ_MSIX) == 1) {\n \t\t\tdev_dbg(&udev->pdev->dev, \"using MSI-X\");\n+\t\t\tudev->info.irq_flags = IRQF_NO_THREAD;\n \t\t\tudev->info.irq = pci_irq_vector(udev->pdev, 0);\n \t\t\tudev->mode = RTE_INTR_MODE_MSIX;\n \t\t\tbreak;\n@@ -364,8 +364,13 @@ igbuio_pci_enable_interrupts(struct rte_uio_pci_dev *udev)\n static void\n igbuio_pci_disable_interrupts(struct rte_uio_pci_dev *udev)\n {\n+#ifndef HAVE_ALLOC_IRQ_VECTORS\n \tif (udev->mode == RTE_INTR_MODE_MSIX)\n \t\tpci_disable_msix(udev->pdev);\n+#else\n+\tif (udev->mode == RTE_INTR_MODE_MSIX)\n+\t\tpci_free_irq_vectors(udev->pdev);\n+#endif\n }\n \n static int\n", "prefixes": [ "dpdk-dev", "v6", "2/5" ] }{ "id": 28331, "url": "