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 64553A0093; Thu, 21 May 2020 09:57:40 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C7AB91D642; Thu, 21 May 2020 09:57:39 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by dpdk.org (Postfix) with ESMTP id 6D9B61D63C; Thu, 21 May 2020 09:57:37 +0200 (CEST) IronPort-SDR: ZcUrCHF7zt64lsoMGeT/AJIJtNWDjebxGDY6OtuNjPoIMV1Ih0wUOg3HaoSle5ktjwPD4ZllEY /2Rku5qCTs/w== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 May 2020 00:57:36 -0700 IronPort-SDR: 3FJUjp9PQcF//y75SOWY4ASSYOMdC3YsMCVMyXa40iPTp8BZhMDZarpLrn0247ZBXrUlgm/54O 9Q0PqND7EVkg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,417,1583222400"; d="scan'208";a="412309568" Received: from unknown (HELO localhost.localdomain.bj.intel.com) ([172.16.182.123]) by orsmga004.jf.intel.com with ESMTP; 21 May 2020 00:57:34 -0700 From: Wei Zhao To: dev@dpdk.org Cc: stable@dpdk.org, qi.z.zhang@intel.com, xiaolong.ye@intel.com, Wei Zhao Date: Thu, 21 May 2020 15:34:11 +0800 Message-Id: <20200521073411.16778-1-wei.zhao1@intel.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] net/ice: fix switch action number check X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The action number for switch filter should be 1, any other such as 0 or more than 1 is invalid. Fixes: 3428c6b6ec1f ("net/ice: add action number check for switch") Cc: stable@dpdk.org Signed-off-by: Wei Zhao --- drivers/net/ice/ice_switch_filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c index dd3f4847a..20e8187d3 100644 --- a/drivers/net/ice/ice_switch_filter.c +++ b/drivers/net/ice/ice_switch_filter.c @@ -1388,7 +1388,7 @@ ice_switch_check_action(const struct rte_flow_action *actions, } } - if (actions_num > 1) { + if (actions_num != 1) { rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION, actions, -- 2.19.1