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 C6EBFA0471 for ; Mon, 15 Jul 2019 04:26:58 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2AB962C5E; Mon, 15 Jul 2019 04:26:58 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by dpdk.org (Postfix) with ESMTP id 6D1D82BF5; Mon, 15 Jul 2019 04:26:56 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Jul 2019 19:26:55 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.63,492,1557212400"; d="scan'208";a="366180964" Received: from map1.sh.intel.com ([10.67.111.138]) by fmsmga006.fm.intel.com with ESMTP; 14 Jul 2019 19:26:53 -0700 From: Qiming Yang To: dev@dpdk.org Cc: Qiming Yang , stable@dpdk.org Date: Mon, 15 Jul 2019 10:23:56 +0800 Message-Id: <20190715022356.73350-1-qiming.yang@intel.com> X-Mailer: git-send-email 2.9.5 In-Reply-To: <20190709040812.4191-1-qiming.yang@intel.com> References: <20190709040812.4191-1-qiming.yang@intel.com> Subject: [dpdk-dev] [PATCH v3] net/ice: fix flow validation fail 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" ice_flow_valid_attr will return zero on success and a negative value on error. Current return value check logical is opposite to the expected behavior. This patch fixed this issue. Fixes: d76116a4678f ("net/ice: add generic flow API") Cc: stable@dpdk.org Signed-off-by: Qiming Yang --- drivers/net/ice/ice_generic_flow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_generic_flow.c index d5ff278..e6a2c4b 100644 --- a/drivers/net/ice/ice_generic_flow.c +++ b/drivers/net/ice/ice_generic_flow.c @@ -549,7 +549,7 @@ static int ice_flow_valid_action(struct rte_eth_dev *dev, rte_flow_error_set(error, EINVAL, RTE_FLOW_ERROR_TYPE_ACTION, actions, "Invalid queue ID for" - " ethertype_filter."); + " switch filter."); return -rte_errno; } break; @@ -596,7 +596,7 @@ ice_flow_validate(struct rte_eth_dev *dev, } ret = ice_flow_valid_attr(attr, error); - if (!ret) + if (ret) return ret; inset = ice_flow_valid_pattern(pattern, error); -- 2.7.4