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 smtp1.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (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 BCAB7CA6CB6 for ; Tue, 27 Jan 2026 08:58:26 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 82899822B0; Tue, 27 Jan 2026 08:58:26 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id RFyW8_UvPfUh; Tue, 27 Jan 2026 08:58:24 +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 smtp1.osuosl.org 9BE7A8224E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org; s=default; t=1769504304; bh=uX/5mrMkeTkN9LjvZeBrGkA31EqPLswoMX6OI/4YseM=; h=From:To:CC:Date:In-Reply-To:References:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=9jCKQIALLTuAtBqVRjl4RwDE/sEk8NPKSP4IuXnWkaeWuuxEYY4Y1+6u4UO73w85W t4yul5R5snnfY0c8M5j940ZrUm3o34KwXxuuXqTwZLcS4QgKXMCUPitz8aZFCLr6pp 7oL74QCfTMp1nGwEbSZCP5rXCNzNbSOy2Z1iVFy64Vjxe6Z0/4Qmzsqeq+2DvYeIJ3 pzVRXHFNSPT6oSls/KLtZjnI34sJq7OPZxm4nAUnl4XSXuBNc6sO+R1FXyu3y9M1oa rKVo6b96rU9hzB4IoQLPh1NGhfazfzinWFoASZcOkIPQ/HCbNeIvRpzsBB1OlKWxRl YTYr+ZmbKA5+Q== Received: from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142]) by smtp1.osuosl.org (Postfix) with ESMTP id 9BE7A8224E; Tue, 27 Jan 2026 08:58:24 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by lists1.osuosl.org (Postfix) with ESMTP id 8B40533A for ; Tue, 27 Jan 2026 08:58:22 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 784A340B84 for ; Tue, 27 Jan 2026 08:58:22 +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 Fd_Ioe5NH2tW for ; Tue, 27 Jan 2026 08:58:21 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=50.112.246.219; helo=pdx-out-015.esa.us-west-2.outbound.mail-perimeter.amazon.com; envelope-from=prvs=4803e00d0=takkozu@amazon.co.jp; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp4.osuosl.org 5DA4940B76 DKIM-Filter: OpenDKIM Filter v2.11.0 smtp4.osuosl.org 5DA4940B76 Received: from pdx-out-015.esa.us-west-2.outbound.mail-perimeter.amazon.com (pdx-out-015.esa.us-west-2.outbound.mail-perimeter.amazon.com [50.112.246.219]) by smtp4.osuosl.org (Postfix) with ESMTPS id 5DA4940B76 for ; Tue, 27 Jan 2026 08:58:21 +0000 (UTC) X-CSE-ConnectionGUID: Yuatk1bvSKOSx5SsuqALRg== X-CSE-MsgGUID: +JWy8BhZQ7+lBNDztTlZiw== X-IronPort-AV: E=Sophos;i="6.21,256,1763424000"; d="scan'208";a="11489358" 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-015.esa.us-west-2.outbound.mail-perimeter.amazon.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Jan 2026 08:58:17 +0000 Received: from EX19MTAUWB002.ant.amazon.com [205.251.233.111:9193] by smtpin.naws.us-west-2.prod.farcaster.email.amazon.dev [10.0.53.66:2525] with esmtp (Farcaster) id 14b8c192-8f08-4013-8f10-c3ddba579f9f; Tue, 27 Jan 2026 08:58:17 +0000 (UTC) X-Farcaster-Flow-ID: 14b8c192-8f08-4013-8f10-c3ddba579f9f Received: from EX19D001UWA001.ant.amazon.com (10.13.138.214) by EX19MTAUWB002.ant.amazon.com (10.250.64.231) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA) id 15.2.2562.35; Tue, 27 Jan 2026 08:58:17 +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, 27 Jan 2026 08:58:15 +0000 From: Takashi Kozu To: CC: , , , , , , , , , , , , Takashi Kozu Date: Tue, 27 Jan 2026 17:54:10 +0900 Message-ID: <20260127085410.79645-8-takkozu@amazon.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20260127085410.79645-5-takkozu@amazon.com> References: <20260127085410.79645-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: EX19D039UWB003.ant.amazon.com (10.13.138.93) 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=1769504301; x=1801040301; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uX/5mrMkeTkN9LjvZeBrGkA31EqPLswoMX6OI/4YseM=; b=DY+XRpsKxb9MMyMUOHckkSJ/GaGoVP1pJAS8OnFrsrtRI3c3MAZhJxhs 6O6dsFR3rhD0ysYdxvbtJBdS2HwhDVkqq2YwkLzjnWij4JnPsFnks7wSV vHuAgJzHxdj83HKw60cuf5h7AQ+99s2PBZP/YcXAyMo6EOFtSDKF5eyD3 b2Ufe/zdF52nI2ryTXk2dzL29fR7uoOJs0oAqB7vaWgidJV9V52dD2ugp +e7x0oulX9GNfj9m17HGI0c0s8W3JTsrD0XHZBmFt7jXdipWkzgajRRye Dzg6Nl4JHZ+Yqd+P0d+E+d2cBA9nUnnRb7VKLDV9My2mmsacS5Qg891Dl 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=DY+XRpsK Subject: [Intel-wired-lan] [PATCH iwl-next v5 3/3] igb: allow configuring RSS key via ethtool set_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" Change igc_set_rxfh() to accept and save a userspace-provided RSS key. When a key is provided, store it in the adapter and write the E1000 registers accordingly. This can be tested using `ethtool -X hkey `. Signed-off-by: Takashi Kozu --- drivers/net/ethernet/intel/igb/igb_ethtool.c | 48 +++++++++++--------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/drivers/net/ethernet/intel/igb/igb_ethtool.c b/drivers/net/ethernet/intel/igb/igb_ethtool.c index b387121f0ea7..b4eef14c09d5 100644 --- a/drivers/net/ethernet/intel/igb/igb_ethtool.c +++ b/drivers/net/ethernet/intel/igb/igb_ethtool.c @@ -3357,35 +3357,39 @@ static int igb_set_rxfh(struct net_device *netdev, u32 num_queues; /* We do not allow change in unsupported parameters */ - if (rxfh->key || - (rxfh->hfunc != ETH_RSS_HASH_NO_CHANGE && - rxfh->hfunc != ETH_RSS_HASH_TOP)) + if (rxfh->hfunc != ETH_RSS_HASH_NO_CHANGE && + rxfh->hfunc != ETH_RSS_HASH_TOP) return -EOPNOTSUPP; - if (!rxfh->indir) - return 0; - num_queues = adapter->rss_queues; + if (rxfh->indir) { + num_queues = adapter->rss_queues; - switch (hw->mac.type) { - case e1000_82576: - /* 82576 supports 2 RSS queues for SR-IOV */ - if (adapter->vfs_allocated_count) - num_queues = 2; - break; - default: - break; - } + switch (hw->mac.type) { + case e1000_82576: + /* 82576 supports 2 RSS queues for SR-IOV */ + if (adapter->vfs_allocated_count) + num_queues = 2; + break; + default: + break; + } - /* Verify user input. */ - for (i = 0; i < IGB_RETA_SIZE; i++) - if (rxfh->indir[i] >= num_queues) - return -EINVAL; + /* Verify user input. */ + for (i = 0; i < IGB_RETA_SIZE; i++) + if (rxfh->indir[i] >= num_queues) + return -EINVAL; - for (i = 0; i < IGB_RETA_SIZE; i++) - adapter->rss_indir_tbl[i] = rxfh->indir[i]; + for (i = 0; i < IGB_RETA_SIZE; i++) + adapter->rss_indir_tbl[i] = rxfh->indir[i]; + + igb_write_rss_indir_tbl(adapter); + } - igb_write_rss_indir_tbl(adapter); + if (rxfh->key) { + memcpy(adapter->rss_key, rxfh->key, sizeof(adapter->rss_key)); + igb_write_rss_key(adapter); + } return 0; } -- 2.52.0