๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #5119

Re: [PATCH net v3 07/14] ice: E822: cancel offset verification work during reset preparation

#5119
From: netdev-bot+sashiko
Date: Mon, 19 Oct 2026 20:14
80 lines
11023 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] Possible requeue of ov_work after the new cancel (judged harmless
  and by design).

--

ice: E822: cancel offset verification work during reset preparation

This patch cancels the E822 offset verification work (ov_work) in
ice_ptp_prepare_for_reset(). Without the cancel, the work can keep running
or rescheduling itself while a reset is in progress. The PHY gets
reconfigured after the reset anyway, either by the clock owner or by
ice_ptp_link_change() at the end of the rebuild.

> diff --git a/drivers/net/ethernet/intel/ice/ice_ptp.c b/drivers/net/ethernet/intel/ice/ice_ptp.c
> index 828d46a73f292..6297773806949 100644
> --- a/drivers/net/ethernet/intel/ice/ice_ptp.c
> +++ b/drivers/net/ethernet/intel/ice/ice_ptp.c
> @@ -3006,6 +3006,9 @@ void ice_ptp_prepare_for_reset(struct ice_pf *pf, enum ice_reset_req reset_type)
>
>  	kthread_cancel_delayed_work_sync(&ptp->port.work);
>
> +	if (hw->mac_type == ICE_MAC_GENERIC)
> +		kthread_cancel_delayed_work_sync(&ptp->port.ov_work);
> +

[Severity: Low]
This is a minor observation and it may well be intended. This cancel runs
without adapter->ps_lock held, and nothing stops ov_work from being queued
again afterwards. Can another PF queue a peer's ov_work again while that
peer is still resetting?

On a multi-PF E822 adapter, the clock owner can reach this producer for
every port that has link_up set:

ice_ptp_rebuild_owner() / ice_ptp_settime64()
  ice_ptp_restart_all_phy()
    ice_ptp_port_phy_restart(port)
      kthread_queue_delayed_work(pf->ptp.kworker, &ptp_port->ov_work, 0);

ice_ptp_restart_all_phy() checks only this before restarting the peer's PHY:

	if (READ_ONCE(port->link_up))
		ice_ptp_port_phy_restart(port);

It does not look at the peer's ptp.state or its reset state.

The impact looks small. A requeued ice_ptp_wait_for_offsets() sees
ice_is_reset_in_progress() and only reschedules, with no hardware access:

	if (ice_is_reset_in_progress(pf->state)) {
		/* wait for device driver to complete reset */
		kthread_queue_delayed_work(pf->ptp.kworker,
					   &port->ov_work,
					   msecs_to_jiffies(100));
		return;
	}

Each PF's ice_rebuild() also calls ice_ptp_link_change(). That path goes
through ice_ptp_port_phy_restart(), which cancels and requeues the work.

The commit message also says the PHY is reconfigured "as part of the clock
owner resetting", so the requeue may be the intended recalibration path. If
so, the only effect left is a few no-op 100 ms reschedules during a reset.

Is that the expected behaviour, or should the restart path skip ports whose
PF is in reset?

>  	if (reset_type == ICE_RESET_PFR)
>  		return;
>

-- 
Sashiko AI review ยท https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261015191102.1174111-1-anthony.l.nguyen%40intel.com
Technical Details
Message-ID: <179244084873.3135.13916049377075971690@kernel.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-348825-linux-kernel-netdev=dewy.ru
References: <20261015191102.1174111-8-anthony.l.nguyen@intel.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-348825-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net v3 07/14] ice: E822: cancel offset verification work
 during reset preparation
Date: Mon, 19 Oct 2026 20:14:08 +0000
Organization: Usenet Network
Message-ID: <179244084873.3135.13916049377075971690@kernel.org>
References: <20261015191102.1174111-8-anthony.l.nguyen@intel.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="3704890"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:G7v+oFbOAMCZiQ+UHwvp6vlasSQ= sha256:6+ra97PlCjhy857/T2bPNB9pII93tjqgKxyb02Mp0x8=
	sha1:1PnyGGU9vliAupO+OFuwLLWjROY= sha256:op4St+SjZg6AHIG6F7vo/jGqjH6SEXzu4OzU2ViH86o=
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 4376B110B15; Mon, 19 Oct 2026 23:15:45 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -3.729
X-Spam-Status: No, score=-3.729 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.329, 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 gKY1LooHKLTn;
	Mon, 19 Oct 2026 23:15:42 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.105.105.114; helo=tor.lore.kernel.org; envelope-from=netdev+bounces-348825-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 tor.lore.kernel.org (tor.lore.kernel.org [172.105.105.114])
	by mail.dewy.ru (Postfix) with ESMTPS id 0671A110B13; Mon, 19 Oct 2026 23:15:34 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by tor.lore.kernel.org (Postfix) with ESMTP id 7033D3B21D; Mon, 19 Oct 2026 20:14:23 +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=1792440856;
	b=fnL9Lc35FN5h73b+rOo0gTGVUQYMwyx4jbE6H26qtPRl36WW8X++8klmDMasP1WNoTNQ
	 OOTxUpTEkcVCw1sWIOksSTE6z5Jflu6GP4qDw3R2QcC8C6ylIv1jJ3xBpYNYsr2E068xM
	 av/WLo2vkMMxvP6+FxQxKQ/o4jxlIBJurzyU4+n+khNWIPLcWgVDjLyL6OfmHhjC0F5lD
	 zKyEAxj1VQXASH+AoQQOA3tWbI5zBrJvm5tRg8Xr/rZi+/vOG7py3pUdN7tSeLc9+Tp+U
	 8V7QKhrvd1g22sXiC7Y+2UJFGKbYCEnMPKMHheohPuWr8b/BiO2EGoMdvO3UwveZKOA==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792440856;
	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=mWwT6wcsjVYqsbDB3myZXUGIrP+ManxlK9KNx+Ru8xc=;
	b=SdikHiRUuitEX4sat85XX9I5ya1oeksnKkI6gplcg+K42E/jXUi7+5fM3zyWsjZXusgM
	 D3l0knbe3R7PytacP3n52cV9p+U9t8R5KVNDcz1vcZgnXnx3JoNyvewOa417xPFxEPvH8
	 m1W1TqjeYBoEvM9XSfnsjfjZnqnF+orpAZEFHpiaeO37QdbwZPeMFBxo3L3hneEBMqJ2F
	 NibMGEjVSZCu2PDe9PGEGxpCB8jIY7cngozxt6/xC5chndLT7OhxaMWso8Ij2kDqIZzlT
	 mlV0+pYMmx8XyWD2XDepYP7DFn2OcPwFCZXonAJqYwfq69+CABWVJfuOeA0wLxtrLuA==
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=XavQRr3K;
	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 A04FE606A31B;
	Mon, 19 Oct 2026 20:14:16 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key, unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=XavQRr3K
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=1792440850;
	b=UqwGqC21aD45xqK1f4NRd+3XHntK0iLL/YwuYx1k3XHX6PkISpPiWQKFob46l0W7Q21o
	 9edWF6yTvCztzqF+u2QBbn86GLYXuJ5ig7LY+7r8sJ3wUAsHB9FIAfQ/T3dbqG2PsvhNX
	 wX0Ttcgouiwpz2WdJNyPXacyUY3VP4MzaWEcf4zExMoXU6GP2FUEr7xbjorWQ4wDwHgDa
	 zG8XHFwUpkasUEQUsgWwXk6b5wpbbDDud5SrV2Q4DCq+I8cVwu7b2FCkgozt5SZUoVwC5
	 DY+bcnwApwqjV788eslELPvnPOmTdft9HX8up3wudOq3LcOnAeu80jyAUtD6wqZO90g==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792440850;
	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=mWwT6wcsjVYqsbDB3myZXUGIrP+ManxlK9KNx+Ru8xc=;
	b=QdAV9BdStJ3Di5r8EXOgiVavECqPzHdR1LuPbuADAs9fLbbl5NehdME0craSBSoGFf4l
	 OrInrkcyMdL+rLKoHkGf84NARtwD5XRDXqiwHxJzZiJar0P8pzTG6Kvyn2zB0wAz7vWtP
	 hMpz2/Tg5XIBn7NlBL2VgnUZg34y9Tmhwx522ouDfJJk7Yb1tZXIDZgY9vDwDKo+6wtII
	 wUMOcnAYf3nTjTUHJ4fpxhwVV+b7EzJiESqLuOzmAZWmL+jgTP6f3bCVOdCuKh8Q/D74M
	 pAgxoiQa9QzEtr9E5ZJVKXIsgqFDYwngQg8hohYAu3bswC3jfQM+ADfv08IMCgJheXg==
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=XavQRr3K;
	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 85587606A31E
	for <netdev@vger.kernel.org>; Mon, 19 Oct 2026 20:14:10 +0000 (UTC)
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 2FE9C1F000C4;
	Mon, 19 Oct 2026 20:14:09 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1792440850;
	bh=mWwT6wcsjVYqsbDB3myZXUGIrP+ManxlK9KNx+Ru8xc=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=XavQRr3KAaQzKV5HyjEHQxK64l+zV+YCyrIGMnR/SHVjG00WsV5sBlSH1BGk6eSMo
	 crQj5u8XPcOYSwSQM5wVh6ya7zpsQ8+JUKr4RcneiLS1YfA7SQO1lNtZUU0qGLm0lT
	 ZRKvH9RaNLkflYj+6Hp4h3L5QCDdgYidinZUfMkMPo14ujHDM/ihxupfAFpe4xCaz7
	 ExjP7gM7ECu56Es7hQpDcqtpLEMvCs30zrbNIfXyqI8r70nimou1ZN7kbUKNERXWbK
	 Ypq63/5lrOSZ1pRqZHdQ58tRDI5zpMmk/AMuaSi6X51zTsi+zaiO2/E1UmFzYje+O0
	 1NmZVOJQTAF6A==
X-Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com,
 edumazet@kernel.org, andrew+netdev@lunn.ch, netdev@vger.kernel.org,
 poros@redhat.com, jacob.e.keller@intel.com, maciej.machnikowski@intel.com,
 przemyslaw.korba@intel.com, grzegorz.nitka@intel.com,
 sergey.temerkhanov@intel.com, arkadiusz.kubalewski@intel.com,
 richardcochran@gmail.com, horms@kernel.org
X-In-Reply-To: <20261015191102.1174111-8-anthony.l.nguyen@intel.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