From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.8 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id AA823C73C66 for ; Mon, 15 Jul 2019 02:26:59 +0000 (UTC) Received: from dpdk.org (dpdk.org [92.243.14.124]) by mail.kernel.org (Postfix) with ESMTP id 6968420C01 for ; Mon, 15 Jul 2019 02:26:59 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6968420C01 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=intel.com Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=dev-bounces@dpdk.org 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