From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pdx-out-006.esa.us-west-2.outbound.mail-perimeter.amazon.com (pdx-out-006.esa.us-west-2.outbound.mail-perimeter.amazon.com [52.26.1.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A9231346A1E for ; Tue, 3 Feb 2026 12:55:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=52.26.1.71 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770123325; cv=none; b=izdOQaRCBJsjtdK31pkJ8FoktHsO7JuQcu/MrFNPGyEOu0po57h7/QpdOtbEy7fkdCaiwYKdLNooonIWRmgebjuOm7Es0/5UsStpyZuWIAZ8kaFcCpFkor7GmYSPbCjFhNJ6P+XVYNWY1x5imWuidh0YnfBPGeQlm0Mu7rMTqRc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770123325; c=relaxed/simple; bh=P0I1u9DsNS/ZeGiX8nf9YugakkMMGpgg9ngCj84UDbQ=; h=From:To:CC:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-Type; b=HtUTmkBomi/mHp0w4fD9N1L27DP8QGu8BgkOhU/Po2uuHkxUhj3PxHQkeQg9LTUSycNFYM27NCLH+JjAkYqZZ2Pj8tczIe0kYyyItzmb2fqggwJ09VwXwmrEp8R2z3xkMV54OQQWsfZAvawXcYTfshUWAdO6Val4veqcobk+V1M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com; spf=pass smtp.mailfrom=amazon.co.jp; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b=OQ2AFcMn; arc=none smtp.client-ip=52.26.1.71 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amazon.co.jp Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.b="OQ2AFcMn" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazoncorp2; t=1770123324; x=1801659324; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4ZXh+UPphHIpq2hIn2v6cdj/qtoluvhTdLn76XaWJmo=; b=OQ2AFcMntFAMX2UP9SuPcdBqtuHX8k7LcsMaeFqpAfSlCBJaWnCUQOcB ec0j+KLdR+N/IgkDhYTx3UHjpZpolLWhasyaQZieoYhXMkUjFbJLPlPFt AE62G5RVbcVBvLF/C+NAuL9v2NupfKrNiTPAkDPIoMcDio2jqT631QNST s6P0tVuzRBqchRarC+g41pvT1IAMCIF48S01VCjruxaoM7QBWeLayjhV2 DogY7Ex/iofUBC8qUMefT1sccdN1bz7XVKc8WwgHoi+kzyZc7ZW+6SY74 Rvew9pKNmXFVl8WokNyXGQaQmXEF9SbYCTeqKr5E1YMVaEqYOP2aZ64Ro g==; X-CSE-ConnectionGUID: Ic7of+ksTRSoq4nKwzaeBg== X-CSE-MsgGUID: zJZdeQDYSMuAUUxp+lsF1w== X-IronPort-AV: E=Sophos;i="6.21,270,1763424000"; d="scan'208";a="12187730" Received: from ip-10-5-12-219.us-west-2.compute.internal (HELO smtpout.naws.us-west-2.prod.farcaster.email.amazon.dev) ([10.5.12.219]) by internal-pdx-out-006.esa.us-west-2.outbound.mail-perimeter.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 03 Feb 2026 12:55:22 +0000 Received: from EX19MTAUWA002.ant.amazon.com [205.251.233.234:31556] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.59.190:2525] with esmtp (Farcaster) id c1f22a7a-e0b3-4db2-97d7-77ff27a3d8cc; Tue, 3 Feb 2026 12:55:21 +0000 (UTC) X-Farcaster-Flow-ID: c1f22a7a-e0b3-4db2-97d7-77ff27a3d8cc Received: from EX19D001UWA001.ant.amazon.com (10.13.138.214) by EX19MTAUWA002.ant.amazon.com (10.250.64.202) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.35; Tue, 3 Feb 2026 12:55:21 +0000 Received: from 603e5f7bc1fe.amazon.com (10.37.245.7) by EX19D001UWA001.ant.amazon.com (10.13.138.214) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.35; Tue, 3 Feb 2026 12:55:19 +0000 From: Takashi Kozu To: CC: , , , , , , , , , , , , , Takashi Kozu Subject: [PATCH iwl-next v6 2/3] igb: expose RSS key via ethtool get_rxfh Date: Tue, 3 Feb 2026 21:54:12 +0900 Message-ID: <20260203125417.37285-7-takkozu@amazon.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20260203125417.37285-5-takkozu@amazon.com> References: <20260203125417.37285-5-takkozu@amazon.com> Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: EX19D032UWB004.ant.amazon.com (10.13.139.136) To EX19D001UWA001.ant.amazon.com (10.13.138.214) Implement igb_get_rxfh_key_size() and extend igb_get_rxfh() to return the RSS key to userspace. This can be tested using `ethtool -x `. Reviewed-by: Simon Horman Reviewed-by: Aleksandr Loktionov Signed-off-by: Takashi Kozu --- drivers/net/ethernet/intel/igb/igb_ethtool.c | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c index a93069b761a6..b387121f0ea7 100644 --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c @@ -3297,10 +3297,12 @@ static int igb_get_rxfh(struct net_device *netdev, int i; rxfh->hfunc = ETH_RSS_HASH_TOP; - if (!rxfh->indir) - return 0; - for (i = 0; i < IGB_RETA_SIZE; i++) - rxfh->indir[i] = adapter->rss_indir_tbl[i]; + if (rxfh->indir) + for (i = 0; i < IGB_RETA_SIZE; i++) + rxfh->indir[i] = adapter->rss_indir_tbl[i]; + + if (rxfh->key) + memcpy(rxfh->key, adapter->rss_key, sizeof(adapter->rss_key)); return 0; } @@ -3340,6 +3342,11 @@ void igb_write_rss_indir_tbl(struct igb_adapter *adapter) } } +static u32 igb_get_rxfh_key_size(struct net_device *netdev) +{ + return IGB_RSS_KEY_SIZE; +} + static int igb_set_rxfh(struct net_device *netdev, struct ethtool_rxfh_param *rxfh, struct netlink_ext_ack *extack) @@ -3504,6 +3511,7 @@ static const struct ethtool_ops igb_ethtool_ops = { .get_module_eeprom = igb_get_module_eeprom, .get_rxfh_indir_size = igb_get_rxfh_indir_size, .get_rxfh = igb_get_rxfh, + .get_rxfh_key_size = igb_get_rxfh_key_size, .set_rxfh = igb_set_rxfh, .get_rxfh_fields = igb_get_rxfh_fields, .set_rxfh_fields = igb_set_rxfh_fields, -- 2.52.0