From: Vadim Fedorenko <vadim.fedorenko@linux.dev>
To: Ivan Vecera <ivecera@redhat.com>, netdev@vger.kernel.org
Cc: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>,
Jiri Pirko <jiri@resnulli.us>, Jonathan Corbet <corbet@lwn.net>,
Shuah Khan <skhan@linuxfoundation.org>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
Donald Hunter <donald.hunter@gmail.com>,
Prathosh Satish <Prathosh.Satish@microchip.com>,
Petr Oros <poros@redhat.com>,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 2/3] dpll: add actual frequency monitoring callback ops
Date: Mon, 30 Mar 2026 11:27:30 +0100 [thread overview]
Message-ID: <447c9ec1-2f3e-4da6-bcd0-febce271ae6f@linux.dev> (raw)
In-Reply-To: <a341fd52-3682-473f-8116-a8323bf846ee@redhat.com>
On 30/03/2026 09:52, Ivan Vecera wrote:
> On 3/26/26 6:48 PM, Ivan Vecera wrote:
>> On 3/26/26 12:21 PM, Vadim Fedorenko wrote:
>>> On 25/03/2026 19:39, Ivan Vecera wrote:
>>>
>>>> +static int dpll_msg_add_actual_freq(struct sk_buff *msg, struct
>>>> dpll_pin *pin,
>>>> + struct dpll_pin_ref *ref,
>>>> + struct netlink_ext_ack *extack)
>>>> +{
>>>> + const struct dpll_device_ops *dev_ops = dpll_device_ops(ref-
>>>> >dpll);
>>>> + const struct dpll_pin_ops *ops = dpll_pin_ops(ref);
>>>> + struct dpll_device *dpll = ref->dpll;
>>>> + enum dpll_feature_state state;
>>>> + u64 actual_freq;
>>>> + int ret;
>>>> +
>>>> + if (!ops->actual_freq_get)
>>>> + return 0;
>>>> + if (dev_ops->freq_monitor_get) {
>>>> + ret = dev_ops->freq_monitor_get(dpll, dpll_priv(dpll),
>>>> + &state, extack);
>>>> + if (ret)
>>>> + return ret;
>>>> + if (state == DPLL_FEATURE_STATE_DISABLE)
>>>> + return 0;
>>>
>>> I think we have to signal back to user that frequency monitoring is
>>> disabled via extack.
>>
>> Hi Vadim,
>>
>> This would break pin-get operation... Do or dump pin-get operation would
>> fail with this extack message.
>>
>> Here we can check if the freq-monitoring is enabled and conditionally
>> call actual_freq_get() or measured_freq_get()
Let's make it this way, we don't want to waste even small amount of
resources for useless call.
>>
>> -or-
>>
>> Call this callback unconditionally and check for return code and if a
>> driver returns e.g. -ENODATA then skip nla_put_64bit() but return
>> success.
>>
>> WDYT?
>
> Vadim?
Sorry, was AFK this Friday/weekend
next prev parent reply other threads:[~2026-03-30 10:27 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-25 19:39 [PATCH net-next 0/3] dpll: add actual frequency monitoring feature Ivan Vecera
2026-03-25 19:39 ` [PATCH net-next 1/3] dpll: add actual frequency monitoring to netlink spec Ivan Vecera
2026-03-26 11:06 ` Vadim Fedorenko
2026-03-26 17:41 ` Ivan Vecera
2026-03-25 19:39 ` [PATCH net-next 2/3] dpll: add actual frequency monitoring callback ops Ivan Vecera
2026-03-26 11:21 ` Vadim Fedorenko
2026-03-26 17:48 ` Ivan Vecera
2026-03-30 8:52 ` Ivan Vecera
2026-03-30 10:27 ` Vadim Fedorenko [this message]
2026-03-25 19:39 ` [PATCH net-next 3/3] dpll: zl3073x: implement actual frequency monitoring Ivan Vecera
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=447c9ec1-2f3e-4da6-bcd0-febce271ae6f@linux.dev \
--to=vadim.fedorenko@linux.dev \
--cc=Prathosh.Satish@microchip.com \
--cc=arkadiusz.kubalewski@intel.com \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=ivecera@redhat.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=poros@redhat.com \
--cc=skhan@linuxfoundation.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox