From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1795948725; b=sSc4BIBIeRj9iJ+iNNRnhB1gvBRmvCjXTjyaFyV6LB33JbCrO2RTuorIvNwikT0d/TS8 gu6h1/g7P+/uwkASX2DNjfJYAXCgpWV2Okxw4txZHxYbCFgTwJbv0pGgIgsaCSr4/gKyf K6RiD6Zl/jDoRYwRa4WlPvTJzj1Pt2VwgGIFgHRud+6kPdLKfGDv/t/m+zsaS6cQN0UBq iDNU0diw9S7SijZqKNpX4poPXxHlG+kV6K7Gez14eRh2XyAck2NHXl7A+7iG4YtDaNk/n R+bnrsZctvySZI7p/hprTjfjwUMcse1l062U/Mrvcx19i4CaZPX+lZqajYydhDK9W9w== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795948725; 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=bfGX8KjlUCAbjl9E5dszZ2dOTKXE8RWl3yEfjDXMGD8=; b=Zsln06GE56dPu+DjvmSoe8aGdnHgdgZhrv6vAe8VtT/g6paMwUh7lyfVQznaPdTnpN7B EB1Au1gEjAho3zEMaMj2OjMJ+PoAdGK6g8F9wuli5JIRjidgJ12wqoUXz4/ogF6ogOgb6 XmmSDH3H728aPBKqbdFRBgNUS95lOVxx+W5aOr4LBS0l/SxeXYZ0veffpYYbtLGh4HKJh jyz8kwSAmXSH78KqYSl5fj3S/cEUmZwoihl6BHG3iOz3iFci4n1AM6kE8cDN+udShMP3A y2WiuPjVTMJqYOTBFeQ3EVeHVkcG6WkBwtfPow6ru6tZIYCId6SoxOlgjNvNLro8tFg== 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=G8Gy4TJQ; arc=none smtp.remote-ip=100.103.45.18 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 7AD33606A323; Sun, 29 Nov 2026 10:38:45 +0000 (UTC) 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=G8Gy4TJQ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 097C31F00897; Sun, 29 Nov 2026 10:38:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795948725; bh=bfGX8KjlUCAbjl9E5dszZ2dOTKXE8RWl3yEfjDXMGD8=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=G8Gy4TJQBy7LDKoI88lj4u+tmpKazKtJLtElWvdbQT2qVzGXkgGas1wuXI5yYrNOC BxrVLd64EgQzaQiUpLC4fI2zRTBRqm1kCOKJhRQlAEsaFvvNwDK2P5TLJxkgDtTqxd j2tk/Mc90xtm2zeoterAbZZLRkhoS8TLxVI8kX7+E/lsFQzKvfuhR2sYPCqNkdrqBA 3hh+fAWPjAh86nYHtN4QrPZaFOC4BY+z3deMHCza207TmP45gPWtfaE6dQD1sUzNpZ MuLK+I9bC34sVGiM7OtJXG6Oy5npA4GgDlngS5yfS4uVjYilpYHyL4i4NleCA8YH9Y L5MoQIDTUpLkA== Subject: Re: [PATCH net-next v5 01/14] dpll: dpllsim: Add simulated DPLL device driver From: netdev-bot+sashiko@kernel.org To: poros@redhat.com Cc: netdev@vger.kernel.org, ivecera@redhat.com, jiri@nvidia.com, corbet@lwn.net, skhan@linuxfoundation.org, shuah@kernel.org, rdunlap@infradead.org, jani.nikula@intel.com, vadim.fedorenko@linux.dev, arkadiusz.kubalewski@intel.com, jiri@resnulli.us, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, linux-doc@vger.kernel.org, linux-kselftest@vger.kernel.org Date: Sun, 29 Nov 2026 10:38:43 +0000 Message-ID: <179594872350.3146.6237936682428760336@kernel.org> In-Reply-To: <20261125090522.3777494-2-poros@redhat.com> References: <20261125090522.3777494-2-poros@redhat.com> X-sashiko-severity: Low Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Mailing-List: linux-doc@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 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 comment on the `registered` field in struct dpllsim_dev (drivers/dpll/dpllsim/dpllsim.h) says the flag is "True while the… -- dpll: dpllsim: Add simulated DPLL device driver This commit adds dpllsim, a driver that provides simulated DPLL devices for testing the DPLL subsystem without real hardware. Instances are created through configfs, and writing to a live attribute registers or unregisters the device with the DPLL core. The device registers as a PPS type DPLL with only the mode_get and lock_status_get callbacks. > diff --git a/drivers/dpll/dpllsim/dpllsim.h b/drivers/dpll/dpllsim/dpllsim.h > new file mode 100644 > index 0000000000000..0b81bb2f769be > --- /dev/null > +++ b/drivers/dpll/dpllsim/dpllsim.h [ ... ] > +struct dpllsim_dev { > + struct config_group group; > + > + /* > + * Set from the start of a live transition until the device is > + * undeployed, written under both the subsystem mutex and @lock. > + * Freezes the configuration, see dpllsim_dev_frozen(). > + */ > + struct dpll_device *dpll; > + dpll_tracker tracker; > + /* > + * True while the device is registered with the DPLL subsystem, > + * written under both the subsystem mutex and @lock. This is what > + * the live attribute reports, see dpllsim_dev_live(). > + */ > + bool registered; [Severity: Low] Is this comment accurate? The flag does not seem to match the DPLL core's registered state exactly. In dpllsim_dev_deploy(), dpll_device_register() sets the DPLL_REGISTERED mark and sends the create notification. The flag is set only after that: err = dpll_device_register(sim->dpll, DPLL_TYPE_PPS, &dpllsim_dpll_ops, sim); if (err) goto err_put_dpll; mutex_lock(&sim->lock); sim->registered = true; mutex_unlock(&sim->lock); In dpllsim_dev_undeploy(), the flag is cleared first. Only then does dpll_device_unregister() send the delete notification and clear DPLL_REGISTERED: scoped_guard(mutex, &sim->lock) sim->registered = false; dpll_device_unregister(sim->dpll, &dpllsim_dpll_ops, sim); dpllsim_dev_live_show() only takes sim->lock. In either window, a reader can see live as 0 while a netlink device get still lists the device. Later in the series the flag is also set after the pins are registered, so the deploy window gets longer. The changelog says this ordering is intended: "it turns 1 only once the whole live transition succeeded and 0 again as the first step of the teardown" So the code looks fine. Could this comment, and the "Live means registered with the DPLL subsystem" comment on dpllsim_dev_live(), say instead that the flag means the live transition has completed? That covers only part of the time the core has the device registered. The later patches in the series leave both comments unchanged. > + > + /* Guarded by the subsystem mutex */ > + u64 clock_id; [ ... ] > +/* Live means registered with the DPLL subsystem */ > +static inline bool dpllsim_dev_live(const struct dpllsim_dev *sim) > +{ > + return sim->registered; > +} [ ... ] -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261125090522.3777494-1-poros%40redhat.com