From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by dpdk.org (Postfix) with ESMTP id 0A586236 for ; Tue, 21 Nov 2017 14:30:56 +0100 (CET) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id B335020ACE; Tue, 21 Nov 2017 08:30:55 -0500 (EST) Received: from frontend2 ([10.202.2.161]) by compute1.internal (MEProxy); Tue, 21 Nov 2017 08:30:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fridaylinux.org; h=cc:date:from:in-reply-to:message-id:references:subject:to :x-me-sender:x-me-sender:x-sasl-enc; s=fm1; bh=qiAN+MagpJ9b6oc8N t5nWU2Ey9bwvZVx8QtpZIEUpG4=; b=daWFHGHY2+Weq9HbP+0x0kujvSsdBLajI inLwd55ViS+OyrA4iCRngjgrauv0tJR2TsJLlEhwytTbcLnrVUUXr303xy4njp1y OijUaROuvTHfOx7QxVW3G+aGqxiQ1CA1roIyn3WJxqyPK/sLQU4pV8TaKt81wEHe 3xirxjD8P2+diaIr4AXzqwXtnGaHHwHF19b4IlYN/LqzmDHQOoDJet9YqzGtOxOa TvLQiYF7KDg0s+wex+SrrnJzL949PHX3ZJuQVqmhMxB7qyAniR5YAswXjsD5Rink 8x0FLDPzj/3tsSE3jvQNHWqGFCUOWgqMmlyc+ysT6Gowup/OjBPOg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:date:from:in-reply-to:message-id :references:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=qiAN+MagpJ9b6oc8Nt5nWU2Ey9bwvZVx8QtpZIEUpG4=; b=GUqY2OG+ 1FUjay+WIf7LF5QASl88nMoafTTHlZ/XLFwbnIkrHGcHTBwC91kqYwqwVkot+MCM PpIHz5us5mYJ1sNYjvcfmpQmUC3sz4IrDnVytAw0nMYnoOWGn7hnPQbg8etz729F gKc0uuQsTV/GKM3nGmiHC7CvWkmVeeEYTxRE+l3mE0c6Xa1cdkf9gwG2LQmSMyt9 G9dYf2D3Rf95lcSNWVsQa+50D+sC1uc2ZOT4oWG10NiGduCjnzy7tO5yoCt8z2Gw z/ur/mSMgge2gkbDqWpaWdBcSq7RJfGGyLEAT71jpSwOrRblKqDPT+BXTayiLpf1 lvFKolCwMbdSSw== X-ME-Sender: Received: from localhost.localdomain (unknown [180.158.62.0]) by mail.messagingengine.com (Postfix) with ESMTPA id 5B12324B9C; Tue, 21 Nov 2017 08:30:50 -0500 (EST) From: Yuanhan Liu To: Wei Dai Cc: Lei Yao , Jingjing Wu , dpdk stable Date: Tue, 21 Nov 2017 21:18:41 +0800 Message-Id: <1511270333-31002-179-git-send-email-yliu@fridaylinux.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1511270333-31002-1-git-send-email-yliu@fridaylinux.org> References: <1511270333-31002-1-git-send-email-yliu@fridaylinux.org> Subject: [dpdk-stable] patch 'net/i40e: fix VFIO interrupt mapping in VF' has been queued to stable release 17.08.1 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: Tue, 21 Nov 2017 13:30:56 -0000 Hi, FYI, your patch has been queued to stable release 17.08.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 11/24/17. So please shout if anyone has objections. Thanks. --yliu --- >>From 92b91537df0f4e70b44b7a02d01e8fdba0528a37 Mon Sep 17 00:00:00 2001 From: Wei Dai Date: Fri, 3 Nov 2017 16:47:29 +0800 Subject: [PATCH] net/i40e: fix VFIO interrupt mapping in VF [ upstream commit 66b8304f9d5f8be5dccd169a7ced4fb6c058b488 ] When a VF port is bound to VFIO-PIC, only miscellaneous interrupt is mapped to VFIO vector 0 in i40evf_dev_init( ). In i40evf_dev_interrupt_handle( ) and i40evf_dev_rx_queue_intr_enable( ), if previous VFIO interrupt mapping set in i40evf_dev_init( ) is not cleared, it will fail when PMD tries to map Rx queue interrupt to other VFIO vectors by calling rte_intr_enable( ). This patch clears the VFIO interrupt mappings before setting both miscellaneous and Rx queue interrupt mappings again to avoid failure. And remove the calling of rte_intr_enable( ) in i40evf_dev_interrupt_handler( ) as there is no need to map VFIO interrupt in this function repeatedly. Fixes: 4b90a3ff26c5 ("i40evf: support Rx interrupt") Signed-off-by: Wei Dai Tested-by: Lei Yao Acked-by: Jingjing Wu --- drivers/net/i40e/i40e_ethdev_vf.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/i40e_ethdev_vf.c b/drivers/net/i40e/i40e_ethdev_vf.c index 616829a..06622bc 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -1565,7 +1565,6 @@ i40evf_dev_interrupt_handler(void *param) done: i40evf_enable_irq0(hw); - rte_intr_enable(dev->intr_handle); } static int @@ -2230,7 +2229,20 @@ i40evf_dev_start(struct rte_eth_dev *dev) goto err_mac; } + /* When a VF port is bound to VFIO-PCI, only miscellaneous interrupt + * is mapped to VFIO vector 0 in i40evf_dev_init( ). + * If previous VFIO interrupt mapping set in i40evf_dev_init( ) is + * not cleared, it will fail when rte_intr_enable( ) tries to map Rx + * queue interrupt to other VFIO vectors. + * So clear uio/vfio intr/evevnfd first to avoid failure. + */ + if (dev->data->dev_conf.intr_conf.rxq != 0) { + rte_intr_disable(intr_handle); + rte_intr_enable(intr_handle); + } + i40evf_enable_queues_intr(dev); + return 0; err_mac: -- 2.7.4