From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2C86FA0032 for ; Fri, 18 Feb 2022 13:42:37 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 27E1D40141; Fri, 18 Feb 2022 13:42:37 +0100 (CET) Received: from mail-wr1-f48.google.com (mail-wr1-f48.google.com [209.85.221.48]) by mails.dpdk.org (Postfix) with ESMTP id 9217640395 for ; Fri, 18 Feb 2022 13:42:35 +0100 (CET) Received: by mail-wr1-f48.google.com with SMTP id d27so14380057wrc.6 for ; Fri, 18 Feb 2022 04:42:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ZWDbC99YrGee53lZINyaYSkiNUT8PbgpgPKHWgGKM60=; b=aM48b+YbLMtUHacOyp5hkM/eds8hm4KqRuWUMm6EPSC5IsTuwIV10uafjdfkHZ9Q/L VLASkIBMU2abpMt/H7vAuHPaDIqFhXZi0GOGGmcEmnlB5/tMrbBIKM8zfIT5/W77rHin iXNOYtkjeKeP+0dKvyMXyibDVDbVpv8UfF7zG7mwI4lG06S2+WXGuP122+J+ue15rrKS Ep6+S1GuKXaXw1Y4FslRagpcytKz5Qd14fm5A6m0p7CwGFzbqtpmX6bz+yVET1LWL+Ah zZ9HsLdM+XPkZJBi2cSdM4O6Xw86hZkH1+3A8aQrL9GDy9l4wDjC/9PCNYe+ITdUfJNm SZ1g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ZWDbC99YrGee53lZINyaYSkiNUT8PbgpgPKHWgGKM60=; b=tKD8FT/lXRrkmW/BPj0SwjXlD90dFOQhrDOMvLsxr2T/Svjzfkg01iDzZNEsQ/M31k 83EVIZRvkA5AWpfoi4uLk0hXkmTWsdGmm9Ki6nxSVq7JsBcVXQhoNUVe4sqk9WVoUZas 7Ytm5LqFPAB5SKg/pFOTcnR/G3UXmQ4IL8QbZfWAF57mmMbKuuFIhsOD1I9lAOh9RBSi 3dx43b7zVbd+VSadXYQNgr4u9pw72miyxn44N2eh7UCGskalQ6j00pGVLybFy/HnR4Z8 X/FbeYRUJg2hok1br/ki2o8xPisXVHtFq/l3jKuizNybNvb2bNJkToaZSX94WMnbACDo WxKQ== X-Gm-Message-State: AOAM531Y8Vty354z3R3LiCanS9eJXq1l3C0OCg+dBWLcJ3E/TO3KDX/J QizPGFnzb4eiJ56eoyUHUhUasIL3pnipl7jK X-Google-Smtp-Source: ABdhPJx0nCLoYXDdB9p6AwUv10G5EAQ9+Oc03y2cQIecUObkIZp5ZMQa8vwEJXLup1dq08l66BxB9A== X-Received: by 2002:adf:816c:0:b0:1e6:88a9:eb6c with SMTP id 99-20020adf816c000000b001e688a9eb6cmr5871667wrm.645.1645188155305; Fri, 18 Feb 2022 04:42:35 -0800 (PST) Received: from localhost ([2a01:4b00:f41a:3600:360b:9754:2e3a:c344]) by smtp.gmail.com with ESMTPSA id e3sm35037174wrr.94.2022.02.18.04.42.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 18 Feb 2022 04:42:34 -0800 (PST) From: luca.boccassi@gmail.com To: Huisong Li Cc: Min Hu , dpdk stable Subject: patch 'net/hns3: fix using enum as boolean' has been queued to stable release 20.11.5 Date: Fri, 18 Feb 2022 12:38:28 +0000 Message-Id: <20220218123931.1749595-59-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20220218123931.1749595-1-luca.boccassi@gmail.com> References: <20220218123931.1749595-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 Hi, FYI, your patch has been queued to stable release 20.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/20/22. 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/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/f3cd5320d89228aaae2f10dcb85045fb53fcd8b1 Thanks. Luca Boccassi --- >From f3cd5320d89228aaae2f10dcb85045fb53fcd8b1 Mon Sep 17 00:00:00 2001 From: Huisong Li Date: Sat, 22 Jan 2022 09:51:29 +0800 Subject: [PATCH] net/hns3: fix using enum as boolean [ upstream commit 67d0b17947d6936147f4cbfff6ff938884f14776 ] The enum type variables cannot be used as bool variables. This patch fixes for "with->func" in hns3_action_rss_same(). Fixes: eb158fc756a5 ("net/hns3: fix config when creating RSS rule after flush") Signed-off-by: Huisong Li Acked-by: Min Hu (Connor) --- drivers/net/hns3/hns3_flow.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/hns3/hns3_flow.c b/drivers/net/hns3/hns3_flow.c index aa069c92ce..6c09172343 100644 --- a/drivers/net/hns3/hns3_flow.c +++ b/drivers/net/hns3/hns3_flow.c @@ -1277,7 +1277,8 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp, if (comp->func == RTE_ETH_HASH_FUNCTION_MAX) func_is_same = false; else - func_is_same = (with->func ? (comp->func == with->func) : true); + func_is_same = (with->func != RTE_ETH_HASH_FUNCTION_DEFAULT) ? + (comp->func == with->func) : true; return (func_is_same && comp->types == (with->types & HNS3_ETH_RSS_SUPPORT) && -- 2.30.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2022-02-18 12:37:40.276896790 +0000 +++ 0059-net-hns3-fix-using-enum-as-boolean.patch 2022-02-18 12:37:37.694792009 +0000 @@ -1 +1 @@ -From 67d0b17947d6936147f4cbfff6ff938884f14776 Mon Sep 17 00:00:00 2001 +From f3cd5320d89228aaae2f10dcb85045fb53fcd8b1 Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 67d0b17947d6936147f4cbfff6ff938884f14776 ] + @@ -10 +11,0 @@ -Cc: stable@dpdk.org @@ -19 +20 @@ -index 5f2b279546..00084872ad 100644 +index aa069c92ce..6c09172343 100644 @@ -22 +23 @@ -@@ -1251,7 +1251,8 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp, +@@ -1277,7 +1277,8 @@ hns3_action_rss_same(const struct rte_flow_action_rss *comp, @@ -26 +27 @@ -- func_is_same = with->func ? (comp->func == with->func) : true; +- func_is_same = (with->func ? (comp->func == with->func) : true);