๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #15455

Re: [PATCH net-next v8 09/15] ibmveth: Split RX poll into per-slot helpers for MQ

#15455
From: netdev-bot+sashiko
Date: Thu, 12 Nov 2026 23:57
89 lines
11227 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The patch moves the RX frame-bound drop into a new helper,
  ibmveth_poll_drop_oversize(), and changes its log text.

--

ibmveth: Split RX poll into per-slot helpers for MQ

This commit splits the ibmveth_poll() loop body into per-slot helpers
(stopping, recycle_invalid, skip_bad_correlator, drop_oversize,
deliver_frame, bump_invalid), so the NAPI callback becomes a thin budget
loop. It also adds checks that stop polling once the device is down or a
napi_disable() is pending, and a WARN for a NAPI index past the queue
count, in preparation for multi-queue RX.

> diff --git a/drivers/net/ethernet/ibm/ibmveth.c b/drivers/net/ethernet/ibm/ibmveth.c
> index a1f286b37effa..b12bfa1e485eb 100644
> --- a/drivers/net/ethernet/ibm/ibmveth.c
> +++ b/drivers/net/ethernet/ibm/ibmveth.c

[ ... ]

> +static void ibmveth_poll_drop_oversize(struct net_device *netdev,
> +				       struct ibmveth_adapter *adapter,
> +				       int queue_index, unsigned int off,
> +				       unsigned int len, unsigned int room,
> +				       u64 correlator)
> +{
> +	if (net_ratelimit())
> +		netdev_err(netdev,
> +			   "RX frame %u+%u exceeds buffer %u on queue %d, dropping\n",
> +			   off, len, room, queue_index);
> +	netdev->stats.rx_dropped++;
> +	ibmveth_rxq_harvest_correlator(adapter, queue_index, true, correlator);
> +}

[ ... ]

> +	pool = correlator >> 32;
> +	bpool = &adapter->rx_buff_pool[queue_index][pool];
> +	room = min_t(unsigned int, skb_tailroom(skb),
> +		     bpool->buff_size);
> +	off = offset;
> +	len = length;
> +	if (unlikely(len < ETH_HLEN || off >= room ||
> +		     len > room - off)) {
> +		ibmveth_poll_drop_oversize(netdev, adapter, queue_index,
> +					   off, len, room, correlator);
> +		return 0;
> +	}

[Severity: Low]
Does the new message in ibmveth_poll_drop_oversize() describe the runt
case correctly?

The guard in ibmveth_poll_deliver_frame() sends all three conditions to
the same helper, including len < ETH_HLEN. A 10-byte frame at offset 0
in a 2048-byte buffer would be logged as:

  RX frame 0+10 exceeds buffer 2048 on queue 0, dropping

That frame was too short, not too large.

The old text this replaces was neutral and matched every condition:

-						   "bad RX frame offset %u length %u (buffer %u), dropping\n",

This is the only log line on this path, so it is what someone looking
into PHYP descriptor problems from dmesg would see.

The commit message calls this moving existing checks into helpers, and
only says "a PHYP offset+length beyond min(skb_tailroom,
pool->buff_size) is dropped". It doesn't mention that the message
changed or that runt frames now go through the oversize helper. The
wording is the same at the end of the series.

Could the neutral wording be kept, the log say which check failed, or
the len < ETH_HLEN case be handled on its own?

[ ... ]

-- 
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261109235556.60604-1-mmc%40linux.ibm.com
Technical Details
Message-ID: <179452782793.2199510.9499516372041344011@kernel.org>
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362284-linux-kernel-netdev=dewy.ru
References: <20261109235556.60604-10-mmc@linux.ibm.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-lax.pugleaf.net!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-362284-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v8 09/15] ibmveth: Split RX poll into per-slot
 helpers for MQ
Date: Thu, 12 Nov 2026 23:57:07 +0000
Organization: Usenet Network
Message-ID: <179452782793.2199510.9499516372041344011@kernel.org>
References: <20261109235556.60604-10-mmc@linux.ibm.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="1213603"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:vlylu/eNtqiK/nPB7V/Vg89f9Bk= sha256:jRwV/nkyWheW7cuOkhbgV1dbT38sZIK/sp3A1jw31lQ=
	sha1:8d80R6h6hKozK54Hnx6yy0ARbMw= sha256:gUt1iwF7pB929p8ilpjdz8LdaVt9sdwKwYvGu76SkFs=
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 6B27A1143ED; Fri, 13 Nov 2026 03:15:24 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.501
X-Spam-Status: No, score=-3.501 tagged_above=-9999 required=6.31
	tests=[DKIMWL_WL_HIGH=-0.001, DKIM_SIGNED=0.1, DKIM_VALID=-0.1,
	DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, 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=kernel.org
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 7VzJC5zgsHnx;
	Fri, 13 Nov 2026 03:15:20 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.232.135.74; helo=sto.lore.kernel.org; envelope-from=netdev+bounces-362284-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74])
	by mail.dewy.ru (Postfix) with ESMTPS id 2C6F61143E7; Fri, 13 Nov 2026 03:15:09 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sto.lore.kernel.org (Postfix) with ESMTP id 022F36A0FF5; Thu, 12 Nov 2026 23:57:39 +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=1794527830;
	b=03S9z9aYn57AeORYP8jb19RD7qmujh6JLRuYBzaDFLEgSSivw8KCYpZ9vMKzKrco1XCg
	 scqimRHISG9ZTyNGbRA4edezOYflD6/9b0BWdIK3c6NHyfBSG/A15lD/cZ3MX9stonuZr
	 Zw8m++Wgr3ltMCCE/Cwbj4xSCmFiDPlDBQJzjS9UgCK0CVJtXkScFRZM13D16cbL1ChnV
	 sFzDiJMkWfQZO5kb5bOrleID88Gj2l20HzI8d3o07kj1YIDA4/b9bgPg7fjkG/SzsDNb6
	 l7kt12rTRJlybBBnNXpuHMm26ZSwvG3FWrLOOk3rTDjm8Dmfn7D9jEFGBwKX6tIscFA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794527830;
	h=X-Original-To:Received:Received:DKIM-Signature:Subject:From:To:Cc:
	 Date:Message-ID:In-Reply-To:References:X-sashiko-severity:
	 Content-Type:Content-Transfer-Encoding:X-Mailing-List:List-Id:
	 List-Post:List-Help:List-Subscribe:List-Unsubscribe:List-Owner:
	 Precedence:MIME-Version;
	bh=0NS2CJ7BkC75vko+7B/WkqWP1lQ3iTvoy9WpBl3NUPY=;
	b=4xfeulcQPC1v4b5IzBaGWaB0VBKus6We4KJRcauq0ftsbQDqxgejh7Ip3GVj6eQaKK5e
	 uQT8jZwX7fzFM8cTkJgCnQwHEKYxNZpgZfFUxLNxNaUBLctCpXaMwQqsarGdAb9Pu4FbX
	 +Q1mux5HLRMcPdPBbjxZTS4l0Qy//cnbZI+eiLqzwcjGEyTALdwy4vy1uwdDHCzF0ph5Y
	 TDTgpZIhRNu9RtKHqDZQITaToPLH+PpcHZtDtCqfNnX1JQjrxr+WsB07i+yYZtB2MRRZo
	 4ictvbviwDkU05pU1VTOL30PIEHYBqZLNUaqQ+EzM+BNwG/2QHApsmOyWTxDFxnNyZw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="VoC3cO/8";
	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 62ACA606A8B6;
	Thu, 12 Nov 2026 23:57:10 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=VoC3cO/8
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1794527829;
	b=qCSijf45/iXrpWISlJCLgrUZXr52hkIuV/Yk6kcopYZzMStS88nMfjgg6IxYiyKRKRkK
	 8RYwOCWK7H+LI4j+Q0rRxeS1sDbWRMSanBFQSe/IUeyHa7/9ulx1GBHPXnrtBEi9ak/sb
	 YvgF8SBdHRltw4BZZ4CiiyDHo8PJ6DGmLGcWto7/uj3o59/Kzc8tun0CWruJroVAoLNmj
	 dpp5h7NjyCAbhXVhyCe051kSfC/Y/0j6b9lR+qlzPd2PtHy1uklfYyz+Wpg//E2qBQCLc
	 lyizcnm5Z0SXoo9BwMJsvWsiVzQp26h2HKFEtfNCJ019Jt7zC/+KCNd4AQaifZKknWg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1794527829;
	h=Received:DKIM-Signature:Subject:From:To:Cc:Date:Message-ID:
	 In-Reply-To:References:X-sashiko-severity:Content-Type:
	 Content-Transfer-Encoding:MIME-Version;
	bh=0NS2CJ7BkC75vko+7B/WkqWP1lQ3iTvoy9WpBl3NUPY=;
	b=2Aop8xOm9fmdT/Kmr5k/uAwWEqkS7LjINuuXaecJnYUMsdBPZsObXyKeln77BXbF2qvR
	 X5T/nSw7/wzitJhptrFum5ZLdd64nVxWXsfZxJ/9TnuT50x1CkYRIUnG3fUvs9i9y7q3/
	 b0fvKm6f1BJUXczEa0Si0zs58oSxnILC9vNS7XUlaiwKG5H6Rr8BJrd1r3CLvxa6LKspw
	 Mu0PBRStBos8qLRMufMboPTUl9SzluTS4yj5curCoyf+brlYpvCQy30he29d4Tpd8eCpp
	 Aeu+vWtINXuzN8i4rHwX6uQ8dx9wsNvvVAEsIv5EPLBL+wkPS0LyKADLEVL31dysvvQ==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b="VoC3cO/8";
	arc=none smtp.remote-ip=100.103.45.18
X-Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7FE37606A8B1
	for <netdev@vger.kernel.org>; Thu, 12 Nov 2026 23:57:09 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 565351F000C5;
	Thu, 12 Nov 2026 23:57:08 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1794527829;
	bh=0NS2CJ7BkC75vko+7B/WkqWP1lQ3iTvoy9WpBl3NUPY=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=VoC3cO/8ii0AJO8CxU68emtq4y71XBqBMTZW7hNkSsAkm8q8dd6oOIfD1VkaXaakb
	 iaSwl6o/9OpwfOHjW3W2Od/UiZ4wMhxpqHC1qd4e5O7SORoA8fCoflyqbfIkurRGmo
	 7AOCIAqdLQSrckibsGZeAtLVG3VoPkHdu8gOIVmaiO6OWy6bUSEIeCo2QXiU+1cb17
	 kdJYLvqPOZeDk0ISf2EbaD36Htix0Iaawpw7VwGrO4Z47orZFwlJigp7AmEaDDs70Z
	 Nl32c7NDEF/+QUbmWN6ZlH6r9UZ9Sy7LFb2v6099T90uiDc56+vvUyf1838wsz8PTR
	 Uuna5espby2qQ==
X-Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
 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: <20261109235556.60604-10-mmc@linux.ibm.com>
X-sashiko-severity: Low
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