From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-171.mta0.migadu.com (out-171.mta0.migadu.com [91.218.175.171]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D002E3BADBC for ; Mon, 30 Mar 2026 10:27:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=91.218.175.171 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774866468; cv=none; b=lb/YTPIoHQIpHY+uo+o4avtEXtfc5naSZyoWssyVD3v38nrBmSIJhu5BFuKKPi1KxUdVn0rtcpAYx2ukP9JWmqylCfvkhbvJCP57rLVdK3D7alqsGxCX8+897RqVsYF6pUQyxTxBowRU79TatN+KOMTKfh8643t3KC3k91+nPmE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1774866468; c=relaxed/simple; bh=+Qteq5dPyhbY15tJRt3TuJmErEIzgLhr1XV4UIcwuoo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=ON6IueV7rAbGxZJVmmpd/H3AVkw7bbI4PY0SjXkh4I+4eW3F0pAQgzDVj1YG0RTFArfEzY3sWvTg910h04hs3omGYthV6Do4blGhsvZxE9xYnth5mWoIOvdusUVKyKdY79sC1Dnx0ITo7tGDDY09O4E44lku9fallrR072qzI8k= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=SzMLjlBB; arc=none smtp.client-ip=91.218.175.171 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="SzMLjlBB" Message-ID: <447c9ec1-2f3e-4da6-bcd0-febce271ae6f@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1774866454; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=nUQgRzqepPeMNaAgLk7AwaLDULRzH/pnHtqpTNEISBs=; b=SzMLjlBB+PjsuuLHyVZ/zuy1uGb/2ASld9OBG6zvgqhznPEtkHaByJk3pawZdIk3/Ej/Ip C1dHEx9DpU/ABODUw2aCem3p9GWv7TcdMAqMQdV61HGo+twJ+n7/tAMLGRcox+RHE/XC/w lffWMqSFZ/6zwYfFh7J7DLYaoRBeaDI= Date: Mon, 30 Mar 2026 11:27:30 +0100 Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH net-next 2/3] dpll: add actual frequency monitoring callback ops To: Ivan Vecera , netdev@vger.kernel.org Cc: Arkadiusz Kubalewski , Jiri Pirko , Jonathan Corbet , Shuah Khan , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Simon Horman , Donald Hunter , Prathosh Satish , Petr Oros , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org References: <20260325193914.124898-1-ivecera@redhat.com> <20260325193914.124898-3-ivecera@redhat.com> Content-Language: en-US X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Vadim Fedorenko In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT 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