Article View: linux.kernel.netdev
Article #18858Re: [PATCH net-next v8 09/15] ibmveth: Split RX poll into per-slot helpers for MQ
From: mingming cao
Date: Thu, 19 Nov 2026 00:16
Date: Thu, 19 Nov 2026 00:16
67 lines
15073 bytes
15073 bytes
On 11/16/26 5:40 PM, Jakub Kicinski wrote:
> On Mon, 9 Nov 2026 15:55:50 -0800 Mingming Cao wrote:
>> + if (WARN_ON(queue_index < 0 ||
>> + queue_index >= adapter->num_rx_queues)) {
> You add such checks all over the place, why?
> The kernel coding style explicitly recommends against defensive
> programming.
No good reason: no caller passes an out-of-range index. They are all
removed in the split series.
>> + if (budget)
>> + napi_complete_done(napi, 0);
>> + return 0;
>> + }
>> +
>> + if (ibmveth_poll_stopping(netdev, napi)) {
> Why are you checking if the NAPI is stopping?
> Maybe I missed it in the avalanche of words in the commit message,
> you mention live resize, which I assume is patch 14. I don't get why
> you need to explicitly check this, core already does.
Yes, it was for patch 14's live resize. You're right that the core
already handles it. The check will be removed in the splited series.
>> + if (budget)
>> + napi_complete_done(napi, 0);
>> + return 0;
>> + }
>> +
>> while (frames_processed < budget) {
>> + if (ibmveth_poll_stopping(netdev, napi))
>> + break;
>> +
>> if (!ibmveth_rxq_pending_buffer(adapter, queue_index))
>> break;
>>
>> smp_rmb();
>> - correlator = ibmveth_rxq_read_correlator(adapter, queue_index);
>> if (!ibmveth_rxq_buffer_valid(adapter, queue_index)) {
>> wmb(); /* suggested by larson1 */
>> - adapter->rx_invalid_buffer++;
>> - netdev_dbg(netdev, "recycling invalid buffer\n");
>> - rc = ibmveth_rxq_harvest_buffer(adapter, queue_index,
>> - correlator, true);
>> - if (unlikely(rc)) {
>> - netdev->stats.rx_dropped++;
>> + if (ibmveth_poll_recycle_invalid(netdev, adapter,
>> + queue_index))
>> frames_processed++;
>> - continue;
>> - }
>> } else {
>> - struct sk_buff *skb, *new_skb;
>> - int length = ibmveth_rxq_frame_length(adapter,
>> - queue_index);
>> - int offset = ibmveth_rxq_frame_offset(adapter,
>> - queue_index);
>> - int csum_good = ibmveth_rxq_csum_good(adapter,
>> - queue_index);
>> - int lrg_pkt = ibmveth_rxq_large_packet(adapter,
> You should really factor out the pure code movement to a separate patch.
Done. The poll split is now movement only, apart from the bad-frame
message naming the queue. The behaviour changes it carried had no
reason of their own, so I dropped them rather than keep them as a
separate patch.
Thanks,
Mingming
Technical Details
Message-ID:
<614b3ef8-0e00-408b-a960-445c6bd2e405@linux.ibm.com>Path:
mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366572-linux-kernel-netdev=dewy.ruReferences:
<20261109235556.60604-1-mmc@linux.ibm.com> <20261109235556.60604-10-mmc@linux.ibm.com> <20261116174018.6cd71ba5@kernel.org>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!srl.newsdeef.eu!news.mb-net.net!open-news-network.org!news.nntp4.net!nntp.xenet.de!news.neodome.net!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-366572-linux-kernel-netdev=dewy.ru
From: mmc@linux.ibm.com (mingming cao)
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v8 09/15] ibmveth: Split RX poll into per-slot
helpers for MQ
Date: Wed, 18 Nov 2026 16:16:53 -0800
Organization: Usenet Network
Message-ID: <614b3ef8-0e00-408b-a960-445c6bd2e405@linux.ibm.com>
References: <20261109235556.60604-1-mmc@linux.ibm.com>
<20261109235556.60604-10-mmc@linux.ibm.com>
<20261116174018.6cd71ba5@kernel.org>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
logging-data="2739325"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:IDeAbUu/xSOi1BHwiCsquawpmZQ= sha256:DJU/w1ZjHXIroQGC7CeFv22IynroJtr3ajz0DVuc1Dg=
sha1:4oW7ElBv/j7UglVtJu6xd3FpkTY= sha256:fWXdUOSBy7SN93mH8YUgB4OwlPcMAyNXTWdvUvJSJgg=
Content-Language: en-US
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
by mail.dewy.ru (Postfix) with ESMTP id 7E3ED115454; Thu, 19 Nov 2026 03:17:32 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -2.951
X-Spam-Status: No, score=-2.951 tagged_above=-9999 required=6.31
tests=[DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
HEADER_FROM_DIFFERENT_DOMAINS=0.249, MAILING_LIST_MULTI=-1,
RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001]
autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
header.d=ibm.com
X-Received: from mail.dewy.ru ([127.0.0.1])
by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
with ESMTP id 1Pf3hliJmFBC;
Thu, 19 Nov 2026 03:17:29 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-366572-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN>
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=linux.ibm.com
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
by mail.dewy.ru (Postfix) with ESMTPS id 4586411544C; Thu, 19 Nov 2026 03:17:21 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
by sea.lore.kernel.org (Postfix) with ESMTP id BDF1522A55E; Thu, 19 Nov 2026 00:17:18 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
t=1795047438;
b=MZKL3oKwIe1Nd6oCsEpmoYl/BDgwtgKOj7UHB+Qu21ITq7R21O5R4gapANuYK0HSAxCy
RrZLg2zDSxaOFlJONqJko3lDAStAIOZkxLy25aPQs0FJWy4L95d5bnRoss0JUcEVz3fup
D/PNp34swzjqVhRKaoLndDQNt6yeQ42YHQ04RQJGpot8QZL44bQhEWteYLA5HoxZqISrR
bF4Gw6im+qUxunwoqxA4QYZ0Nr8y6wXiMp0lKvq2scM3Qf0rz18OCR3Y0ScZB5HwBliG3
ju2yIFjcccpuHyCmuS0fISlJ2Zn0oVkGgOb0id39SLYwrVsNtkz3FA5ntkrZmsNcmDw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795047438;
h=X-Original-To:Received:DMARC-Filter:Received:DKIM-Signature:Received:
Received:Received:Received:Received:Received:Received:Message-ID:Date:
X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
List-Unsubscribe:List-Owner:Precedence:MIME-Version:User-Agent:
Subject:To:Cc:References:Content-Language:From:In-Reply-To:
Content-Type:Content-Transfer-Encoding:X-TM-AS-GCONF:
X-Proofpoint-Reinject:X-Proofpoint-ORIG-GUID:X-Proofpoint-GUID:
X-Proofpoint-Spam-Details-Enc:X-Proofpoint-Spam-Info:
X-Authority-Analysis:X-Proofpoint-Virus-Version:
X-Proofpoint-Spam-Details;
bh=xA0UJdaWjcLJwESH6GytqwneDgaiE76tWOywSb/nkYI=;
b=vz7m7a2gzPMuSh0kmRz/ipe5beDsGRnmfS6PNgdy4x1iDMGAZyY9XGOBN2s9mVz4ziXe
5cv99mAYe/GvNtyOu0M6o7bcOfcx1jqOrWAFqXu1IV+xT9OGhC0gKK0v+Rn+GfjVBUvvk
geRtJbeSA8ip3JwlRluSu7kxsb+OgchtD8mAXI1CVlmKWWMZRMFZ8EyjdjGp9NvHTkJxZ
ItaIYvYLfjAhvnZ2QonlaA5I34LEC8Ee0NwzxDHESq4G98RWJ5b8RUFRTG36+j2nSLkL9
S6qdGlfTnVj1a+fkkap8YXYrSYN/d4W3VPn6tBBRCbiWc+6wuq736E/kaljAZpQMRTQ==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org;
dkim=pass header.d=ibm.com header.i=@ibm.com header.a=rsa-sha256 header.s=pp1 header.b=Xmyy9OyU;
dmarc=pass header.from=linux.ibm.com;
spf=pass smtp.mailfrom=linux.ibm.com;
arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
by smtp.subspace.kernel.org (Postfix) with ESMTP id 92953606A320;
Thu, 19 Nov 2026 00:17:18 +0000 (UTC)
X-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=Xmyy9OyU
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=148.163.158.5
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
t=1795047437;
b=ibvwN8OdA+YD4OZyW/HRh/zWFbEfoRLQTrIVMgsdlMprlXa1jVG242GDnjWdNo4p0CJx
6OKAX07YX9RUR3ThFjfwb40QpCu+Q3FXsoGxhcDsDFIfAsVLTxPrwIZqALChGPXVgqss5
y99ngKcsbwt+toVTuNud039wdsy0U7s3umkvo9sUsqDdk9gjFc66fQq0cJ0RvM3LZ0u0d
tenpzfPTCzVIyt1D2GVy7RaiLCEYkvKt9QT6kKR6TbT4N3oEK7hSUPwWmAlg7CpYiUnUb
R2H/m9hFFKV+/5JDfjwZ12AKpSQsfK+sutIrl09oYANQUD/KVwA38PXXtz43ue+DTIQ==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
a=rsa-sha256; c=relaxed/relaxed; t=1795047437;
h=DMARC-Filter:Received:DKIM-Signature:Received:Received:Received:
Received:Received:Received:Received:Message-ID:Date:MIME-Version:
User-Agent:Subject:To:Cc:References:Content-Language:From:In-Reply-To:
Content-Type:Content-Transfer-Encoding:X-TM-AS-GCONF:
X-Proofpoint-Reinject:X-Proofpoint-ORIG-GUID:X-Proofpoint-GUID:
X-Proofpoint-Spam-Details-Enc:X-Proofpoint-Spam-Info:
X-Authority-Analysis:X-Proofpoint-Virus-Version:
X-Proofpoint-Spam-Details;
bh=xA0UJdaWjcLJwESH6GytqwneDgaiE76tWOywSb/nkYI=;
b=kqZg/AvNB/utXGoBXadMq76PfTIZbDEiBQZYH+aStrVfyLSj8fu+gVqXZ4HBXziaYqf/
oI6neyBGI/NTEom21yeeaOgN9R4d11WZjYVueOKIqIC03lLEQzSpW97CtzZveeBhig5pp
2d7BvMarQwoB1ScBEcpSuH+c2rB6s1+00Hs2BVgi94BMZ0udhsDl1Q5WoETKmci4StiLe
KxScaRkmzwALkIS3JKvUdKKhyxRPm2VWR/B6CgvLbECJOAfxRseJY/iydiE2LDo89q61F
tGGQYBmaVl4nY8bjOTZxgejtw7OofYVnN4B293NuXCI7UhV7WhQpGDvgqSyLO369qyw==
X-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=Xmyy9OyU;
arc=none smtp.remote-ip=148.163.158.5
X-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 3A5A5606A325
for <netdev@vger.kernel.org>; Thu, 19 Nov 2026 00:17:16 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3A5A5606A325
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com
X-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 6AILQJlO2200331;
Thu, 19 Nov 2026 00:16:59 GMT
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=cc
:content-transfer-encoding:content-type:date:from:in-reply-to
:message-id:mime-version:references:subject:to; s=pp1; bh=xA0UJd
aWjcLJwESH6GytqwneDgaiE76tWOywSb/nkYI=; b=Xmyy9OyUMfsCqoLEnMV58E
m99lLRtNmt+dSEaODtScwyWNqsSp3dQjf7ftvJLkw/skD0oZz9/DU8EhmzglJVH6
KQwk4tlAovq7hRTrKAVpfTT1qQsrzP3KpSnDdMQQZFIgp4pLUnMlYmcvf+d4B22P
YlCOLp25Kd4jIUPbW1KpZMmT/XdUJ1yeJMtcxSrjrYeFg3raJcJnkGWkAZmyR4Mc
oDe6SEL159etFUfTRnV4g3hAu0c7Q9SaoyLAEF1E3awAd3gwyK19MKsGOs1PdLjq
U/DhCcp4qolaStA4Lqqv2xTYTIlyu3nKpFVHcNPUtQjdXJTn+KrHarFlUJQcShrQ
==
X-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 4j105ww5k1-1
(version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT);
Thu, 19 Nov 2026 00:16:59 +0000 (GMT)
X-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 6AILbI6W3716116;
Thu, 19 Nov 2026 00:16:58 GMT
X-Received: from smtprelay01.wdc07v.mail.ibm.com ([172.16.1.68])
by ppma23.wdc07v.mail.ibm.com (PPS) with ESMTPS id 4j1m3hre74-1
(version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
Thu, 19 Nov 2026 00:16:58 +0000 (GMT)
X-Received: from smtpav02.dal12v.mail.ibm.com (smtpav02.dal12v.mail.ibm.com [10.241.53.101])
by smtprelay01.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 6AJ0Gu8F11469800
(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK);
Thu, 19 Nov 2026 00:16:56 GMT
X-Received: from smtpav02.dal12v.mail.ibm.com (unknown [127.0.0.1])
by IMSVA (Postfix) with ESMTP id 68B0658060;
Thu, 19 Nov 2026 00:16:56 +0000 (GMT)
X-Received: from smtpav02.dal12v.mail.ibm.com (unknown [127.0.0.1])
by IMSVA (Postfix) with ESMTP id 077335805A;
Thu, 19 Nov 2026 00:16:54 +0000 (GMT)
X-Received: from [9.67.93.165] (unknown [9.67.93.165])
by smtpav02.dal12v.mail.ibm.com (Postfix) with ESMTP;
Thu, 19 Nov 2026 00:16:53 +0000 (GMT)
X-Mailing-List: netdev@vger.kernel.org
X-List-Post: <mailto:netdev@vger.kernel.org>
X-List-Help: <mailto:netdev+help@vger.kernel.org>
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:netdev+owner@vger.kernel.org>
X-Precedence: list
X-User-Agent: Mozilla Thunderbird
X-Cc: netdev@vger.kernel.org, davem@davemloft.net, horms@kernel.org,
edumazet@kernel.org, pabeni@redhat.com, andrew+netdev@lunn.ch,
nnac123@linux.ibm.com, maddy@linux.ibm.com, mpe@ellerman.id.au,
linuxppc-dev@lists.ozlabs.org, npiggin@gmail.com, chleroy@kernel.org,
ritesh.list@gmail.com, sshegde@linux.ibm.com, haren@linux.ibm.com,
ricklind@linux.ibm.com, davemarq@linux.ibm.com, bjking1@linux.ibm.com,
shaik.abdulla1@ibm.com
X-In-Reply-To: <20261116174018.6cd71ba5@kernel.org>
X-TM-AS-GCONF: 00
X-Proofpoint-Reinject: loops=2 maxloops=12
X-Proofpoint-ORIG-GUID: wTXqsLce92opVevaF0ucAAkeQ0oK3Kg7
X-Proofpoint-GUID: _bbz2iPGCP73pYV0sRuISME3X1GzWOpB
X-Proofpoint-Spam-Details-Enc: AW1haW4tMjYxMTE4MDA4OCBTYWx0ZWRfX3TsJUPeTfUJ0
af2Nuf8WkIrYnWsUHAeSbPX/JgBdjfb4YVEpwlG9NZ6FDHKZ2aKdehDc5iOlzgmYXMa8igpiD/m
wJiorDyx7uaBmCfyMjLNSi+VWP3mGN9S5pb5KK/hk5b4uKfZQBjirBe7k5iQaOUbfQE9jwuIKxU
RSI0Tmg8jKFxfxc95IOwsGuCAEzk8fioQ1sVDPxmc8olZtAn5os8m8/qHw4+Lx2SLvTYAdK3wHf
C6Chvb45C+nEWJy889gH1hkGBh91jo7wfu9JV6Cka4v+JjI+DBJTUm5TOdZyNWnMjlfjiqBkA13
48bIrJa92dKpMpXJ74wIwtDKrlb9qx5JW+Hi9ZnNlw7jNAt3W6+H6FXVF3i9a3wYpenyIzPQDfr
rlCfekvqMNGrAfs+JwRKdEONJr8lMJ/lfRo5vX4ZukoEwVXpkAWT7lmKydZTkTc9FM1asqCdes4
SEi1/9n+JZjdsB4e2qg==
X-Proofpoint-Spam-Info: AW1haW4tMjYxMTE4MDA4OCBTYWx0ZWRfX2Ub2+9IIRX+N
Gbt/jZhXaV/LQOmKh1Q5y5giUNhXqCU46JakryFWi+megy3r7Xw9We/SmG63U+JtvvXgjirYleG
Zchs4+SGqL4VOfJQMBUZ7gawe3HmiVM=
X-Authority-Analysis: v=2.4 cv=K+m3jCWI c=1 sm=1 tr=0 ts=6afe3ffb cx=c_pps
a=3Bg1Hr4SwmMryq2xdFQyZA==:117 a=3Bg1Hr4SwmMryq2xdFQyZA==:17
a=IkcTkHD0fZMA:10 a=zJRp6_cAMcgA:10 a=VkNPw1HP01LnGYTKEx00:22
a=RnoormkPH1_aCDwRdu11:22 a=Y2IxJ9c9Rs8Kov3niI8_:22 a=t5fRNr4mx1plWV7DNOQA:9
a=3ZKOabzyN94A:10 a=QEXdDO2ut3YA:10
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-11-18_07,2026-11-16_01,2025-10-01_01
X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0
suspectscore=0 bulkscore=0 clxscore=1015 adultscore=0 spamscore=0
priorityscore=1501 impostorscore=0 phishscore=0 lowpriorityscore=0
malwarescore=0 classifier=typeunknown authscore=0 authtc= authcc=
route=outbound adjust=0 reason=mlx scancount=1 engine=8.22.0-2611040001
definitions=main-2611180088