From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 130B5A04B1 for ; Fri, 28 Aug 2020 12:13:50 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0A434A3; Fri, 28 Aug 2020 12:13:50 +0200 (CEST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by dpdk.org (Postfix) with ESMTP id B8E021C11F for ; Fri, 28 Aug 2020 12:13:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1598609628; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=4+Nf7xDB5RXE2AD7Do6To5HgJllCjyqruSrqk5vV6pI=; b=d9EF19Wnu9GQKM9Ivefvy5/9PdD22eVchg9JdJvdJaFdMtWY17gHKnQA+bzVdWE0viPYbi vZZ2xmapHwBfMH5BSBK/aP6RykQoS4SoJk4KGeSc/Szd6snkhihZVxYJBFty645aPU81wn zNOdcfZKRuDRQfJuKZvm7wYJ/voIuK0= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-172-RzFpumu5Ol2BWhZfkXF5hg-1; Fri, 28 Aug 2020 06:13:44 -0400 X-MC-Unique: RzFpumu5Ol2BWhZfkXF5hg-1 Received: from smtp.corp.redhat.com (int-mx08.intmail.prod.int.phx2.redhat.com [10.5.11.23]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 302251DDFF; Fri, 28 Aug 2020 10:13:43 +0000 (UTC) Received: from rh.redhat.com (unknown [10.33.36.20]) by smtp.corp.redhat.com (Postfix) with ESMTP id 255AD19D7D; Fri, 28 Aug 2020 10:13:41 +0000 (UTC) From: Kevin Traynor To: Chenmin Sun Cc: Beilei Xing , dpdk stable Date: Fri, 28 Aug 2020 11:12:33 +0100 Message-Id: <20200828101308.223767-7-ktraynor@redhat.com> In-Reply-To: <20200828101308.223767-1-ktraynor@redhat.com> References: <20200828101308.223767-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.84 on 10.5.11.23 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=ktraynor@redhat.com X-Mimecast-Spam-Score: 0.001 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/i40e: fix flow director Rx writeback packet' has been queued to LTS release 18.11.10 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: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to LTS release 18.11.10 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 09/02/20. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/kevintraynor/dpdk-stable-queue This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable-queue/commit/36020ac03f4597ce2f4f4d697940fce805b08cb0 Thanks. Kevin. --- >From 36020ac03f4597ce2f4f4d697940fce805b08cb0 Mon Sep 17 00:00:00 2001 From: Chenmin Sun Date: Fri, 17 Jul 2020 22:57:58 +0800 Subject: [PATCH] net/i40e: fix flow director Rx writeback packet [ upstream commit ae6575409ff5609e44d53e1c3014ae77105e8610 ] This patch fixes the fdir cannot receive rx writeback packet issue. The root cause is FDIR interrupt is not correctly enabled. Beside this, to make sure fdir programming works fine when the port is stopped, move the fdir interrupt configure from start/stop to setup/teardown. Fixes: cfd662d22e7b ("net/i40e: fix interrupt throttling setting in PF") Signed-off-by: Chenmin Sun Acked-by: Beilei Xing --- drivers/net/i40e/i40e_ethdev.c | 15 ++------------- drivers/net/i40e/i40e_ethdev.h | 2 ++ drivers/net/i40e/i40e_fdir.c | 11 +++++++++++ 3 files changed, 15 insertions(+), 13 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 98c752bc4e..759fc76c85 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -2046,5 +2046,5 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx) } -static void +void i40e_vsi_enable_queues_intr(struct i40e_vsi *vsi) { @@ -2073,5 +2073,5 @@ i40e_vsi_enable_queues_intr(struct i40e_vsi *vsi) } -static void +void i40e_vsi_disable_queues_intr(struct i40e_vsi *vsi) { @@ -2298,11 +2298,4 @@ i40e_dev_start(struct rte_eth_dev *dev) } - /* enable FDIR MSIX interrupt */ - if (pf->fdir.fdir_vsi) { - i40e_vsi_queues_bind_intr(pf->fdir.fdir_vsi, - I40E_ITR_INDEX_NONE); - i40e_vsi_enable_queues_intr(pf->fdir.fdir_vsi); - } - /* Enable all queues which have been configured */ for (nb_rxq = 0; nb_rxq < dev->data->nb_rx_queues; nb_rxq++) { @@ -2440,8 +2433,4 @@ i40e_dev_stop(struct rte_eth_dev *dev) } - if (pf->fdir.fdir_vsi) { - i40e_vsi_queues_unbind_intr(pf->fdir.fdir_vsi); - i40e_vsi_disable_queues_intr(pf->fdir.fdir_vsi); - } /* Clear all queues and release memory */ i40e_dev_clear_queues(dev); diff --git a/drivers/net/i40e/i40e_ethdev.h b/drivers/net/i40e/i40e_ethdev.h index 930eb9abaf..2ebbe84782 100644 --- a/drivers/net/i40e/i40e_ethdev.h +++ b/drivers/net/i40e/i40e_ethdev.h @@ -1140,4 +1140,5 @@ int i40e_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete); void i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx); void i40e_vsi_queues_unbind_intr(struct i40e_vsi *vsi); +void i40e_vsi_disable_queues_intr(struct i40e_vsi *vsi); int i40e_vsi_vlan_pvid_set(struct i40e_vsi *vsi, struct i40e_vsi_vlan_pvid_info *info); @@ -1149,4 +1150,5 @@ enum i40e_status_code i40e_fdir_setup_tx_resources(struct i40e_pf *pf); enum i40e_status_code i40e_fdir_setup_rx_resources(struct i40e_pf *pf); int i40e_fdir_setup(struct i40e_pf *pf); +void i40e_vsi_enable_queues_intr(struct i40e_vsi *vsi); const struct rte_memzone *i40e_memzone_reserve(const char *name, uint32_t len, diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index d41601a176..35be846fbd 100644 --- a/drivers/net/i40e/i40e_fdir.c +++ b/drivers/net/i40e/i40e_fdir.c @@ -223,4 +223,9 @@ i40e_fdir_setup(struct i40e_pf *pf) } + /* enable FDIR MSIX interrupt */ + vsi->nb_used_qps = 1; + i40e_vsi_queues_bind_intr(vsi, I40E_ITR_INDEX_NONE); + i40e_vsi_enable_queues_intr(vsi); + /* reserve memory for the fdir programming packet */ snprintf(z_name, sizeof(z_name), "%s_%s_%d", @@ -268,4 +273,9 @@ i40e_fdir_teardown(struct i40e_pf *pf) if (!vsi) return; + + /* disable FDIR MSIX interrupt */ + i40e_vsi_queues_unbind_intr(vsi); + i40e_vsi_disable_queues_intr(vsi); + int err = i40e_switch_tx_queue(hw, vsi->base_queue, FALSE); if (err) @@ -274,4 +284,5 @@ i40e_fdir_teardown(struct i40e_pf *pf) if (err) PMD_DRV_LOG(DEBUG, "Failed to do FDIR RX switch off"); + i40e_dev_rx_queue_release(pf->fdir.rxq); pf->fdir.rxq = NULL; -- 2.26.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-08-28 11:03:26.138189213 +0100 +++ 0007-net-i40e-fix-flow-director-Rx-writeback-packet.patch 2020-08-28 11:03:25.916955405 +0100 @@ -1 +1 @@ -From ae6575409ff5609e44d53e1c3014ae77105e8610 Mon Sep 17 00:00:00 2001 +From 36020ac03f4597ce2f4f4d697940fce805b08cb0 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit ae6575409ff5609e44d53e1c3014ae77105e8610 ] + @@ -14 +15,0 @@ -Cc: stable@dpdk.org @@ -25 +26 @@ -index 6901643204..05d5f28615 100644 +index 98c752bc4e..759fc76c85 100644 @@ -28 +29 @@ -@@ -2185,5 +2185,5 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx) +@@ -2046,5 +2046,5 @@ i40e_vsi_queues_bind_intr(struct i40e_vsi *vsi, uint16_t itr_idx) @@ -35 +36 @@ -@@ -2212,5 +2212,5 @@ i40e_vsi_enable_queues_intr(struct i40e_vsi *vsi) +@@ -2073,5 +2073,5 @@ i40e_vsi_enable_queues_intr(struct i40e_vsi *vsi) @@ -42 +43 @@ -@@ -2434,11 +2434,4 @@ i40e_dev_start(struct rte_eth_dev *dev) +@@ -2298,11 +2298,4 @@ i40e_dev_start(struct rte_eth_dev *dev) @@ -54 +55 @@ -@@ -2576,8 +2569,4 @@ i40e_dev_stop(struct rte_eth_dev *dev) +@@ -2440,8 +2433,4 @@ i40e_dev_stop(struct rte_eth_dev *dev) @@ -64 +65 @@ -index d3bda02724..aef88abed0 100644 +index 930eb9abaf..2ebbe84782 100644 @@ -67 +68 @@ -@@ -1322,4 +1322,5 @@ int i40e_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete); +@@ -1140,4 +1140,5 @@ int i40e_dev_link_update(struct rte_eth_dev *dev, int wait_to_complete); @@ -73 +74 @@ -@@ -1331,4 +1332,5 @@ enum i40e_status_code i40e_fdir_setup_tx_resources(struct i40e_pf *pf); +@@ -1149,4 +1150,5 @@ enum i40e_status_code i40e_fdir_setup_tx_resources(struct i40e_pf *pf); @@ -80 +81 @@ -index 9998e5d4f0..8e87b4a009 100644 +index d41601a176..35be846fbd 100644 @@ -83 +84 @@ -@@ -232,4 +232,9 @@ i40e_fdir_setup(struct i40e_pf *pf) +@@ -223,4 +223,9 @@ i40e_fdir_setup(struct i40e_pf *pf) @@ -93 +94 @@ -@@ -288,4 +293,9 @@ i40e_fdir_teardown(struct i40e_pf *pf) +@@ -268,4 +273,9 @@ i40e_fdir_teardown(struct i40e_pf *pf) @@ -103 +104 @@ -@@ -294,4 +304,5 @@ i40e_fdir_teardown(struct i40e_pf *pf) +@@ -274,4 +284,5 @@ i40e_fdir_teardown(struct i40e_pf *pf) @@ -108 +109 @@ - rte_eth_dma_zone_free(dev, "fdir_rx_ring", pf->fdir.rxq->queue_id); + pf->fdir.rxq = NULL;