From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f196.google.com (mail-wr0-f196.google.com [209.85.128.196]) by dpdk.org (Postfix) with ESMTP id AEFB81B343 for ; Sun, 11 Feb 2018 13:49:34 +0100 (CET) Received: by mail-wr0-f196.google.com with SMTP id y3so12549823wrh.3 for ; Sun, 11 Feb 2018 04:49:34 -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=9XmQorwwgEGnure/fc5VJWLp/eqI5h6k5Xb3fG+d3tU=; b=i/7OIzcUPZbtiMzDnEWOL72br2LzC9/iNT28q/L1ZgE9o9t1JTtVZ0xW+rus1XxaW/ sD6ConmyL+HgKuuLBqakuuubayJDsrKylAp3rlbkUzk5Zyn3fjY249JnstZ6bzL/R/IA Ul5339XLd0+MZWwDAh9Cfa0Z7oLOzXR4+m8apY+Vn58760ki8PFiLHJhFkfIqKurGW35 tt1uzdmPn42KrLH8n99GSMeNe3ss8I343DPP+ntjRr9o6pzQXfhlvDVvRds1mAQzhYbx ADXVXiBolO5lUPMYapHotYVoh5d8wJyFT945uBLk1riaP1xBKXRMnTnNRqmL+Ehpfhi9 IN3g== X-Gm-Message-State: APf1xPC861GvWqbPstIg4SZN1N4sp9uYIBf2fEtQVwBlGpFeXyqeUUeX X7nK23zcZwaXnRgpX08+OmM= X-Google-Smtp-Source: AH8x226Ydifg3+zOWGfqvCDEh77ToIGRaFa4ZFTCDZbAf8sxHwcFQgHt8KP5Aoj4SAzvzo5y5RzMhA== X-Received: by 10.223.197.200 with SMTP id v8mr6667835wrg.22.1518353374384; Sun, 11 Feb 2018 04:49:34 -0800 (PST) Received: from localhost ([2a00:23c5:bef3:400:9531:588b:44ae:bec4]) by smtp.gmail.com with ESMTPSA id y64sm3113569wmg.35.2018.02.11.04.49.33 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 11 Feb 2018 04:49:33 -0800 (PST) From: Luca Boccassi To: Nicolas Dichtel Cc: David Marchand , Ferruh Yigit , dpdk stable Date: Sun, 11 Feb 2018 12:49:09 +0000 Message-Id: <20180211124911.14557-2-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: switch to new irq function for MSI-X' 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:34 -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 d797ceba4ae934c11694ed3495604e55339cff30 Mon Sep 17 00:00:00 2001 From: Nicolas Dichtel Date: Thu, 20 Apr 2017 15:11:23 +0200 Subject: [PATCH] igb_uio: switch to new irq function for MSI-X [ backported from upstream commit 99bb58f3adc73046b538874a0944578146ee1189 ] pci_enable_msix() will be removed in kernel 4.12. The new API pci_alloc_irq_vectors() is available since linux 4.8, thus let's use it. Link: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=aff171641d18 Link: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git/commit/?id=4244de1c64de Signed-off-by: Nicolas Dichtel Reviewed-by: David Marchand Acked-by: Ferruh Yigit --- lib/librte_eal/linuxapp/igb_uio/compat.h | 4 ++++ lib/librte_eal/linuxapp/igb_uio/igb_uio.c | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/lib/librte_eal/linuxapp/igb_uio/compat.h b/lib/librte_eal/linuxapp/igb_uio/compat.h index 0d781e482..b800a53cd 100644 --- a/lib/librte_eal/linuxapp/igb_uio/compat.h +++ b/lib/librte_eal/linuxapp/igb_uio/compat.h @@ -123,3 +123,7 @@ 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 +#endif diff --git a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c index df41e457a..683cd8cf1 100644 --- a/lib/librte_eal/linuxapp/igb_uio/igb_uio.c +++ b/lib/librte_eal/linuxapp/igb_uio/igb_uio.c @@ -325,7 +325,9 @@ 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 struct msix_entry msix_entry; +#endif int err; udev = kzalloc(sizeof(struct rte_uio_pci_dev), GFP_KERNEL); @@ -379,6 +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 msix_entry.entry = 0; if (pci_enable_msix(dev, &msix_entry, 1) == 0) { dev_dbg(&dev->dev, "using MSI-X"); @@ -386,6 +389,14 @@ igbuio_pci_probe(struct pci_dev *dev, const struct pci_device_id *id) udev->mode = RTE_INTR_MODE_MSIX; break; } +#else + if (pci_alloc_irq_vectors(dev, 1, 1, PCI_IRQ_MSIX) == 1) { + dev_dbg(&dev->dev, "using MSI-X"); + udev->info.irq = pci_irq_vector(dev, 0); + udev->mode = RTE_INTR_MODE_MSIX; + break; + } +#endif /* fall back to INTX */ case RTE_INTR_MODE_LEGACY: if (pci_intx_mask_supported(dev)) { -- 2.14.2