From patchwork Sun Apr 8 06:22:53 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Zhao1, Wei" X-Patchwork-Id: 37516 X-Patchwork-Delegate: helin.zhang@intel.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 57D6C1BA04; Sun, 8 Apr 2018 08:41:33 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by dpdk.org (Postfix) with ESMTP id D17D31B981; Sun, 8 Apr 2018 08:41:30 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Apr 2018 23:41:29 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.48,422,1517904000"; d="scan'208";a="40219376" Received: from dpdk6.bj.intel.com ([172.16.182.119]) by FMSMGA003.fm.intel.com with ESMTP; 07 Apr 2018 23:41:28 -0700 From: Wei Zhao To: dev@dpdk.org, stable@dpdk.org Cc: qi.z.zhang@intel.com, Wei Zhao Date: Sun, 8 Apr 2018 14:22:53 +0800 Message-Id: <1523168573-56774-1-git-send-email-wei.zhao1@intel.com> X-Mailer: git-send-email 2.7.5 Subject: [dpdk-dev] [PATCH] net/i40e: change warning log to flow error set 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" Ther is a specific error set fucntiong for flow error configuration, so change to this mode. Fixes: ecad87d22383 ("net/i40e: move RSS to flow API") Signed-off-by: Wei Zhao Tested-by: Peng Yuan --- drivers/net/i40e/i40e_flow.c | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c index fb7ad51..2068026 100644 --- a/drivers/net/i40e/i40e_flow.c +++ b/drivers/net/i40e/i40e_flow.c @@ -4255,20 +4255,29 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev, conf_info->region[n].flowtype_num) { if (!((rte_is_power_of_2(rss->num)) && rss->num <= 64)) { - PMD_DRV_LOG(ERR, "The region sizes should be any of the following values: 1, 2, 4, 8, 16, 32, 64 as long as the " - "total number of queues do not exceed the VSI allocation"); + rte_flow_error_set(error, EINVAL, + RTE_FLOW_ERROR_TYPE_ACTION, + act, + "The region sizes should be any of the following values: 1, 2, 4, 8, 16, 32, 64 as long as the " + "total number of queues do not exceed the VSI allocation"); return -rte_errno; } if (conf_info->region[n].user_priority[n] >= I40E_MAX_USER_PRIORITY) { - PMD_DRV_LOG(ERR, "the user priority max index is 7"); + rte_flow_error_set(error, EINVAL, + RTE_FLOW_ERROR_TYPE_ACTION, + act, + "the user priority max index is 7"); return -rte_errno; } if (conf_info->region[n].hw_flowtype[n] >= I40E_FILTER_PCTYPE_MAX) { - PMD_DRV_LOG(ERR, "the hw_flowtype or PCTYPE max index is 63"); + rte_flow_error_set(error, EINVAL, + RTE_FLOW_ERROR_TYPE_ACTION, + act, + "the hw_flowtype or PCTYPE max index is 63"); return -rte_errno; } @@ -4281,7 +4290,10 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev, if (i == info->queue_region_number) { if (i > I40E_REGION_MAX_INDEX) { - PMD_DRV_LOG(ERR, "the queue region max index is 7"); + rte_flow_error_set(error, EINVAL, + RTE_FLOW_ERROR_TYPE_ACTION, + act, + "the queue region max index is 7"); return -rte_errno; }