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: <87sgdvncti.fsf@kurt>
Date:   Mon, 13 Jul 2020 08:34:01 +0200
From:   Kurt Kanzenbach <kurt@...utronix.de>
To:     Florian Fainelli <f.fainelli@...il.com>,
        Andrew Lunn <andrew@...n.ch>,
        Vivien Didelot <vivien.didelot@...il.com>
Cc:     "David S. Miller" <davem@...emloft.net>,
        Jakub Kicinski <kuba@...nel.org>, netdev@...r.kernel.org,
        Rob Herring <robh+dt@...nel.org>, devicetree@...r.kernel.org,
        Sebastian Andrzej Siewior <bigeasy@...utronix.de>,
        Richard Cochran <richardcochran@...il.com>,
        Kamil Alkhouri <kamil.alkhouri@...offenburg.de>,
        ilias.apalodimas@...aro.org, Vladimir Oltean <olteanv@...il.com>
Subject: Re: [PATCH v1 3/8] net: dsa: hellcreek: Add PTP clock support

On Sat Jul 11 2020, Florian Fainelli wrote:
> On 7/10/2020 4:36 AM, Kurt Kanzenbach wrote:
>> From: Kamil Alkhouri <kamil.alkhouri@...offenburg.de>
>> 
>> The switch has internal PTP hardware clocks. Add support for it. There are three
>> clocks:
>> 
>>  * Synchronized
>>  * Syntonized
>>  * Free running
>> 
>> Currently the synchronized clock is exported to user space which is a good
>> default for the beginning. The free running clock might be exported later
>> e.g. for implementing 802.1AS-2011/2020 Time Aware Bridges (TAB). The switch
>> also supports cross time stamping for that purpose.
>> 
>> The implementation adds support setting/getting the time as well as offset and
>> frequency adjustments. However, the clock only holds a partial timeofday
>> timestamp. This is why we track the seconds completely in software (see overflow
>> work and last_ts).
>> 
>> Furthermore, add the PTP multicast addresses into the FDB to forward that
>> packages only to the CPU port where they are processed by a PTP program.
>> 
>> Signed-off-by: Kamil Alkhouri <kamil.alkhouri@...offenburg.de>
>> Signed-off-by: Kurt Kanzenbach <kurt@...utronix.de>
>
> Are not you missing an depends on PTP_1588_CLOCK somewhere?

Most likely. Thanks!

>
>> ---
>
> [snip]
>
>>  
>> +static int hellcreek_setup_fdb(struct hellcreek *hellcreek)
>> +{
>> +	static struct hellcreek_fdb_entry ptp = {
>> +		/* MAC: 01-1B-19-00-00-00 */
>> +		.mac	      = { 0x01, 0x1b, 0x19, 0x00, 0x00, 0x00 },
>> +		.portmask     = 0x03,	/* Management ports */
>
> Should not this depend on the actual number of ports enabled by the user
> and so it would be more logical to program those entries (or update
> them) at port_enable() time?

For me this is a switch configuration. It means forward all PTP traffic
to the switch's CPU port and therefore it doesn't depend on the enabled
ports.

Thanks,
Kurt

Download attachment "signature.asc" of type "application/pgp-signature" (833 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ