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 B870DD2ED0F for ; Tue, 20 Jan 2026 09:35:57 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 7533B6FC6B; Tue, 20 Jan 2026 09:35:57 +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 l4cBUlLCqV03; Tue, 20 Jan 2026 09:35:56 +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 A63766FC65 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1768901756; bh=Hpm3tzHmLebq8eIS8qDAzoE8I3X/7qHvO8PMgK5y+KM=; h=From:To:CC:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=vEhCQydVrCdaV9LhjD42d6Fx1M0PyfTrPq+Tsb5P0xdgbYAy9jqjJtBd61AwqAEGW EuDvZrzf4w1/wNgGyiNQ4EE7YiZrEbmcT49bTGwVyDH82DJvZ5n9RFBbaPxi2wahEQ TlPG4BovTd4PCybhWrcEe/i6InR3ZF6VX5y/wsLmZP7f53RQMIpjWB5REZNTc7tBc1 6stTCSNjCGHAg7SRuxkRn/GAi/Scs6m3lkEyG7tL3dYQ9It1yj0e92m26onjdZveIQ k0f5Yn6ESn1JEHUWN4xQLd4XlASJ6sXZMdoRAcgQ8N0dmf8tbkZ57605M4CmmzRJLC HDVbaBAcshrOg== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id A63766FC65; Tue, 20 Jan 2026 09:35:56 +0000 (UTC) Received: from smtp2.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by lists1.osuosl.org (Postfix) with ESMTP id 21403160 for ; Tue, 20 Jan 2026 09:35:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 1041342305 for ; Tue, 20 Jan 2026 09:35:55 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id mR6s8w_h-N_F for ; Tue, 20 Jan 2026 09:35:54 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=52.34.181.151; helo=pdx-out-007.esa.us-west-2.outbound.mail-perimeter.amazon.com; envelope-from=prvs=473d65126=takkozu@amazon.co.jp; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 61DDF40C7A DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 61DDF40C7A Received: from pdx-out-007.esa.us-west-2.outbound.mail-perimeter.amazon.com (pdx-out-007.esa.us-west-2.outbound.mail-perimeter.amazon.com [52.34.181.151]) by smtp2.osuosl.org (Postfix) with ESMTPS id 61DDF40C7A for ; Tue, 20 Jan 2026 09:35:54 +0000 (UTC) X-CSE-ConnectionGUID: bmR5EjacRjCOLEYehtn1ZQ== X-CSE-MsgGUID: YZBrm2wHSdOKz13Sk5dxCg== X-IronPort-AV: E=Sophos;i="6.21,240,1763424000"; d="scan'208";a="11193028" Received: from ip-10-5-0-115.us-west-2.compute.internal (HELO smtpout.naws.us-west-2.prod.farcaster.email.amazon.dev) ([10.5.0.115]) by internal-pdx-out-007.esa.us-west-2.outbound.mail-perimeter.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Jan 2026 09:35:50 +0000 Received: from EX19MTAUWC001.ant.amazon.com [205.251.233.105:22299] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.14.244:2525] with esmtp (Farcaster) id 3384d617-c6fb-4c1b-9d4a-e7c3eb29c53f; Tue, 20 Jan 2026 09:35:50 +0000 (UTC) X-Farcaster-Flow-ID: 3384d617-c6fb-4c1b-9d4a-e7c3eb29c53f Received: from EX19D001UWA001.ant.amazon.com (10.13.138.214) by EX19MTAUWC001.ant.amazon.com (10.250.64.174) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.35; Tue, 20 Jan 2026 09:35:50 +0000 Received: from 603e5f7bc1fe.amazon.com (10.37.244.13) 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, 20 Jan 2026 09:35:47 +0000 From: Takashi Kozu To: CC: , , , , , , , , , , , , Takashi Kozu Date: Tue, 20 Jan 2026 18:34:39 +0900 Message-ID: <20260120093441.70075-7-takkozu@amazon.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20260120093441.70075-5-takkozu@amazon.com> References: <20260120093441.70075-5-takkozu@amazon.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [10.37.244.13] X-ClientProxiedBy: EX19D036UWB001.ant.amazon.com (10.13.139.133) 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=1768901754; x=1800437754; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Hpm3tzHmLebq8eIS8qDAzoE8I3X/7qHvO8PMgK5y+KM=; b=QWLjSNQtWGaTYE1q+o70WaXffkiO4kcnqAeCMcHV31VUvFQv2DKKldTq ZgTkun/PMD//87OWRU4QKfsn4F5ODdLdb2qast1nRHKp/TBYXN+pL8W/l Br0+cuBMt/tru/2jvCohFJD5SuKauO1+9WBaKOEmMoJscZaZgfQliKIM2 Wrer8qYdgEUfsWg3qZOBQxyyFpZF/uAgxbuJf8YFv8KWdhyktrbHq1fOy oiXoPOJ8c+EtAJ1fJEAnE5pfXb6n8eEWKHdW+DDXd+VdnBd5ogg62YOfr oA1boqR+He2w6UqRGT2GEbOEY4Hq00PoqDtFg8cc9MGJU87NoWIsl9mgm A==; X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=quarantine dis=none) header.from=amazon.com X-Mailman-Original-Authentication-Results: smtp2.osuosl.org; dkim=pass (2048-bit key) header.d=amazon.com header.i=@amazon.com header.a=rsa-sha256 header.s=amazoncorp2 header.b=QWLjSNQt Subject: [Intel-wired-lan] [PATCH iwl-next v4 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: 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