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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <MW5PR12MB55988BE28F8879AF78B4441E875B9@MW5PR12MB5598.namprd12.prod.outlook.com>
Date:   Mon, 3 Oct 2022 09:29:00 +0000
From:   "Gaddam, Sarath Babu Naidu" <sarath.babu.naidu.gaddam@....com>
To:     Rob Herring <robh@...nel.org>
CC:     "davem@...emloft.net" <davem@...emloft.net>,
        "edumazet@...gle.com" <edumazet@...gle.com>,
        "kuba@...nel.org" <kuba@...nel.org>,
        "pabeni@...hat.com" <pabeni@...hat.com>,
        "krzysztof.kozlowski+dt@...aro.org" 
        <krzysztof.kozlowski+dt@...aro.org>,
        "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
        "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
        "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
        "richardcochran@...il.com" <richardcochran@...il.com>,
        "yangbo.lu@....com" <yangbo.lu@....com>,
        "Pandey, Radhey Shyam" <radhey.shyam.pandey@....com>,
        "Sarangi, Anirudha" <anirudha.sarangi@....com>,
        "Katakam, Harini" <harini.katakam@....com>
Subject: RE: [RFC PATCH] dt-bindings: net: ethernet-controller: Add
 ptimer_handle

+Richard Cochran

> -----Original Message-----
> From: Rob Herring <robh@...nel.org>
> Sent: Saturday, October 1, 2022 12:52 AM
> To: Gaddam, Sarath Babu Naidu <sarath.babu.naidu.gaddam@....com>
> Cc: davem@...emloft.net; edumazet@...gle.com; kuba@...nel.org;
> pabeni@...hat.com; krzysztof.kozlowski+dt@...aro.org;
> netdev@...r.kernel.org; devicetree@...r.kernel.org; linux-
> kernel@...r.kernel.org; yangbo.lu@....com; Pandey, Radhey Shyam
> <radhey.shyam.pandey@....com>; Sarangi, Anirudha
> <anirudha.sarangi@....com>; Katakam, Harini <harini.katakam@....com>
> Subject: Re: [RFC PATCH] dt-bindings: net: ethernet-controller: Add
> ptimer_handle
> 
> On Thu, Sep 29, 2022 at 06:12:49AM -0600, Sarath Babu Naidu Gaddam wrote:
> > There is currently no standard property to pass PTP device index
> > information to ethernet driver when they are independent.
> >
> > ptimer_handle property will contain phandle to PTP timer node.
> 
> ptimer_handle or ptimer-handle? One matches conventions.
> 
> However, 'handle' is redundant and 'ptimer' is vague. 'ptp-timer'
> instead? (Humm, looking at fsl-fman.txt after writing everything here, it's
> already using that name! So why are you making something new?)

Thanks for the review.
I think Freescale driver uses "ptimer-handle" but I also see Freescale DT 
documentation refers to "ptp-timer".
 
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
tree/Documentation/devicetree/bindings/net/fsl-fman.txt#n320

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/
tree/drivers/net/ethernet/freescale/dpaa/dpaa_ethtool.c#n467

it will be good to agree on a generic property name to link to PTP phandle
to Ethernet node for any driver to use. 

> 
> However, for anything common, I'd like to see multiple examples and users.
> Do we have any custom bindings for this purpose already (besides FSL)?

AFAIK There are no other examples. We plan to use this in Xilinx axienet.  

> 
> Could an ethernet device ever need more than 1 timer? Could a provider
> provide multiple timers? IOW, does this need to follow standard
> provider/consumer pattern of 'foos' and '#foo-cells'?

No, Even In systems with multiple timers ethernet uses timestamps only
from one associated PTP timer.

> 
> > Freescale driver currently has this implementation, but it will be good
> > to agree on a generic (optional) property name to link to PTP phandle
> > to Ethernet node. In future or any current ethernet driver wants to
> > use this method of reading the PHC index,they can simply use
> 
> What's PHC index?

PHC(PTP Hardware clock) index is a number which is used by ptp4l
application. When a PTP device registers with a kernel, device node
will be created in the /dev.For example, /dev/ptp0, /dev/ptp1.

When PTP and Ethernet are in the same device driver, This PHC index
Information is internally accessible. When they are independent drivers,
PTP DT node should be linked to ethernet node so that PTP timer
information such as PHC index is accessible.   

> 
> > this generic name and point their own PTP timer node, instead of
> > creating seperate property names in each ethernet driver DT node.
> >
> > axiethernet driver uses this method when PTP support is integrated.
> >
> > Example:
> > 	fman0: fman@...0000 {
> > 		ptimer-handle = <&ptp_timer0>;
> > 	}
> >
> > 	ptp_timer0: ptp-timer@...e000 {
> > 		compatible = "fsl,fman-ptp-timer";
> > 		reg = <0x0 0x1afe000 0x0 0x1000>;
> > 	}
> >
> > Signed-off-by: Sarath Babu Naidu Gaddam
> > <sarath.babu.naidu.gaddam@....com>
> > ---
> > We want binding to be reviewed/accepted and then make changes in
> > freescale binding documentation to use this generic binding.
> 
> You can't just change the binding you are using. That's an ABI break.
> 
Apologies for confusion. I am not proposing a change to the property
name.I am simply trying to document the correct DT property name 
used in Freescale and then move it to generic ethernet-controller.yaml.

Thanks,
Sarath



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ