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 AD33CD61037 for ; Sat, 31 Jan 2026 16:31:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 847E160B65; Sat, 31 Jan 2026 16:31:34 +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 J0gtQcREJGec; Sat, 31 Jan 2026 16:31:32 +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 5BC5760B64 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1769877092; bh=FZErLBRF0I98rij84pRgNIEgwO/sWc9BcJpuexvaePw=; h=From:To:Cc:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=dJ00ldQIi7q4NYf6EvqRZ5FtiHCX0KRq3eJtJMa3ngjid870nNB0V88ADfWQ/pXI1 B7GQl+9l4npOUhihKPhytDMsMG4Vz/TxvRxFj0uPMr4kFIlZJL+mTlYTpjgiJq2ovo O+TeJC6O2m7IsSY4UYOTANYohEJIQp+6v9OpjHHqKmrVOZdhcWHrSZB7qayd/ShXvy wH/zkKE/8Of2frMZPUoBU1+pMKHs1SVCUWj4Fw78x3ZsA0SYySNAltAj4BA1Ccw49j JU+l0XqYE4XCuelEamSYnhAtqwsDz/C+NozVMXDsL/4NQgS9FSgC10Uuoq9qIkiUHU 3TeaQBWQFLNsg== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp3.osuosl.org (Postfix) with ESMTP id 5BC5760B64; Sat, 31 Jan 2026 16:31:32 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists1.osuosl.org (Postfix) with ESMTP id 671931E0 for ; Sat, 31 Jan 2026 16:31:31 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 5EE9D4040B for ; Sat, 31 Jan 2026 16:31:31 +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 cGNprg708x6K for ; Sat, 31 Jan 2026 16:31:30 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=49.212.198.91; helo=www2881.sakura.ne.jp; envelope-from=kohei@enjuk.jp; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 29C614029E DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 29C614029E Received: from www2881.sakura.ne.jp (www2881.sakura.ne.jp [49.212.198.91]) by smtp4.osuosl.org (Postfix) with ESMTPS id 29C614029E for ; Sat, 31 Jan 2026 16:31:29 +0000 (UTC) Received: from ms-a2 (248.212.13.160.dy.iij4u.or.jp [160.13.212.248]) (authenticated bits=0) by www2881.sakura.ne.jp (8.16.1/8.16.1) with ESMTPSA id 60VGV9GY039498 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Sun, 1 Feb 2026 01:31:10 +0900 (JST) (envelope-from kohei@enjuk.jp) From: Kohei Enju To: intel-wired-lan@lists.osuosl.org, netdev@vger.kernel.org Cc: Tony Nguyen , Przemek Kitszel , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Vitaly Lifshits , Simon Horman , Aleksandr Loktionov , kohei.enju@gmail.com, Kohei Enju , Avigail Dahan Date: Sat, 31 Jan 2026 16:29:37 +0000 Message-ID: <20260131163037.88108-3-kohei@enjuk.jp> X-Mailer: git-send-email 2.51.0 In-Reply-To: <20260131163037.88108-1-kohei@enjuk.jp> References: <20260131163037.88108-1-kohei@enjuk.jp> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Mailman-Original-DKIM-Signature: a=rsa-sha256; bh=FZErLBRF0I98rij84pRgNIEgwO/sWc9BcJpuexvaePw=; c=relaxed/relaxed; d=enjuk.jp; h=From:To:Subject:Date:Message-ID; s=rs20251215; t=1769877070; v=1; b=Vbze38TgoAQe5w5cw4czspmc+AAdg/VbTnkrzKBm/r+p0HYQOM4wmEynGctzSU3M l9u7KJhcD2fMF3IFvCwbtri6gyu457xSVPZ0A6o57oeY1goNRI97hfy44Lc0F8ht RYZt36l+PpFLBUTUqPEo3/f+a3szzUH36x+sryt+ehspLfGRrwkjxZFW9EO9xWVI GOtEU2c+hMJ1WdMHZYVNfzZlZiDdO9JaBpyzSNZ64X1glI9HbTJfHP/zYahb1y/z 1+6nVi6qVDVvDtaFMasVEo6nPYrsdH2HhfS2XoNjBbD6wF9v0Lm9Kczi/0ElSdw2 cWRIji9A8/gjPqgSTmi7rA== X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dmarc=pass (p=none dis=none) header.from=enjuk.jp X-Mailman-Original-Authentication-Results: smtp4.osuosl.org; dkim=pass (2048-bit key) header.d=enjuk.jp header.i=@enjuk.jp header.a=rsa-sha256 header.s=rs20251215 header.b=Vbze38Tg Subject: [Intel-wired-lan] [PATCH v2 iwl-next 2/3] igc: 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 igc_ethtool_get_rxfh_key_size() and extend igc_ethtool_get_rxfh() to return the RSS key to userspace. This can be tested using `ethtool -x `. Signed-off-by: Kohei Enju Tested-by: Avigail Dahan Reviewed-by: Vitaly Lifshits Reviewed-by: Simon Horman Reviewed-by: Aleksandr Loktionov --- drivers/net/ethernet/intel/igc/igc_ethtool.c | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/drivers/net/ethernet/intel/igc/igc_ethtool.c b/drivers/net/ethernet/intel/igc/igc_ethtool.c index 1b4075e7e8e6..661b044073ca 100644 --- a/drivers/net/ethernet/intel/igc/igc_ethtool.c +++ b/drivers/net/ethernet/intel/igc/igc_ethtool.c @@ -1502,6 +1502,11 @@ void igc_write_rss_indir_tbl(struct igc_adapter *adapter) } } +static u32 igc_ethtool_get_rxfh_key_size(struct net_device *netdev) +{ + return IGC_RSS_KEY_SIZE; +} + static u32 igc_ethtool_get_rxfh_indir_size(struct net_device *netdev) { return IGC_RETA_SIZE; @@ -1514,10 +1519,13 @@ static int igc_ethtool_get_rxfh(struct net_device *netdev, int i; rxfh->hfunc = ETH_RSS_HASH_TOP; - if (!rxfh->indir) - return 0; - for (i = 0; i < IGC_RETA_SIZE; i++) - rxfh->indir[i] = adapter->rss_indir_tbl[i]; + + if (rxfh->indir) + for (i = 0; i < IGC_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; } @@ -2195,6 +2203,7 @@ static const struct ethtool_ops igc_ethtool_ops = { .get_rxnfc = igc_ethtool_get_rxnfc, .set_rxnfc = igc_ethtool_set_rxnfc, .get_rx_ring_count = igc_ethtool_get_rx_ring_count, + .get_rxfh_key_size = igc_ethtool_get_rxfh_key_size, .get_rxfh_indir_size = igc_ethtool_get_rxfh_indir_size, .get_rxfh = igc_ethtool_get_rxfh, .set_rxfh = igc_ethtool_set_rxfh, -- 2.51.0