public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Ivan Vecera <ivecera@redhat.com>
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: netdev@vger.kernel.org, Petr Oros <poros@redhat.com>,
	David Ahern <dsahern@kernel.org>
Subject: Re: [PATCH iproute2-next v2 1/2] dpll: add ps unit to phase-related pin attributes
Date: Mon, 4 May 2026 08:48:07 +0200	[thread overview]
Message-ID: <a5b6f930-9031-45c8-8bb5-a215b8afb4ee@redhat.com> (raw)
In-Reply-To: <20260503153459.388de695@phoenix.local>



On 5/4/26 12:34 AM, Stephen Hemminger wrote:
> On Sun,  3 May 2026 17:13:51 +0200
> Ivan Vecera <ivecera@redhat.com> wrote:
> 
>> +/* Phase offset - JSON prints raw sub-ps value, FP prints fractional ps */
>> +#define DPLL_PR_PHASE_OFFSET(tb, attr_id)                                      \
>> +	do {                                                                   \
>> +		if (tb[attr_id]) {                                             \
>> +			__s64 val = mnl_attr_get_sint(tb[attr_id]);            \
>> +			lldiv_t d = lldiv(llabs(val),                          \
>> +					  DPLL_PHASE_OFFSET_DIVIDER);	       \
>> +			print_s64(PRINT_JSON, "phase-offset", NULL, val);      \
>> +			print_string(PRINT_FP, NULL, " phase-offset %s",       \
>> +				     val < 0 ? "-" : "");                      \
>> +			print_s64(PRINT_FP, NULL, "%lld.", d.quot);            \
>> +			print_s64(PRINT_FP, NULL, "%03lld ps", d.rem);         \
>> +		}                                                              \
>> +	} while (0)
>> +
>>   /* Gene
> 
> Any macro this big should be a function
> 
Will fix this and DPLL_PR_MEASURED_FREQUENCY (in the next patch)...

Thanks,
Ivan


  reply	other threads:[~2026-05-04  6:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-03 15:13 [PATCH iproute2-next v2 0/2] dpll: phase unit display and frequency monitoring Ivan Vecera
2026-05-03 15:13 ` [PATCH iproute2-next v2 1/2] dpll: add ps unit to phase-related pin attributes Ivan Vecera
2026-05-03 22:34   ` Stephen Hemminger
2026-05-04  6:48     ` Ivan Vecera [this message]
2026-05-03 15:13 ` [PATCH iproute2-next v2 2/2] dpll: add frequency monitoring support 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=a5b6f930-9031-45c8-8bb5-a215b8afb4ee@redhat.com \
    --to=ivecera@redhat.com \
    --cc=dsahern@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=poros@redhat.com \
    --cc=stephen@networkplumber.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