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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CA+h21houLC7TGJYQ28LxiUxyBE7ju2ZiRcUd41aGo_=uAhgVgQ@mail.gmail.com>
Date:   Fri, 31 May 2019 21:12:03 +0300
From:   Vladimir Oltean <olteanv@...il.com>
To:     Richard Cochran <richardcochran@...il.com>
Cc:     Florian Fainelli <f.fainelli@...il.com>,
        Vivien Didelot <vivien.didelot@...il.com>,
        Andrew Lunn <andrew@...n.ch>,
        "David S. Miller" <davem@...emloft.net>,
        John Stultz <john.stultz@...aro.org>,
        Thomas Gleixner <tglx@...utronix.de>,
        Stephen Boyd <sboyd@...nel.org>,
        lkml <linux-kernel@...r.kernel.org>,
        netdev <netdev@...r.kernel.org>
Subject: Re: [PATCH net-next 0/5] PTP support for the SJA1105 DSA driver

On Fri, 31 May 2019 at 19:16, Vladimir Oltean <olteanv@...il.com> wrote:
>
> On Fri, 31 May 2019 at 19:09, Richard Cochran <richardcochran@...il.com> wrote:
> >
> > On Fri, May 31, 2019 at 06:23:34PM +0300, Vladimir Oltean wrote:
> > > You mean to queue it and subvert DSA's own RX timestamping callback?
> >
> > No, use the callback.
> >
> > > Why would I do that? Just so as not to introduce my .can_timestamp
> > > callback?
> >
> > Right, the .can_timestamp is unneeded, AFAICT.
> >
> > > > Now I'm starting to understand your series.  I think it can be done in
> > > > simpler way...
> > > >
> > > > sja1105_rcv_meta_state_machine - can and should be at the driver level
> > > > and not at the port level.
> > > >
> > >
> > > Can: yes. Should: why?
> >
> > To keep it simple and robust.
> >
> > > One important aspect makes this need be a little bit more complicated:
> > > reconstructing these RX timestamps.
> > > You see, there is a mutex on the SPI bus, so in practice I do need the
> > > sja1105_port_rxtstamp_work for exactly this purpose - to read the
> > > timestamping clock over SPI.
> >
> > Sure.  But you schedule the work after a META frame.  And no busy
> > waiting is needed.
>
> Ok, I suppose this could work.
> But now comes the question on what to do on error cases - the meta
> frame didn't arrive. Should I just drop the skb waiting for it? Right
> now I "goto rcv_anyway" - which linuxptp doesn't like btw.
>

Actually I've been there before, just forgot it.
It won't work unless I make changes to dsa_switch_rcv.
Right now taggers can only return a pointer to the skb, or NULL, case
in which DSA will free it.
I'd need a mechanism to signal DSA that I'm holding up the skb for a
little bit more time, then re-engage the dsa_switch_rcv path once the
meta frame arrived.

> >
> > Thanks,
> > Richard

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ