From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 08AA342DEF; Fri, 7 Jul 2023 03:49:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8997D406B5; Fri, 7 Jul 2023 03:49:43 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id AE69F40685 for ; Fri, 7 Jul 2023 03:49:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1688694581; x=1720230581; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=gZhwrkMJuFWC88TfdocW6BiWQDH6LgbaQOh9q+nXyQ8=; b=YgV4saQlzuxTtFukYoHyQ6MVirBQrP2xgBXiHVKlNnXdnomorT2ElMou MiVn8m9j9Xt+KdgSRJBQMpPsBrqh/qeLdu1tbQXKgrhH3HMExu9wB1Xbz Y/3dRSNFSJHDz6m0cVswq5sKCi1hvqlG15P6npVE5cmRAaA1XX1/F6Vpy OCJdIPy8RtpK/eC7NXNp3rtGL1iqYsZXu4mxgyEXomfr6NcE4C5Qsru/s lEcBG/OwxdoEEatlF6u68rEgl7LSUUcWNMa2JJ/6iQdSh2IHOmbDrteVc 4XONFu3R64UtTjzl+Amq69U3U3Gu26WFHvhmXYFeoDqwDplkGLdB2x4Fu w==; X-IronPort-AV: E=McAfee;i="6600,9927,10763"; a="361248295" X-IronPort-AV: E=Sophos;i="6.01,187,1684825200"; d="scan'208";a="361248295" Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jul 2023 18:49:40 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10763"; a="966449046" X-IronPort-AV: E=Sophos;i="6.01,187,1684825200"; d="scan'208";a="966449046" Received: from dpdk-yuyingzh-icelake.sh.intel.com ([10.67.117.29]) by fmsmga006.fm.intel.com with ESMTP; 06 Jul 2023 18:49:39 -0700 From: Yuying Zhang To: dev@dpdk.org, qi.z.zhang@intel.com, qiming.yang@intel.com Cc: Yuying Zhang Subject: [PATCH v1] net/ice: fix rss hash key generation Date: Fri, 7 Jul 2023 02:10:46 +0000 Message-Id: <20230707021046.395453-1-yuying.zhang@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Current code just generated 40 bytes standard rss hash key of ice driver. The extended 12 bytes were filled by hardware and were invalid for users. This patch generate 52 bytes rss hash key for ice driver just as other drivers. Fixes: 50370662b727 ("net/ice: support device and queue ops") Fixes: 20d6a017e148 ("net/ice: fix build with GCC 12") Signed-off-by: Yuying Zhang --- drivers/net/ice/ice_ethdev.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/net/ice/ice_ethdev.c b/drivers/net/ice/ice_ethdev.c index 949b13324f..4bad39c2c1 100644 --- a/drivers/net/ice/ice_ethdev.c +++ b/drivers/net/ice/ice_ethdev.c @@ -3350,7 +3350,8 @@ static int ice_init_rss(struct ice_pf *pf) rss_conf = &dev_data->dev_conf.rx_adv_conf.rss_conf; nb_q = dev_data->nb_rx_queues; - vsi->rss_key_size = ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE; + vsi->rss_key_size = ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE + + ICE_AQC_GET_SET_RSS_KEY_DATA_HASH_KEY_SIZE; vsi->rss_lut_size = pf->hash_lut_size; if (nb_q == 0) { @@ -3391,7 +3392,10 @@ static int ice_init_rss(struct ice_pf *pf) vsi->rss_key_size)); rte_memcpy(key.standard_rss_key, vsi->rss_key, - RTE_MIN(sizeof(key.standard_rss_key), vsi->rss_key_size)); + ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE); + rte_memcpy(key.extended_hash_key, + &vsi->rss_key[ICE_AQC_GET_SET_RSS_KEY_DATA_RSS_KEY_SIZE], + ICE_AQC_GET_SET_RSS_KEY_DATA_HASH_KEY_SIZE); ret = ice_aq_set_rss_key(hw, vsi->idx, &key); if (ret) goto out; -- 2.25.1