From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=148.163.158.5 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796151781; b=bTANm9MYMC58i9oztMdQlSYvWDnKw3sQx+VB2BeHmkVJK1yUgtYCgRGDUzD1AQSa3QDf x97JL9SH5oH2UuiN7cQKu5nRiRqKM3PpfcRyy48ZuYmQJO09Sv7Wc7nSfVpTUME75RW/M OaQi2lHyrvpIuyN/IxUXF5o3CcQioVZGuacUQu5ESgO15Cr6QQzxXNjgSaNU6IVR/HL4U laCazar8/NATr5/BLaQMGvcRApupUs+NBHIEYak+oc7NDdhd1ArHE3y5AF17o09jjoP06 QbW5GN5d80JlzD5Teqr6otAj2aDKCwyaMzlgoPS4MSH5kFwi8jhP93jLFqi9C9Cphlg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796151781; h=DMARC-Filter:Received:DKIM-Signature:Received:Received:Received: Received:Received:Received:Received:From:To:Cc:Subject:Date: Message-Id:X-Mailer:MIME-Version:Content-Transfer-Encoding: X-TM-AS-GCONF:X-Proofpoint-Reinject:X-Proofpoint-Spam-Info: X-Authority-Analysis:X-Proofpoint-Spam-Details-Enc:X-Proofpoint-GUID: X-Proofpoint-ORIG-GUID:X-Proofpoint-Virus-Version: X-Proofpoint-Spam-Details; bh=WnABuVLsBaQ/iO/EC1KcJZ84ml9ySewgpY+WQ1uBXXQ=; b=48VhMJoyDBEn09TALATKb4KGDEVKyWjyG3Nm9s21w9aRMpzlv0Nqi/vxMbsncAU0Qj7M cPOvHDkNe3+7SeYV5/Cgvc9Oqx8ujMsvHCTT22t3XkyLIyc0DIdxyw/IIQzhGIZ4SmcyC q/mcMAOqR0FyVZw5oS/I6QzldJf1FzjhiY4JmxRh6A7cC4Vuj1TIefq73E0nwX+YhzVXR yR0eTtf/WnMK1KTyPvJbW7Nmrr9kB+1AycrHZ1ztcig7wC12UhhchbrZ4yo5NTUTwGIYZ 2CXkI/NN0RdPdXc5YmzvCmP9BXcEOuCOwk456Jc4AlEAGm9rej4eWuV1KtkvvXoSpSw== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=linux.ibm.com; spf=pass smtp.mailfrom=linux.ibm.com; dkim=pass header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=AEy7PQ0z; arc=none smtp.remote-ip=148.163.158.5 Received: from mx0b-001b2d01.pphosted.com (mx0b-001b2d01.pphosted.com [148.163.158.5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A3E29606A329 for ; Tue, 1 Dec 2026 19:03:00 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org A3E29606A329 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=AEy7PQ0z Received: from pps.filterd (m0356516.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.18.1.11/8.18.1.11) with ESMTP id 6B1F69OU2083503; Tue, 1 Dec 2026 19:02:30 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc :content-transfer-encoding:date:from:message-id:mime-version :subject:to; s=pp1; bh=WnABuVLsBaQ/iO/EC1KcJZ84ml9ySewgpY+WQ1uBX XQ=; b=AEy7PQ0zqnd8cY71T+a1upWKADZupLdplrtpTGA8E2/VBSgKZvwTA8JwO hB/WYFIyKjw8LuFGRpfUOPSBwOBFowP6EA67fchaZVYX0w3TEZjEa19Dvc2Qjbul fw1oOkGclJH3n1Tdli3QR3sW5ZLxhPZCbdj+Ydgbl37TO8Lh7h8oTQxIr0QQCves Q4aQLBIx40K/JrGousYYJ7bCeGfCY6Q/xGc//4wtB3dp8JhlehYRP3AucWd3TnXR fCkzZcUYACDqOG7/cMCSaZ4VnlRQS4TjUtihxTXY0mn7lVdEZ0NrNTyg3c+R/bKu IE7rRysX/t7yeFyVh8UzeVWaZLECQ== Received: from ppma23.wdc07v.mail.ibm.com (5d.69.3da9.ip4.static.sl-reverse.com [169.61.105.93]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 4j7mcke1mf-1 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Tue, 01 Dec 2026 19:02:29 +0000 (GMT) Received: from pps.filterd (ppma23.wdc07v.mail.ibm.com [127.0.0.1]) by ppma23.wdc07v.mail.ibm.com (8.18.1.11/8.18.1.11) with ESMTP id 6B1Hf7JG3003749; Tue, 1 Dec 2026 19:02:28 GMT Received: from smtprelay03.wdc07v.mail.ibm.com ([172.16.1.70]) by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4ja2uv0bs2-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Tue, 01 Dec 2026 19:02:28 +0000 (GMT) Received: from smtpav01.wdc07v.mail.ibm.com (smtpav01.wdc07v.mail.ibm.com [10.39.53.228]) by smtprelay03.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 6B1J1Ycx27853552 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 1 Dec 2026 19:01:34 GMT Received: from smtpav01.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 2E38A58063; Tue, 1 Dec 2026 19:02:26 +0000 (GMT) Received: from smtpav01.wdc07v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DFF1058067; Tue, 1 Dec 2026 19:02:22 +0000 (GMT) Received: from localhost.localdomain (unknown [9.67.162.22]) by smtpav01.wdc07v.mail.ibm.com (Postfix) with ESMTP; Tue, 1 Dec 2026 19:02:22 +0000 (GMT) From: Mingming Cao To: netdev@vger.kernel.org Cc: Mingming Cao , maddy@linux.ibm.com, mpe@ellerman.id.au, npiggin@gmail.com, chleroy@kernel.org, ritesh.list@gmail.com, sshegde@linux.ibm.com, nnac123@linux.ibm.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, linuxppc-dev@lists.ozlabs.org, horms@kernel.org, davemarq@linux.ibm.com, haren@linux.ibm.com, ricklind@linux.ibm.com, bjking1@linux.ibm.com, shaik.abdulla1@ibm.com, willemb@google.com Subject: [PATCH net-next v9 00/13] ibmveth: Add multi-queue RX support Date: Tue, 1 Dec 2026 11:02:03 -0800 Message-Id: <20261201190216.62407-1-mmc@linux.ibm.com> X-Mailer: git-send-email 2.39.3 (Apple Git-146) X-Mailing-List: netdev@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-Reinject: loops=2 maxloops=12 X-Proofpoint-Spam-Info: AW1haW4tMjYxMjAxMDA3NCBTYWx0ZWRfX7hzDtcA50uFZ kozZfu+eFwguyLmNHo+ucXbGcBb+HREU6GedeyttW4xSiWLiBKgBGEkGBY1gBnzC46zdcjatuvO /Brn5A7iGLuMkvGFx3TPx8hUItBbxyo= X-Authority-Analysis: v=2.4 cv=MtfHeGae c=1 sm=1 tr=0 ts=6b0f19c5 cx=c_pps a=3Bg1Hr4SwmMryq2xdFQyZA==:117 a=3Bg1Hr4SwmMryq2xdFQyZA==:17 a=pUM-KoujPXoA:10 a=VkNPw1HP01LnGYTKEx00:22 a=RnoormkPH1_aCDwRdu11:22 a=Y2IxJ9c9Rs8Kov3niI8_:22 a=VwQbUJbxAAAA:8 a=VnNF1IyMAAAA:8 a=IcRoxNPJwKQxnIn-OgQA:9 a=O8hF6Hzn-FEA:10 X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMjAxMDA3NCBTYWx0ZWRfX1ugo89uClTu4 +zMt5NuWzPIMvj3P0pGrcTykSGMpP+x00V+b4cV1dPBp8u6rYvaPdbiihLStCCzC6lFDT9v4Yqt bHYGgLHHN3iN0VUNHt5CS/yOH5ca2Ti2MTdTpgIBwl0YUnGmo1nXixFq3aRr9CbETJy2iDHXz5D 2rGodUfsBKi5wFfKW94EWl6lVGsRAcYtUMwYGZbSZJXkwJA9TB+nkMq0jeBk82evlVw6W6oGLr4 d3KS53H/7aPznEpAqsAyl1VZVhjDunvflI1kC12mDNtpXhZtcXAEaO8O96aYRQT60RRC4+ljHRq fByCjZxWT0YCcPC+I/HdSRcl/W9CvmWFydUQyWU6kmJW3NDup2ewiSWD6VVEjHuM7BTlACkvYJ6 Vhz8TGB2vzAJ7/rHXcHftQqvp1Fhb/lnfQ7enml9Xif9q+EtXW3SUhUGJMPNsTtlpi7C+smwDNJ aZQrQBDOaCmVl2pNVCA== X-Proofpoint-GUID: H4c8pPreXq31FEGlhlBu13CXOtZbVIys X-Proofpoint-ORIG-GUID: UKpYDe3qNkZf6XBctaKqVrJn_YWQyKeC X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1176,Hydra:6.1.138,FMLib:17.12.100.49 definitions=2026-12-01_03,2026-12-01_01,2025-10-01_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 adultscore=0 bulkscore=0 malwarescore=0 spamscore=0 phishscore=0 clxscore=1015 priorityscore=1501 lowpriorityscore=0 suspectscore=0 impostorscore=0 classifier=typeunknown authscore=0 authtc= authcc= route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001 definitions=main-2612010074 ibmveth receives on a single RX queue with one interrupt, so all of a virtual ethernet adapter's receive processing runs on one CPU. On Power11, PHYP (the PowerVM hypervisor) can give the adapter several RX queues, each with its own interrupt and buffers. TX is already multi-queue; this series is about RX. This is v9 of "ibmveth: Add multi-queue RX support" [3]. v8 patches 2-9 became "ibmveth: prepare the RX path for multi-queue" [1], now in net-next, which made open/close, buffer pools, interrupts, replenish and poll take a queue index, with IBMVETH_MAX_RX_QUEUES still 1. This series is the rest of v8, reworked after Jakub's review [4], and turns on multi-queue (MQ) RX on top of [1]. When firmware advertises MQ, ibmveth supports up to 16 RX queues. It comes up with netif_get_num_default_rss_queues() of them, at most 8, and ethtool -L can set 1 to 16. Older firmware stays single-queue. PHYP picks the queue for each frame with a hash, so there is no RSS configuration. Patches 1-2 fix existing behavior and do not depend on the rest: 1 keeps a buffer pool enabled after its allocation fails, and 2 gives each TX queue its own counters (today's TX queues race on shared ones). One only matters after an allocation failure and the other only loses statistics, so both go to net-next. The MQ patches build on both, so they lead this series rather than go alone. Patches 3-8 add MQ with it still off. 3-7 are the hypervisor calls (hcalls): the hcall numbers (tools/perf names follow separately), queue handles, subordinate queue registration, their interrupt control, and the MQ buffer hcall. 8 starts every queue on open and resume. Patches 9-11 are RX statistics: per-queue RX counters, rx_no_buffer kept across ifdown/up and reported as rx_missed_errors in ip -s link, and per-queue qstats through netdev_stat_ops. ethtool -S keeps its keys. Patch 12 turns MQ on and raises IBMVETH_MAX_RX_QUEUES to 16. Patch 13 lets ethtool -L change the RX count (1-16) by closing and reopening the device, as an MTU change does. Each queue's buffers are refilled only from its own NAPI poll, and the queue count only changes with the device closed, so the RX path takes no locks. Two error paths rely on PHYP behavior. An unexpected H_FUNCTION (hcall not supported) from the MQ buffer hcall schedules a reset, and the device is left down if it comes back after the reopen (patch 7). PHYP fails H_FREE_LOGICAL_LAN only with H_PARAMETER, when no LAN is registered. Any other failure in MQ mode leaks the RX memory, still mapped, because PHYP may still write to it (patch 5). Testing: ppc64le W=1 build of ibmveth.o at every commit, no warnings. ppc64le PowerVM LPAR (Power11, FW1130), MQ firmware (max RX 16), iperf3 inbound traffic from a peer LPAR: * ifdown/up churn, module reload, jumbo MTU, ethtool -L rx 1->8->16->1 live and in down-state; 0 invalid buffers, 0 replenish failures * ethtool -L cycling under iperf3 and 20 close/open rounds under load * 300s parallel resize+churn stress; rx counters coherent across sysfs, ip -s link and /proc/net/dev throughout * small-packet: about 1.6x the packet rate with 8 RX queues over one queue; this LPAR's VIOS (Virtual I/O Server) was on one socket Changes in v9: v8 was too large to review as one, and Jakub [4] suggested about three smaller series. v8 patches 2-9 became [1], which addresses his comments on them. This series is the rest of v8, cut down; together with [1] it adds about 2100 lines, where v8 added 4300: * ethtool -L closes and reopens the device instead of resizing live. That removes replenish_lock, H_FREE_LOGICAL_LAN_QUEUE, debugfs buffer_pools and the per-queue ethtool -S keys; qstats is the per-queue view. It also leaves ethtool -L as one small patch (13), so it ends this series instead of forming a third. * v8 fell back to one queue when an MQ hcall returned H_FUNCTION. That is gone: PowerVM blocks Live Partition Migration to a host without MQ support, so the MQ hcalls cannot disappear under a running adapter. * No defensive WARN_ON checks, and shorter commit messages, as [4] asked of the earlier patches. * The two fixes come first: patch 1 is new (raised in review of [1]), and patch 2, the per-queue TX counters, was part of v8's statistics patch. * The hcall numbers are a separate powerpc patch. Based on net-next, which has the two ibmveth fixes [2] (eeb2b4377350, 60838e936e1c) and [1] (09a20f1c4a7d..ea25991402e7). [1] https://lore.kernel.org/netdev/20261123075136.3278-1-mmc@linux.ibm.com/ [2] https://lore.kernel.org/netdev/20261123075102.2962-1-mmc@linux.ibm.com/ [3] https://lore.kernel.org/netdev/20261109235556.60604-1-mmc@linux.ibm.com/ [4] https://lore.kernel.org/netdev/20261116174225.7d9e9611@kernel.org/ Mingming Cao (13): ibmveth: Keep a buffer pool enabled after its allocation fails ibmveth: Keep TX statistics per queue powerpc/pseries: Add hcall numbers for multi-queue virtual ethernet ibmveth: Add RX queue handles ibmveth: Register subordinate RX queues ibmveth: Add subordinate RX queue interrupt control ibmveth: Add the MQ RX buffer submit hypercall ibmveth: Start every RX queue on open and resume ibmveth: Keep RX statistics per queue ibmveth: Keep rx_no_buffer across ifdown/up ibmveth: Report per-queue statistics through netdev_stat_ops ibmveth: Enable multi-queue RX ibmveth: Allow changing the RX queue count arch/powerpc/include/asm/hvcall.h | 5 +- drivers/net/ethernet/ibm/ibmveth.c | 1022 +++++++++++++++++++++++++--- drivers/net/ethernet/ibm/ibmveth.h | 170 ++++- 3 files changed, 1075 insertions(+), 122 deletions(-) base-commit: d7f7fac1c3220a430559c6d43904e27917ae1eb0 -- 2.50.1 (Apple Git-155)