[dpdk-stable] patch 'net/i40e: fix using error set function' has been queued to stable release 18.02.2

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Apr 30 16:41:00 CEST 2018


Hi,

FYI, your patch has been queued to stable release 18.02.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/02/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 6707d8d2b98bd55f10f400c271fe7431d50b42dc Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1 at intel.com>
Date: Mon, 9 Apr 2018 10:26:32 +0800
Subject: [PATCH] net/i40e: fix using error set function

[ upstream commit 9ef8ebe790d8de796b50e5a1e389e07540d2ce4f ]

There is a specific function to set error for flow configuration,
so change to use that function.

Fixes: ecad87d22383 ("net/i40e: move RSS to flow API")

Signed-off-by: Wei Zhao <wei.zhao1 at intel.com>
Tested-by: Yuan Peng <yuan.peng at intel.com>
Acked-by: Qi Zhang <qi.z.zhang at intel.com>
---
 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 c1b3ef4bb..f1c492a18 100644
--- a/drivers/net/i40e/i40e_flow.c
+++ b/drivers/net/i40e/i40e_flow.c
@@ -4266,20 +4266,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;
 			}
 
@@ -4292,7 +4301,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;
 				}
 
-- 
2.14.2



More information about the stable mailing list