From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 5C4B98E80 for ; Mon, 23 Nov 2015 06:36:21 +0100 (CET) Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga101.fm.intel.com with ESMTP; 22 Nov 2015 21:36:17 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.20,335,1444719600"; d="scan'208";a="812684" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by fmsmga004.fm.intel.com with ESMTP; 22 Nov 2015 21:36:17 -0800 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id tAN5aF9t011909; Mon, 23 Nov 2015 13:36:15 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id tAN5aB58002756; Mon, 23 Nov 2015 13:36:13 +0800 Received: (from hzhan75@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id tAN5aBwo002752; Mon, 23 Nov 2015 13:36:11 +0800 From: Helin Zhang To: dev@dpdk.org Date: Mon, 23 Nov 2015 13:36:10 +0800 Message-Id: <1448256970-2722-1-git-send-email-helin.zhang@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH] i40e: fix issue of reconfigure hash enable flags X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Nov 2015 05:36:21 -0000 It fixes the issue of not re-configuring hash enable flags (HENA) if there is no key. Fixes: d0a349409bd7 ("i40e: support AQ based RSS config") Signed-off-by: Helin Zhang --- drivers/net/i40e/i40e_ethdev.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c index 2c51a0b..e9e07e2 100644 --- a/drivers/net/i40e/i40e_ethdev.c +++ b/drivers/net/i40e/i40e_ethdev.c @@ -5663,9 +5663,14 @@ i40e_set_rss_key(struct i40e_vsi *vsi, uint8_t *key, uint8_t key_len) struct i40e_hw *hw = I40E_VSI_TO_HW(vsi); int ret = 0; - if (!key || key_len != ((I40E_PFQF_HKEY_MAX_INDEX + 1) * - sizeof(uint32_t))) + if (!key || key_len == 0) { + PMD_DRV_LOG(DEBUG, "No key to be configured"); + return 0; + } else if (key && (key_len != (I40E_PFQF_HKEY_MAX_INDEX + 1) * + sizeof(uint32_t))) { + PMD_DRV_LOG(ERR, "Invalid key length %u", key_len); return -EINVAL; + } if (pf->flags & I40E_FLAG_RSS_AQ_CAPABLE) { struct i40e_aqc_get_set_rss_key_data *key_dw = -- 1.9.3