lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20260203101421.367965-1-ivecera@redhat.com>
Date: Tue,  3 Feb 2026 11:14:21 +0100
From: Ivan Vecera <ivecera@...hat.com>
To: netdev@...r.kernel.org
Cc: David Ahern <dsahern@...nel.org>,
	Stephen Hemminger <stephen@...workplumber.org>,
	Jiri Pirko <jiri@...nulli.us>,
	Petr Oros <poros@...hat.com>
Subject: [PATCH iproute2-next] dpll: add support for fractional frequency offset in ppt

Add support for the DPLL_A_PIN_FRACTIONAL_FREQUENCY_OFFSET_PPT attribute
to the pin print attributes.

The logic ensures that in standard (human-readable) output, the legacy
fractional-frequency-offset is hidden if the new ppt (parts per trillion)
value is present, preventing redundant information.

However, the legacy attribute is still printed if:
1. The output format is JSON (to maintain full data availability).
2. The new PPT attribute is missing (backward compatibility with older
   kernels).

Human-readable output example:
==============================
[root@...t iproute2-next]# ./dpll/dpll pin show id 5
pin id 5:
  module-name: zl3073x
  clock-id: 5855731461854439600
  board-label: TCX0
  package-label: REF4P
  type: ext
  frequency: 20000000 Hz
  frequency-supported:
    20000000 Hz
  capabilities: 0x6 state-can-change priority-can-change
  phase-adjust-min: -2147483648
  phase-adjust-max: 2147483647
  phase-adjust: 0
  fractional-frequency-offset-ppt: 3003980
  esync-frequency: 0 Hz
  esync-pulse: 0
  parent-device:
    id 0 direction input prio 14 state disconnected phase-offset 0
    id 1 direction input prio 14 state disconnected phase-offset 0

JSON output example:
====================
[root@...t iproute2-next]# ./dpll/dpll -j -p pin show id 5
{
    "id": 5,
    "module-name": "zl3073x",
    "clock-id": 5855731461854439600,
    "board-label": "TCX0",
    "package-label": "REF4P",
    "type": "ext",
    "frequency": 20000000,
    "frequency-supported": [ {
            "frequency-min": 20000000,
            "frequency-max": 20000000
        } ],
    "capabilities": [ "state-can-change","priority-can-change" ],
    "phase-adjust-min": -2147483648,
    "phase-adjust-max": 2147483647,
    "phase-adjust": 0,
    "fractional-frequency-offset": 3,
    "fractional-frequency-offset-ppt": 3042863,
    "esync-frequency": 0,
    "esync-pulse": 0,
    "parent-device": [ {
            "parent-id": 0,
            "direction": "input",
            "prio": 14,
            "state": "disconnected",
            "phase-offset": 0
        },{
            "parent-id": 1,
            "direction": "input",
            "prio": 14,
            "state": "disconnected",
            "phase-offset": 0
        } ]
}

Signed-off-by: Ivan Vecera <ivecera@...hat.com>
---
 dpll/dpll.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/dpll/dpll.c b/dpll/dpll.c
index 9dc3f8db373d..624567c2a826 100644
--- a/dpll/dpll.c
+++ b/dpll/dpll.c
@@ -1261,8 +1261,11 @@ static void dpll_pin_print_attrs(struct nlattr **tb)
 	DPLL_PR_UINT(tb, DPLL_A_PIN_PHASE_ADJUST_GRAN, "phase-adjust-gran");
 	DPLL_PR_INT(tb, DPLL_A_PIN_PHASE_ADJUST, "phase-adjust");
 
-	DPLL_PR_SINT(tb, DPLL_A_PIN_FRACTIONAL_FREQUENCY_OFFSET,
-		     "fractional-frequency-offset");
+	if (json || !tb[DPLL_A_PIN_FRACTIONAL_FREQUENCY_OFFSET_PPT])
+		DPLL_PR_SINT(tb, DPLL_A_PIN_FRACTIONAL_FREQUENCY_OFFSET,
+			     "fractional-frequency-offset");
+	DPLL_PR_SINT(tb, DPLL_A_PIN_FRACTIONAL_FREQUENCY_OFFSET_PPT,
+		     "fractional-frequency-offset-ppt");
 
 	DPLL_PR_U64_FMT(tb, DPLL_A_PIN_ESYNC_FREQUENCY, "esync-frequency",
 			"  esync-frequency: %" PRIu64 " Hz\n");
-- 
2.52.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ