From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f195.google.com (mail-wr0-f195.google.com [209.85.128.195]) by dpdk.org (Postfix) with ESMTP id B6D321B343 for ; Sun, 11 Feb 2018 13:49:43 +0100 (CET) Received: by mail-wr0-f195.google.com with SMTP id q11so765956wre.8 for ; Sun, 11 Feb 2018 04:49:43 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=i/C5ZS1RYiycU1Ogwk3+mtxeGdZOXENvR1BqsT7R5N0=; b=UcGCvfU/42qgmacoRRxIXzGcJgACLvG3ZOFBXQYDSzkmz8wDxLtYwi6p2jdO2f6QNH 3EfoUjwo2FAnRdR4/UwIlzwmZcLPYe+njZeMg8m9VI/GMBAoIWNAt0dNPi6XGmh2oJpZ +ETAoFe9hsQDMlmzqU51EvAIw5Z8shTSLlTQEkHpau5yuuk8ZuGxxxPgkq49SAWzTA4I qdzc3YGfI3CsI4RyETFKkaiNNsIrewootrL1K2wxzgegJaeWVCvFHa9C+2mCtaCitH0h e8LXneKOHPdUI6oCCsOib1wwblx8UcJIctj/6NVEcNBw86LjMr5UCAzE5iw1Fyx3qXNk P8lA== X-Gm-Message-State: APf1xPBfTWM69JC7Wfwa/pR9fPB/flzAkbiABraEH2ZSyxSRuyuo30+E z0rcWTtV2P+DWTtpYdS3mhOAfjtL X-Google-Smtp-Source: AH8x224RHJiqLgUFV6TTeo/BBmTFBPvkIXWwFyh9RIZG9pXkywnd4iRUagCkmKMQZk4kq0GDgvL5qw== X-Received: by 10.223.144.163 with SMTP id i32mr7845322wri.73.1518353383438; Sun, 11 Feb 2018 04:49:43 -0800 (PST) Received: from localhost ([2a00:23c5:bef3:400:9531:588b:44ae:bec4]) by smtp.gmail.com with ESMTPSA id t141sm5805460wmd.34.2018.02.11.04.49.42 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 11 Feb 2018 04:49:42 -0800 (PST) From: Luca Boccassi To: Markus Theil Cc: Ferruh Yigit , dpdk stable Date: Sun, 11 Feb 2018 12:49:10 +0000 Message-Id: <20180211124911.14557-3-bluca@debian.org> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180211124911.14557-1-bluca@debian.org> References: <20180209104031.23195-2-bluca@debian.org> <20180211124911.14557-1-bluca@debian.org> Subject: [dpdk-stable] patch 'igb_uio: fix IRQ disable on recent kernels' has been queued to LTS release 16.11.5 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Feb 2018 12:49:43 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.5 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/13/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From 530abc0cd524403d081fa19540ab778c320eb37f Mon Sep 17 00:00:00 2001 From: Markus Theil Date: Tue, 5 Sep 2017 14:04:02 +0200 Subject: [PATCH] igb_uio: fix IRQ disable on recent kernels [ backported from upstream commit 9838673e32fd0af4aa03f4d230ba9be318b4f9d7 ] igb_uio already allocates irqs using pci_alloc_irq_vectors on recent kernels >= 4.8. The interrupt disable code was not using the corresponding pci_free_irq_vectors, but the also deprecated pci_disable_msix, before this fix. Fixes: 99bb58f3adc7 ("igb_uio: switch to new irq function for MSI-X") Cc: stable@dpdk.org Signed-off-by: Markus Theil Acked-by: Ferruh Yigit --- lib/librte_eal/linuxapp/igb_uio/compat.h | 4 ++-- lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/lib/librte_eal/linuxapp/igb_uio/compat.h b/lib/librte_eal/linuxapp/igb_uio/compat.h index b800a53cd..38259330c 100644 --- a/lib/librte_eal/linuxapp/igb_uio/compat.h +++ b/lib/librte_eal/linuxapp/igb_uio/compat.h @@ -124,6 +124,6 @@ static bool pci_check_and_mask_intx(struct pci_dev *pdev) #endif /* < 3.3.0 */ -#if LINUX_VERSION_CODE < KERNEL_VERSION(4, 8, 0) -#define HAVE_PCI_ENABLE_MSIX +#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 8, 0) +#define HAVE_ALLOC_IRQ_VECTORS 1 #endif diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c index 683cd8cf1..b6406d861 100644 --- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c +++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c @@ -325,7 +325,7 @@ static int igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) { struct rte_uio_pci_dev *udev; -#ifdef HAVE_PCI_ENABLE_MSIX +#ifndef HAVE_ALLOC_IRQ_VECTORS struct msix_entry msix_entry; #endif int err; @@ -381,7 +381,7 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) switch (igbuio_intr_mode_preferred) { case RTE_INTR_MODE_MSIX: /* Only 1 msi-x vector needed */ -#ifdef HAVE_PCI_ENABLE_MSIX +#ifndef HAVE_ALLOC_IRQ_VECTORS msix_entry.entry = 0; if (pci_enable_msix(dev, &msix_entry, 1) == 0) { dev_dbg(&dev->dev, "using MSI-X"); @@ -440,8 +440,13 @@ fail_remove_group: sysfs_remove_group(&dev->dev.kobj, &dev_attr_grp); fail_release_iomem: igbuio_pci_release_iomem(&udev->info); +#ifndef HAVE_ALLOC_IRQ_VECTORS if (udev->mode == RTE_INTR_MODE_MSIX) pci_disable_msix(udev->pdev); +#else + if (udev->mode == RTE_INTR_MODE_MSIX) + pci_free_irq_vectors(udev->pdev); +#endif pci_disable_device(dev); fail_free: kfree(udev); @@ -457,8 +462,13 @@ igbuio_pci_remove(struct pci_dev *dev) sysfs_remove_group(&dev->dev.kobj, &dev_attr_grp); uio_unregister_device(&udev->info); igbuio_pci_release_iomem(&udev->info); +#ifndef HAVE_ALLOC_IRQ_VECTORS if (udev->mode == RTE_INTR_MODE_MSIX) pci_disable_msix(dev); +#else + if (udev->mode == RTE_INTR_MODE_MSIX) + pci_free_irq_vectors(dev); +#endif pci_disable_device(dev); pci_set_drvdata(dev, NULL); kfree(udev); -- 2.14.2