From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 24A10A0096 for ; Thu, 9 May 2019 05:28:28 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9285D2B87; Thu, 9 May 2019 05:28:26 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id DF3202082; Thu, 9 May 2019 05:28:23 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 May 2019 20:28:22 -0700 X-ExtLoop1: 1 Received: from dpdk6.bj.intel.com ([172.16.182.192]) by fmsmga007.fm.intel.com with ESMTP; 08 May 2019 20:28:22 -0700 From: Wei Zhao To: dev@dpdk.org Cc: stable@dpdk.org, qi.z.zhang@intel.com, yuan.peng@intel.com, Wei Zhao Date: Thu, 9 May 2019 10:59:30 +0800 Message-Id: <1557370770-16508-1-git-send-email-wei.zhao1@intel.com> X-Mailer: git-send-email 2.7.5 Subject: [dpdk-dev] [PATCH] net/i40e: fix error when create two RSS flow rule 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" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190509025930.XJkj8DC2xaJUKjdQ_9m6mIx8nPoSMxLel610kpNgKF0@z> There is need to refuse to create the second RSS flow rule as only one RSS key and HASH register for each PF port. Users should delete the first rule before setup the second rule. Fixes: ecad87d22383 ("net/i40e: move RSS to flow API") Cc: stable@dpdk.org Signed-off-by: Wei Zhao --- drivers/net/i40e/i40e_flow.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/drivers/net/i40e/i40e_flow.c b/drivers/net/i40e/i40e_flow.c index 5447e4e..bca93b6 100644 --- a/drivers/net/i40e/i40e_flow.c +++ b/drivers/net/i40e/i40e_flow.c @@ -4444,6 +4444,14 @@ i40e_flow_parse_rss_action(struct rte_eth_dev *dev, } } + if (rss_info->conf.queue_num) { + rte_flow_error_set(error, EINVAL, + RTE_FLOW_ERROR_TYPE_ACTION, + act, + "rss only allow one valid rule"); + return -rte_errno; + } + /* Parse RSS related parameters from configuration */ if (rss->func != RTE_ETH_HASH_FUNCTION_DEFAULT) return rte_flow_error_set -- 2.7.5