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 72EE5A04DD for ; Wed, 28 Oct 2020 11:48:25 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 6AA912C2A; Wed, 28 Oct 2020 11:48:24 +0100 (CET) Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by dpdk.org (Postfix) with ESMTP id 5FACF2C2A for ; Wed, 28 Oct 2020 11:48:22 +0100 (CET) Received: by mail-wr1-f66.google.com with SMTP id m13so870588wrj.7 for ; Wed, 28 Oct 2020 03:48:22 -0700 (PDT) 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 :mime-version:content-transfer-encoding; bh=4aZ4LVVu1yxuxah8rCMMqqM4KJtnAbuWgykG2zdq1/g=; b=jLUGfx+ZL1uKVJWdHIm4aH1O1JZySVdWH0D0ENSpPKXBQcfR0cz4RUYR8T+n8mRL7O MKPpx2S4oSeO6LSHYMFxunhv+QLcnLpONeFPwZm7oxNbCWDCDz4S2KR6bo7O8GxcIXeR STJb7VyrkRPREsFrDiyRx3xiaveuQwqoo/iSOdmbbSBqqLQk5kTieFURpeVmlkc6wuHR 62LVLPlkO4mDqS1gQAYEsMIONa7eHdwx4JC6QoRQUXKGNghWMq2JZLs0CwiqympSIGv3 IpQLMA3SV6IYDUaVDbIIDC+XWycniAyDgB/RoVosfbUSVOUZw1vYgs7ZowXsKlJ1Yzav ltZw== 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:mime-version:content-transfer-encoding; bh=4aZ4LVVu1yxuxah8rCMMqqM4KJtnAbuWgykG2zdq1/g=; b=ZXDxjcpftlMCvimDyje19wlBPOaDVJGCYiNtj8My7Mkl8WFYR1UrAwL5Ep43O98gQG +22g5Y4+16xhAI1yzwpMVboStSXBONgjKEl/nqpsM7eCZ9yIgQFob4uRLnapA4AIHag0 1nN++egE9FNubzcnfti8reC36VllXP+qQs9GNYZSAPU56G9onPsoVglcAbg8pCvCJ96H zjDTJooTphMcTwj7/OfYmf3kgahv4yH4cnxNce5bVkOcX9r9NYWfhkhKgkXdUHRZUk0r en+ADgac75KNPBo5QxFds/uAa7mKDQq0yQ4Ztt8xyB/mNg6myB5iTFRkiJ1jOyXf8H0V czDg== X-Gm-Message-State: AOAM532B8WstjmmF1XL/NKsBCdrjhjI4hpR13DCEQxyMlJTOmBk2hiPr OSTpxAFsnet0493dYc1n/i4= X-Google-Smtp-Source: ABdhPJzzeFDJuS1HRj9ayXoTACuuyVreJy5R0eJuUHv5Tgy16RRo/vO44CgNHycEboYzadRCNq77Ow== X-Received: by 2002:a5d:5612:: with SMTP id l18mr8556550wrv.372.1603882101124; Wed, 28 Oct 2020 03:48:21 -0700 (PDT) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id i14sm5667248wml.24.2020.10.28.03.48.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 28 Oct 2020 03:48:20 -0700 (PDT) From: luca.boccassi@gmail.com To: Guinan Sun Cc: Qi Zhang , dpdk stable Date: Wed, 28 Oct 2020 10:43:20 +0000 Message-Id: <20201028104606.3504127-41-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20201028104606.3504127-1-luca.boccassi@gmail.com> References: <20201028104606.3504127-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/i40e: fix recreating flexible flow director rule' has been queued to stable release 19.11.6 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 stable release 19.11.6 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 10/30/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. Thanks. Luca Boccassi --- >From 1ed7d60cd9c8f3f0f29947ad2eb47496ec630069 Mon Sep 17 00:00:00 2001 From: Guinan Sun Date: Tue, 15 Sep 2020 06:52:25 +0000 Subject: [PATCH] net/i40e: fix recreating flexible flow director rule [ upstream commit 0acf70d473072fd77b667a0419f8b9ab70b35b39 ] This patch fixes the failure of recreate flexible fdir rule. The root cause is that the flex_mask_flag is not reset during flow destroy and flow flush. Fixes: 6ced3dd72f5f ("net/i40e: support flexible payload parsing for FDIR") Signed-off-by: Guinan Sun Acked-by: Qi Zhang --- drivers/net/i40e/i40e_fdir.c | 2 ++ drivers/net/i40e/i40e_flow.c | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c index 9a2b40b8a7..8abdc3773a 100644 --- a/drivers/net/i40e/i40e_fdir.c +++ b/drivers/net/i40e/i40e_fdir.c @@ -1647,6 +1647,8 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev, rte_free(fdir_filter); } else { ret = i40e_sw_fdir_filter_del(pf, &node->fdir.input); + if (ret >= 0) + pf->fdir.flex_mask_flag[pctype] = 0; } return ret; diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c index ae2fb45930..11e0e24782 100644 --- a/drivers/net/i40e/i40e_flow.c +++ b/drivers/net/i40e/i40e_flow.c @@ -5044,8 +5044,10 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf) } for (pctype = I40E_FILTER_PCTYPE_NONF_IPV4_UDP; - pctype <= I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++) + pctype <= I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++) { pf->fdir.inset_flag[pctype] = 0; + pf->fdir.flex_mask_flag[pctype] = 0; + } /* Disable FDIR processing as all FDIR rules are now flushed */ i40e_fdir_rx_proc_enable(dev, 0); -- 2.20.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2020-10-28 10:35:13.071584235 +0000 +++ 0041-net-i40e-fix-recreating-flexible-flow-director-rule.patch 2020-10-28 10:35:11.504830024 +0000 @@ -1,14 +1,15 @@ -From 0acf70d473072fd77b667a0419f8b9ab70b35b39 Mon Sep 17 00:00:00 2001 +From 1ed7d60cd9c8f3f0f29947ad2eb47496ec630069 Mon Sep 17 00:00:00 2001 From: Guinan Sun Date: Tue, 15 Sep 2020 06:52:25 +0000 Subject: [PATCH] net/i40e: fix recreating flexible flow director rule +[ upstream commit 0acf70d473072fd77b667a0419f8b9ab70b35b39 ] + This patch fixes the failure of recreate flexible fdir rule. The root cause is that the flex_mask_flag is not reset during flow destroy and flow flush. Fixes: 6ced3dd72f5f ("net/i40e: support flexible payload parsing for FDIR") -Cc: stable@dpdk.org Signed-off-by: Guinan Sun Acked-by: Qi Zhang @@ -18,24 +19,24 @@ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/net/i40e/i40e_fdir.c b/drivers/net/i40e/i40e_fdir.c -index 8e87b4a009..aa8e729495 100644 +index 9a2b40b8a7..8abdc3773a 100644 --- a/drivers/net/i40e/i40e_fdir.c +++ b/drivers/net/i40e/i40e_fdir.c -@@ -1882,6 +1882,8 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev, - return -EINVAL; - } - -+ pf->fdir.flex_mask_flag[pctype] = 0; -+ - if (fdir_info->fdir_invalprio == 1) - wait_status = false; +@@ -1647,6 +1647,8 @@ i40e_flow_add_del_fdir_filter(struct rte_eth_dev *dev, + rte_free(fdir_filter); + } else { + ret = i40e_sw_fdir_filter_del(pf, &node->fdir.input); ++ if (ret >= 0) ++ pf->fdir.flex_mask_flag[pctype] = 0; } + + return ret; diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c -index 51d8fdd790..adc5da1c53 100644 +index ae2fb45930..11e0e24782 100644 --- a/drivers/net/i40e/i40e_flow.c +++ b/drivers/net/i40e/i40e_flow.c -@@ -5679,8 +5679,10 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf) - I40E_MAX_FDIR_FILTER_NUM); +@@ -5044,8 +5044,10 @@ i40e_flow_flush_fdir_filter(struct i40e_pf *pf) + } for (pctype = I40E_FILTER_PCTYPE_NONF_IPV4_UDP; - pctype <= I40E_FILTER_PCTYPE_L2_PAYLOAD; pctype++)