From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A713BE87822 for ; Tue, 3 Feb 2026 12:55:29 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 7D6BB60894; Tue, 3 Feb 2026 12:55:29 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id OZU-eUq6wgBr; Tue, 3 Feb 2026 12:55:28 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=140.211.166.142; helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp3.osuosl.org D7B7B60873 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1770123327; bh=4ZXh+UPphHIpq2hIn2v6cdj/qtoluvhTdLn76XaWJmo=; h=From:To:CC:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=fK0N2zYopOarV1+VwdnCKYWqqFik+2ZRcNmn572yvNhWNWmWrw5vurTYRkfw3iJAU PJ88B4qWoQgww3sR4mL89h599oPz0GXx3vL4x9bXrSa5zfOEFwuy0ulO8FNEgWTbbw lduVXvD8y4GFF+L08Ob5mfEixRAwr2tsYSTuTNoYllbMjENqplMQbtBXvNHBs/am6q nUropSqEQjJimpN9qEzdoPP6Nz7tCwNIk1zlxlkoauQxYly7dl8XIZdfluhI8kurCI e2TUd0E2yX6B1NmkP2on/Naaf4pgiW+2I4DMdByRS5+Ne8bqoTKzWH2jIJ/UW3Yvvi zcit7i1T4Srng== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id D7B7B60873; Tue, 3 Feb 2026 12:55:27 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137]) by lists1.osuosl.org (Postfix) with ESMTP id EA9CAF5 for ; Tue, 3 Feb 2026 12:55:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id C80EC40BED for ; Tue, 3 Feb 2026 12:55:25 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id fpwG5_E4lp1l for ; Tue, 3 Feb 2026 12:55:25 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=52.26.1.71; helo=pdx-out-006.esa.us-west-2.outbound.mail-perimeter.amazon.com; envelope-from=prvs=487b0b5b4=takkozu@amazon.co.jp; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 0639440917 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 0639440917 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]) by smtp4.osuosl.org (Postfix) with ESMTPS id 0639440917 for ; Tue, 3 Feb 2026 12:55:24 +0000 (UTC) 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 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> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.37.245.7] X-ClientProxiedBy: EX19D032UWB004.ant.amazon.com (10.13.139.136) To EX19D001UWA001.ant.amazon.com (10.13.138.214) X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amazon.com; i=@amazon.com; q=dns/txt; s=amazoncorp2; t=1770123325; x=1801659325; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4ZXh+UPphHIpq2hIn2v6cdj/qtoluvhTdLn76XaWJmo=; b=da4gXh6sapekDHqOnDdncx10z3YQYOQAnuTsDT5QQgwHeStuyn9CEYYG 9jAWEnMTdNo+s5w6H4DL4LCZdFwGk6ugEoXSR9bNAHjOIq3pvx75zsFW5 Em1hjVvrhsnIcJN6EyR1lvdLqBwcDDFlmwwJzJnWJadKpcIaBV8T7mqSJ iiibEu40iDc9G0NKjkI4gcw7aBPSLqpuKk8dxDnGlZgRyuY21IcT6DOoW f55hTdwmz2lWfAAIzqYK9LrffaTms2OGzS9GcG25lLs0bBufM+K8R/doS gy/dm7riLpD1/nfBXkAejsXn3CTH8kDtz8gNCL/0bxFs+gIM5KoU/XjYf Q==; X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key, unprotected) header.d=amazon.com header.i=@amazon.com header.a=rsa-sha256 header.s=amazoncorp2 header.b=da4gXh6s Subject: [Intel-wired-lan] [PATCH iwl-next v6 2/3] igb: expose RSS key via ethtool get_rxfh X-BeenThere: intel-wired-lan@osuosl.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: Intel Wired Ethernet Linux Kernel Driver Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: intel-wired-lan-bounces@osuosl.org Sender: "Intel-wired-lan" 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