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 63A1CA0096 for ; Thu, 9 May 2019 05:11:44 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 592CA2082; Thu, 9 May 2019 05:11:44 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 4BFA82082 for ; Thu, 9 May 2019 05:11:43 +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 orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 May 2019 20:11:42 -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:11:41 -0700 From: wei zhao To: qabuild@intel.com Cc: wei zhao , stable@dpdk.org Date: Thu, 9 May 2019 10:42:50 +0800 Message-Id: <1557369770-15289-1-git-send-email-wei.zhao1@intel.com> X-Mailer: git-send-email 2.7.5 Subject: [dpdk-stable] [DPDK] net/i40e: fix error when create two RSS flow rule X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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..68c1d43 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