From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f67.google.com (mail-wm0-f67.google.com [74.125.82.67]) by dpdk.org (Postfix) with ESMTP id 328441B6FC for ; Fri, 10 Nov 2017 17:10:18 +0100 (CET) Received: by mail-wm0-f67.google.com with SMTP id b189so3686272wmd.4 for ; Fri, 10 Nov 2017 08:10:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=h6psVB8Gj+YrDiM1I3JMg6XM501iryvIvBVWfrmJkPU=; b=hmwl2n373YQRCy1Xp2dA1Mknsai/ZvlRxuYcJ72i+wqvZBGdRZIABL525IwVVDC4Xt U/L9d67vOyAIc+0tNqQBds4s9We8AjwzKICf5UPCwfTSyLlZg0lEoMeLA9ayKBjYAzCR w60xtz05Ny4UoGUZ6Fg6A69NLmpzmME3tCc0q2rlknOmSKgHo914KpqV1BtKrxD5xExl dLx5DBAfAEzQo21DjfXawntEKtqhBV88qwNvUvUfcohaQ8txt6n3R4rReqEA+VCY8IL4 rWS0V1GPJMqwB1irk7iJqxlCXvjnq92P7L4zohO7nu13VQNZgDI/qV083MkoYy55+DI5 NCjQ== 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=h6psVB8Gj+YrDiM1I3JMg6XM501iryvIvBVWfrmJkPU=; b=OxOdEWK47at1U4ff6rKs/+LxWmTM4cmnJREfGgqhPKx1lfpvWbwtRoZJsWDVTZT8Vw +2NDqD/8qOx3OWlXPuUnI0Texk9TZTMpuN5LP/qsCmKi2BDEuMIBuYFRi6EpthdPy50z 1oteaQ0Q6N+4Hqw5uMdVmetAs7EuDGIqUFAHoGyXYxbEe+ejvUny77JnyNNO1AwmX36k Yi1TUeDXtUc8YEZpZoWescCW8Niz4S/JMDe2MFkDLLOK5T4iioL7oCUjkiCK1IZ6C+1f g5QBbUDbWAsXxSlkvYp3bY+ftiwYZWm6tdd2DO5xFOfIINoP0FjN59vntjKG03xxz4vA XJ+A== X-Gm-Message-State: AJaThX6/R60R7u9g+20nAcP1kQHmzsbV8WN6Btlg7ZGGcM1uF0lKI3Zx L/TUV3j7MLf660mr4iX56QfklhdU X-Google-Smtp-Source: AGs4zMZEM3VtAY2VexRbU9F6ScAm+DIXUdv2y9RDUEPQPZkK3aNCF0D32tDp6ms6vlWdInFGakWdBA== X-Received: by 10.28.17.66 with SMTP id 63mr611336wmr.66.1510330217598; Fri, 10 Nov 2017 08:10:17 -0800 (PST) Received: from localhost ([2a00:23c5:bef3:400:4a51:b7ff:fe0b:4749]) by smtp.gmail.com with ESMTPSA id s67sm1225746wmd.23.2017.11.10.08.10.16 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Fri, 10 Nov 2017 08:10:16 -0800 (PST) From: luca.boccassi@gmail.com To: Wei Dai Cc: Lei Yao , Jingjing Wu , dpdk stable Date: Fri, 10 Nov 2017 16:09:50 +0000 Message-Id: <20171110161000.15369-6-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20171110161000.15369-1-luca.boccassi@gmail.com> References: <20171102120247.10565-18-luca.boccassi@gmail.com> <20171110161000.15369-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'net/i40e: fix VFIO interrupt mapping in VF' has been queued to LTS release 16.11.4 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: Fri, 10 Nov 2017 16:10:19 -0000 Hi, FYI, your patch has been queued to LTS release 16.11.4 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/12/17. So please shout if anyone has objections. Thanks. Kind regards, Luca Boccassi --- >>From 4eeaed0686eefed1500f0dfb2be54c3d1d77c149 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 d47265f70..424942a33 100644 --- a/drivers/net/i40e/i40e_ethdev_vf.c +++ b/drivers/net/i40e/i40e_ethdev_vf.c @@ -1504,7 +1504,6 @@ i40evf_dev_interrupt_handler(__rte_unused struct rte_intr_handle *handle, done: i40evf_enable_irq0(hw); - rte_intr_enable(&dev->pci_dev->intr_handle); } static int @@ -2155,7 +2154,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.11.0