{"id":2219504,"url":"http://patchwork.ozlabs.org/api/patches/2219504/?format=json","web_url":"http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260403055948.3800555-1-aleksandr.loktionov@intel.com/","project":{"id":46,"url":"http://patchwork.ozlabs.org/api/projects/46/?format=json","name":"Intel Wired Ethernet development","link_name":"intel-wired-lan","list_id":"intel-wired-lan.osuosl.org","list_email":"intel-wired-lan@osuosl.org","web_url":"","scm_url":"","webscm_url":"","list_archive_url":"","list_archive_url_format":"","commit_url_format":""},"msgid":"<20260403055948.3800555-1-aleksandr.loktionov@intel.com>","list_archive_url":null,"date":"2026-04-03T05:59:48","name":"[iwl-net] ice: fix netdev allocation with max queues instead of default","commit_ref":null,"pull_url":null,"state":"rejected","archived":false,"hash":"041c06d98a62642fd6d14341155c55295f8880b6","submitter":{"id":75597,"url":"http://patchwork.ozlabs.org/api/people/75597/?format=json","name":"Loktionov, Aleksandr","email":"aleksandr.loktionov@intel.com"},"delegate":null,"mbox":"http://patchwork.ozlabs.org/project/intel-wired-lan/patch/20260403055948.3800555-1-aleksandr.loktionov@intel.com/mbox/","series":[{"id":498594,"url":"http://patchwork.ozlabs.org/api/series/498594/?format=json","web_url":"http://patchwork.ozlabs.org/project/intel-wired-lan/list/?series=498594","date":"2026-04-03T05:59:48","name":"[iwl-net] ice: fix netdev allocation with max queues instead of default","version":1,"mbox":"http://patchwork.ozlabs.org/series/498594/mbox/"}],"comments":"http://patchwork.ozlabs.org/api/patches/2219504/comments/","check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/2219504/checks/","tags":{},"related":[],"headers":{"Return-Path":"<intel-wired-lan-bounces@osuosl.org>","X-Original-To":["incoming@patchwork.ozlabs.org","intel-wired-lan@lists.osuosl.org"],"Delivered-To":["patchwork-incoming@legolas.ozlabs.org","intel-wired-lan@lists.osuosl.org"],"Authentication-Results":["legolas.ozlabs.org;\n\tdkim=pass (2048-bit key;\n unprotected) header.d=osuosl.org header.i=@osuosl.org header.a=rsa-sha256\n header.s=default header.b=rjeYnaJR;\n\tdkim-atps=neutral","legolas.ozlabs.org;\n spf=pass (sender SPF authorized) smtp.mailfrom=osuosl.org\n (client-ip=2605:bc80:3010::137; helo=smtp4.osuosl.org;\n envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=patchwork.ozlabs.org)"],"Received":["from smtp4.osuosl.org (smtp4.osuosl.org [IPv6:2605:bc80:3010::137])\n\t(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)\n\t key-exchange x25519 server-signature ECDSA (secp384r1) server-digest SHA384)\n\t(No client certificate requested)\n\tby legolas.ozlabs.org (Postfix) with ESMTPS id 4fn7NX2Jcfz1yD3\n\tfor <incoming@patchwork.ozlabs.org>; Fri, 03 Apr 2026 16:59:56 +1100 (AEDT)","from localhost (localhost [127.0.0.1])\n\tby smtp4.osuosl.org (Postfix) with ESMTP id E4E5440EBD;\n\tFri,  3 Apr 2026 05:59:54 +0000 (UTC)","from smtp4.osuosl.org ([127.0.0.1])\n by localhost (smtp4.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id XrHt1aHhs_go; Fri,  3 Apr 2026 05:59:53 +0000 (UTC)","from lists1.osuosl.org (lists1.osuosl.org [140.211.166.142])\n\tby smtp4.osuosl.org (Postfix) with ESMTP id 9A29140E0C;\n\tFri,  3 Apr 2026 05:59:53 +0000 (UTC)","from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138])\n by lists1.osuosl.org (Postfix) with ESMTP id F3F202CC\n for <intel-wired-lan@lists.osuosl.org>; Fri,  3 Apr 2026 05:59:51 +0000 (UTC)","from localhost (localhost [127.0.0.1])\n by smtp1.osuosl.org (Postfix) with ESMTP id E5BE2807E6\n for <intel-wired-lan@lists.osuosl.org>; Fri,  3 Apr 2026 05:59:51 +0000 (UTC)","from smtp1.osuosl.org ([127.0.0.1])\n by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP\n id 7Ck7iF76ZlLW for <intel-wired-lan@lists.osuosl.org>;\n Fri,  3 Apr 2026 05:59:51 +0000 (UTC)","from mgamail.intel.com (mgamail.intel.com [192.198.163.10])\n by smtp1.osuosl.org (Postfix) with ESMTPS id 2D40280798\n for <intel-wired-lan@lists.osuosl.org>; Fri,  3 Apr 2026 05:59:50 +0000 (UTC)","from orviesa007.jf.intel.com ([10.64.159.147])\n by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384;\n 02 Apr 2026 22:59:50 -0700","from amlin-019-225.igk.intel.com ([10.102.19.225])\n by orviesa007.jf.intel.com with ESMTP; 02 Apr 2026 22:59:49 -0700"],"X-Virus-Scanned":["amavis at osuosl.org","amavis at osuosl.org"],"X-Comment":"SPF check N/A for local connections - client-ip=140.211.166.142;\n helo=lists1.osuosl.org; envelope-from=intel-wired-lan-bounces@osuosl.org;\n receiver=<UNKNOWN> ","DKIM-Filter":["OpenDKIM Filter v2.11.0 smtp4.osuosl.org 9A29140E0C","OpenDKIM Filter v2.11.0 smtp1.osuosl.org 2D40280798"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=osuosl.org;\n\ts=default; t=1775195993;\n\tbh=jsZIIayd+SFS7tLtcJrkElZB1iFFIIXSFMR1hfPcVt0=;\n\th=From:To:Cc:Date:Subject:List-Id:List-Unsubscribe:List-Archive:\n\t List-Post:List-Help:List-Subscribe:From;\n\tb=rjeYnaJRgBtjMyGF/7BJd2JYGzL46MdWYjFIG+/kof2uEoKNlc6x6rdyiqgobsRy5\n\t gnHPSJvYAt7Ml4M8Io2Fa6smt/73X/wwo9D87O4MsDv/3A74nduvVHAE9yL0I8jIxY\n\t CK5Y8rVnXWSM/Z7XxKcjSfucQ/wEzN7oHYfk1sImrXbvfBTLb9r5VvLy/EYcNLWy/e\n\t Axf0/wAYBCx4CJXz5MGZapTLPX9/gf2Y7AQolbVgBnqrQloPbQ4Xq7QJpmMae5chP+\n\t rcWuj16sua+dos65gFUucbDrKn/ly3lxsF8l1n6Cu4jS8p/lnnvY26wQ2RVI9b3LMx\n\t QQFGh5HC5trxA==","Received-SPF":"Pass (mailfrom) identity=mailfrom; client-ip=192.198.163.10;\n helo=mgamail.intel.com; envelope-from=aleksandr.loktionov@intel.com;\n receiver=<UNKNOWN>","DMARC-Filter":"OpenDMARC Filter v1.4.2 smtp1.osuosl.org 2D40280798","X-CSE-ConnectionGUID":["6i/BDQ5YTuCOHMYz/KmLHw==","BSKNbz52SEWx0SKtddhLcg=="],"X-CSE-MsgGUID":["cXOZs07yQe+oG1CIKSDIkw==","vaTLvJYRTYu3CScoQu0u8Q=="],"X-IronPort-AV":["E=McAfee;i=\"6800,10657,11747\"; a=\"87649923\"","E=Sophos;i=\"6.23,157,1770624000\"; d=\"scan'208\";a=\"87649923\"","E=Sophos;i=\"6.23,157,1770624000\"; d=\"scan'208\";a=\"227426251\""],"X-ExtLoop1":"1","From":"Aleksandr Loktionov <aleksandr.loktionov@intel.com>","To":"intel-wired-lan@lists.osuosl.org, anthony.l.nguyen@intel.com,\n aleksandr.loktionov@intel.com","Cc":"netdev@vger.kernel.org","Date":"Fri,  3 Apr 2026 07:59:48 +0200","Message-ID":"<20260403055948.3800555-1-aleksandr.loktionov@intel.com>","X-Mailer":"git-send-email 2.52.0","MIME-Version":"1.0","Content-Transfer-Encoding":"8bit","X-Mailman-Original-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/simple;\n d=intel.com; i=@intel.com; q=dns/txt; s=Intel;\n t=1775195991; x=1806731991;\n h=from:to:cc:subject:date:message-id:mime-version:\n content-transfer-encoding;\n bh=hkh+Nmw/K44d7gAG5USnMmol1zayw7cvyPtDXFrWDIM=;\n b=VwbB2M8Yifq908KyH+Udp7D0DWj341nCv/OqBbFmn/A6IpZgvilpq19d\n RQHdS42ixvBCTsyqPWErkZK/R64bZDfE5OHtVZHLaEV287ZjrWrGoOysp\n uTjfxUGIalycBuu9zToU08Li3hmuvvHe8APSDwl+/JPSFHRaamRsRoFf8\n sFDHF2AS0C8g4XvfTSzsdMC4hngKhZz6jwtHFD5JFOGNbMXb5dPT7f7ec\n RXSAncfMFpplp4KCjst9GPVHByrHZaTSwptYZi7n471vKccvBKFlsZqs1\n 0taRVUpCYqKf/fhQPdi8e+xTVazgjQ9RjCW33HA5zj7SBudMc6/9ytRoH\n w==;","X-Mailman-Original-Authentication-Results":["smtp1.osuosl.org;\n dmarc=pass (p=none dis=none)\n header.from=intel.com","smtp1.osuosl.org;\n dkim=pass (2048-bit key,\n unprotected) header.d=intel.com header.i=@intel.com header.a=rsa-sha256\n header.s=Intel header.b=VwbB2M8Y"],"Subject":"[Intel-wired-lan] [PATCH iwl-net] ice: fix netdev allocation with\n max queues instead of default","X-BeenThere":"intel-wired-lan@osuosl.org","X-Mailman-Version":"2.1.30","Precedence":"list","List-Id":"Intel Wired Ethernet Linux Kernel Driver Development\n <intel-wired-lan.osuosl.org>","List-Unsubscribe":"<https://lists.osuosl.org/mailman/options/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=unsubscribe>","List-Archive":"<http://lists.osuosl.org/pipermail/intel-wired-lan/>","List-Post":"<mailto:intel-wired-lan@osuosl.org>","List-Help":"<mailto:intel-wired-lan-request@osuosl.org?subject=help>","List-Subscribe":"<https://lists.osuosl.org/mailman/listinfo/intel-wired-lan>,\n <mailto:intel-wired-lan-request@osuosl.org?subject=subscribe>","Errors-To":"intel-wired-lan-bounces@osuosl.org","Sender":"\"Intel-wired-lan\" <intel-wired-lan-bounces@osuosl.org>"},"content":"Commit ee13aa1a2c5a (\"ice: use netif_get_num_default_rss_queues()\")\nchanged the default queue count from num_online_cpus() to\nnetif_get_num_default_rss_queues() which returns roughly half the CPU\ncount.  ice_cfg_netdev() passes vsi->alloc_txq and vsi->alloc_rxq to\nalloc_etherdev_mqs(), so after that commit the netdevice is created with\nonly ~half the CPU count of Tx/Rx queues (dev->num_tx_queues).  However\nice_get_channels() still reports the old maximum (num_online_cpus()),\nand ice_set_channels() accepts requests up to that limit.  When ethtool\n -L sets combined to the maximum, rings are assigned q_index values up to\nnum_online_cpus()-1, which exceed dev->num_tx_queues:\n\n  # ethtool -L eth0 combined 96\n\n  ice 0000:18:00.0: Failed to allocate 96 q_vectors for VSI 12, new value 49\n  WARNING: CPU: 25 PID: 4484 at net/core/dev.c:2853 __netif_set_xps_queue+0x835/0x9a0\n  [...]\n  Call Trace:\n   <TASK>\n   netif_set_xps_queue+0x82/0xc0\n   ice_vsi_cfg_txq+0x124/0x440 [ice]\n   ice_vsi_cfg_lan_txqs+0x53/0x90 [ice]\n   ice_vsi_cfg_lan+0x40/0x190 [ice]\n   ice_vsi_open+0x2b/0x120 [ice]\n   ice_vsi_recfg_qs+0x94/0x120 [ice]\n   ice_set_channels+0x261/0x370 [ice]\n   [...]\n\nSUT: Intel S2600WFT, 96 CPUs (Xeon Platinum 8260), E810-C for QSFP\n\nReproduce:\n  ethtool -L <iface> combined $(nproc)\n\nUse min(num_online_cpus(), hw queue cap) for alloc_etherdev_mqs() to\nsize the netdevice for the actual maximum queue count, matching what\nice_get_channels() reports through ethtool.\n\nFixes: ee13aa1a2c5a (\"ice: use netif_get_num_default_rss_queues()\")\nCc: stable@vger.kernel.org\nSigned-off-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>\n---\n drivers/net/ethernet/intel/ice/ice_main.c | 7 +++++--\n 1 file changed, 5 insertions(+), 2 deletions(-)","diff":"diff --git a/drivers/net/ethernet/intel/ice/ice_main.c b/drivers/net/ethernet/intel/ice/ice_main.c\nindex 4da37ca..5c21c2a 100644\n--- a/drivers/net/ethernet/intel/ice/ice_main.c\n+++ b/drivers/net/ethernet/intel/ice/ice_main.c\n@@ -4699,8 +4699,11 @@ static int ice_cfg_netdev(struct ice_vsi *vsi)\n \tstruct net_device *netdev;\n \tu8 mac_addr[ETH_ALEN];\n \n-\tnetdev = alloc_etherdev_mqs(sizeof(*np), vsi->alloc_txq,\n-\t\t\t\t    vsi->alloc_rxq);\n+\tnetdev = alloc_etherdev_mqs(sizeof(*np),\n+\t\t\t\t    min_t(int, num_online_cpus(),\n+\t\t\t\t\t   vsi->back->hw.func_caps.common_cap.num_txq),\n+\t\t\t\t    min_t(int, num_online_cpus(),\n+\t\t\t\t\t   vsi->back->hw.func_caps.common_cap.num_rxq));\n \tif (!netdev)\n \t\treturn -ENOMEM;\n \n","prefixes":["iwl-net"]}