Re: net: dsa: hellcreek: Add support for hardware timestamping

2020-11-09 Thread Colin Ian King
mmit f0d4ba9eff75a79fccb7793f4d9f12303d458603 >> Author: Kamil Alkhouri >> Date: Tue Nov 3 08:10:58 2020 +0100 >> >> net: dsa: hellcreek: Add support for hardware timestamping >> >> The analysis is as follows: >> >> 323/*

re: net: dsa: hellcreek: Add support for hardware timestamping

2020-11-09 Thread Kurt Kanzenbach
te: Tue Nov 3 08:10:58 2020 +0100 > > net: dsa: hellcreek: Add support for hardware timestamping > > The analysis is as follows: > > 323/* Get nanoseconds from ptp packet */ > 324type = SKB_PTP_TYPE(skb); > >4. returned_null: ptp_pars

re: net: dsa: hellcreek: Add support for hardware timestamping

2020-11-09 Thread Colin Ian King
Hi Static analysis on linux-next with Coverity has detected a potential null pointer dereference issue on the following commit: commit f0d4ba9eff75a79fccb7793f4d9f12303d458603 Author: Kamil Alkhouri Date: Tue Nov 3 08:10:58 2020 +0100 net: dsa: hellcreek: Add support for hardware

[PATCH net-next v8 5/8] net: dsa: hellcreek: Add support for hardware timestamping

2020-11-02 Thread Kurt Kanzenbach
From: Kamil Alkhouri The switch has the ability to take hardware generated time stamps per port for PTPv2 event messages in Rx and Tx direction. That is useful for achieving needed time synchronization precision for TSN devices/switches. So add support for it. There are two directions: * RX

[PATCH net-next v7 5/8] net: dsa: hellcreek: Add support for hardware timestamping

2020-10-28 Thread Kurt Kanzenbach
From: Kamil Alkhouri The switch has the ability to take hardware generated time stamps per port for PTPv2 event messages in Rx and Tx direction. That is useful for achieving needed time synchronization precision for TSN devices/switches. So add support for it. There are two directions: * RX

Re: [PATCH net-next v6 4/7] net: dsa: hellcreek: Add support for hardware timestamping

2020-10-14 Thread Kurt Kanzenbach
On Wed Oct 14 2020, Richard Cochran wrote: > On Wed, Oct 14, 2020 at 12:57:47PM +0300, Vladimir Oltean wrote: >> So the discussion is about how to have the cake and eat it at the same >> time. > > And I wish for a pony. With sparkles. And a unicorn. And a rainbow. > >> Silicon vendors eager to f

Re: [PATCH net-next v6 4/7] net: dsa: hellcreek: Add support for hardware timestamping

2020-10-14 Thread Richard Cochran
On Wed, Oct 14, 2020 at 12:57:47PM +0300, Vladimir Oltean wrote: > So the discussion is about how to have the cake and eat it at the same > time. And I wish for a pony. With sparkles. And a unicorn. And a rainbow. > Silicon vendors eager to follow the latest trends in standards are > implement

Re: [PATCH net-next v6 4/7] net: dsa: hellcreek: Add support for hardware timestamping

2020-10-14 Thread Vladimir Oltean
On Mon, Oct 12, 2020 at 02:42:54PM -0700, Richard Cochran wrote: > If you want, you can run your PHC using the linuxptp "free_running" > option. Then, you can use the TIME_STATUS_NP management request to > use the remote time signal in your application. I was expecting some sort of reaction to th

Re: [PATCH net-next v6 4/7] net: dsa: hellcreek: Add support for hardware timestamping

2020-10-12 Thread Richard Cochran
On Mon, Oct 12, 2020 at 02:53:58PM +0200, Kamil Alkhouri wrote: > > By the way, how would you see the split between an unsynchronized and > > a > > synchronized PHC be implemented in the Linux kernel? If you want, you can run your PHC using the linuxptp "free_running" option. Then, you can use th

Re: [PATCH net-next v6 4/7] net: dsa: hellcreek: Add support for hardware timestamping

2020-10-12 Thread Kamil Alkhouri
Hi Vladimir, On Thu, 2020-10-08 at 18:09 +0300, Vladimir Oltean wrote: > Hi Kamil, > > On Thu, Oct 08, 2020 at 02:55:57PM +0200, Kamil Alkhouri wrote: > > Hello dears, > > > > On Thu, 2020-10-08 at 12:01 +0200, Kurt Kanzenbach wrote: > > > On Thu Oct 08 2020, Vladimir Oltean wrote: > > > > On Th

Re: [PATCH net-next v6 4/7] net: dsa: hellcreek: Add support for hardware timestamping

2020-10-08 Thread Vladimir Oltean
Hi Kamil, On Thu, Oct 08, 2020 at 02:55:57PM +0200, Kamil Alkhouri wrote: > Hello dears, > > On Thu, 2020-10-08 at 12:01 +0200, Kurt Kanzenbach wrote: > > On Thu Oct 08 2020, Vladimir Oltean wrote: > > > On Thu, Oct 08, 2020 at 10:34:11AM +0200, Kurt Kanzenbach wrote: > > > > On Wed Oct 07 2020,

Re: [PATCH net-next v6 4/7] net: dsa: hellcreek: Add support for hardware timestamping

2020-10-08 Thread Kamil Alkhouri
Hello dears, On Thu, 2020-10-08 at 12:01 +0200, Kurt Kanzenbach wrote: > On Thu Oct 08 2020, Vladimir Oltean wrote: > > On Thu, Oct 08, 2020 at 10:34:11AM +0200, Kurt Kanzenbach wrote: > > > On Wed Oct 07 2020, Vladimir Oltean wrote: > > > > On Wed, Oct 07, 2020 at 12:39:49PM +0200, Kurt Kanzenbac

Re: [PATCH net-next v6 4/7] net: dsa: hellcreek: Add support for hardware timestamping

2020-10-08 Thread Kurt Kanzenbach
On Thu Oct 08 2020, Vladimir Oltean wrote: > On Thu, Oct 08, 2020 at 10:34:11AM +0200, Kurt Kanzenbach wrote: >> On Wed Oct 07 2020, Vladimir Oltean wrote: >> > On Wed, Oct 07, 2020 at 12:39:49PM +0200, Kurt Kanzenbach wrote: >> >> For instance the hellcreek switch has actually three ptp hardware >

Re: [PATCH net-next v6 4/7] net: dsa: hellcreek: Add support for hardware timestamping

2020-10-08 Thread Vladimir Oltean
On Thu, Oct 08, 2020 at 10:34:11AM +0200, Kurt Kanzenbach wrote: > On Wed Oct 07 2020, Vladimir Oltean wrote: > > On Wed, Oct 07, 2020 at 12:39:49PM +0200, Kurt Kanzenbach wrote: > >> For instance the hellcreek switch has actually three ptp hardware > >> clocks and the time stamping can be configur

Re: [PATCH net-next v6 4/7] net: dsa: hellcreek: Add support for hardware timestamping

2020-10-08 Thread Kurt Kanzenbach
On Wed Oct 07 2020, Vladimir Oltean wrote: > On Wed, Oct 07, 2020 at 12:39:49PM +0200, Kurt Kanzenbach wrote: >> For instance the hellcreek switch has actually three ptp hardware >> clocks and the time stamping can be configured to use either one of >> them. > > The sja1105 also has a corrected and

Re: [PATCH net-next v6 4/7] net: dsa: hellcreek: Add support for hardware timestamping

2020-10-07 Thread Vladimir Oltean
On Wed, Oct 07, 2020 at 12:39:49PM +0200, Kurt Kanzenbach wrote: > On Tue Oct 06 2020, Vladimir Oltean wrote: > > On Tue, Oct 06, 2020 at 03:56:31PM +0200, Kurt Kanzenbach wrote: > >> Yeah, sure. That use case makes sense. What's the problem exactly? > > > > The SO_TIMESTAMPING / SO_TIMESTAMPNS cms

Re: [PATCH net-next v6 4/7] net: dsa: hellcreek: Add support for hardware timestamping

2020-10-07 Thread Kurt Kanzenbach
On Tue Oct 06 2020, Vladimir Oltean wrote: > On Tue, Oct 06, 2020 at 03:56:31PM +0200, Kurt Kanzenbach wrote: >> On Tue Oct 06 2020, Vladimir Oltean wrote: >> > On Tue, Oct 06, 2020 at 03:30:36PM +0200, Kurt Kanzenbach wrote: >> >> That's the point. The user (or anybody else) cannot disable hardwar

Re: [PATCH net-next v6 4/7] net: dsa: hellcreek: Add support for hardware timestamping

2020-10-06 Thread Vladimir Oltean
On Tue, Oct 06, 2020 at 03:56:31PM +0200, Kurt Kanzenbach wrote: > On Tue Oct 06 2020, Vladimir Oltean wrote: > > On Tue, Oct 06, 2020 at 03:30:36PM +0200, Kurt Kanzenbach wrote: > >> That's the point. The user (or anybody else) cannot disable hardware > >> stamping, because it is always performed.

Re: [PATCH net-next v6 4/7] net: dsa: hellcreek: Add support for hardware timestamping

2020-10-06 Thread Kurt Kanzenbach
On Tue Oct 06 2020, Vladimir Oltean wrote: > On Tue, Oct 06, 2020 at 03:30:36PM +0200, Kurt Kanzenbach wrote: >> That's the point. The user (or anybody else) cannot disable hardware >> stamping, because it is always performed. So, why should it be allowed >> to disable it even when it cannot be dis

Re: [PATCH net-next v6 4/7] net: dsa: hellcreek: Add support for hardware timestamping

2020-10-06 Thread Vladimir Oltean
On Tue, Oct 06, 2020 at 03:30:36PM +0200, Kurt Kanzenbach wrote: > That's the point. The user (or anybody else) cannot disable hardware > stamping, because it is always performed. So, why should it be allowed > to disable it even when it cannot be disabled? Because your driver's user can attach a

Re: [PATCH net-next v6 4/7] net: dsa: hellcreek: Add support for hardware timestamping

2020-10-06 Thread Kurt Kanzenbach
On Tue Oct 06 2020, Vladimir Oltean wrote: > On Tue, Oct 06, 2020 at 08:27:42AM +0200, Kurt Kanzenbach wrote: >> On Sun Oct 04 2020, Vladimir Oltean wrote: >> > On Sun, Oct 04, 2020 at 01:29:08PM +0200, Kurt Kanzenbach wrote: >> >> +/* Enabling/disabling TX and RX HW timestamping for different PTP

Re: [PATCH net-next v6 4/7] net: dsa: hellcreek: Add support for hardware timestamping

2020-10-06 Thread Vladimir Oltean
On Tue, Oct 06, 2020 at 08:27:42AM +0200, Kurt Kanzenbach wrote: > On Sun Oct 04 2020, Vladimir Oltean wrote: > > On Sun, Oct 04, 2020 at 01:29:08PM +0200, Kurt Kanzenbach wrote: > >> +/* Enabling/disabling TX and RX HW timestamping for different PTP > >> messages is > >> + * not available in the

Re: [PATCH net-next v6 4/7] net: dsa: hellcreek: Add support for hardware timestamping

2020-10-05 Thread Kurt Kanzenbach
On Sun Oct 04 2020, Vladimir Oltean wrote: > On Sun, Oct 04, 2020 at 01:29:08PM +0200, Kurt Kanzenbach wrote: >> +/* Enabling/disabling TX and RX HW timestamping for different PTP messages >> is >> + * not available in the switch. Thus, this function only serves as a check >> if >> + * the user r

Re: [PATCH net-next v6 4/7] net: dsa: hellcreek: Add support for hardware timestamping

2020-10-04 Thread Vladimir Oltean
On Sun, Oct 04, 2020 at 01:29:08PM +0200, Kurt Kanzenbach wrote: > From: Kamil Alkhouri > > The switch has the ability to take hardware generated time stamps per port for > PTPv2 event messages in Rx and Tx direction. That is useful for achieving > needed > time synchronization precision for TSN

[PATCH net-next v6 4/7] net: dsa: hellcreek: Add support for hardware timestamping

2020-10-04 Thread Kurt Kanzenbach
From: Kamil Alkhouri The switch has the ability to take hardware generated time stamps per port for PTPv2 event messages in Rx and Tx direction. That is useful for achieving needed time synchronization precision for TSN devices/switches. So add support for it. There are two directions: * RX

[PATCH v5 4/7] net: dsa: hellcreek: Add support for hardware timestamping

2020-09-03 Thread Kurt Kanzenbach
From: Kamil Alkhouri The switch has the ability to take hardware generated time stamps per port for PTPv2 event messages in Rx and Tx direction. That is useful for achieving needed time synchronization precision for TSN devices/switches. So add support for it. There are two directions: * RX

[PATCH v4 4/7] net: dsa: hellcreek: Add support for hardware timestamping

2020-09-01 Thread Kurt Kanzenbach
From: Kamil Alkhouri The switch has the ability to take hardware generated time stamps per port for PTPv2 event messages in Rx and Tx direction. That is useful for achieving needed time synchronization precision for TSN devices/switches. So add support for it. There are two directions: * RX

[PATCH v3 4/8] net: dsa: hellcreek: Add support for hardware timestamping

2020-08-20 Thread Kurt Kanzenbach
From: Kamil Alkhouri The switch has the ability to take hardware generated time stamps per port for PTPv2 event messages in Rx and Tx direction. That is useful for achieving needed time synchronization precision for TSN devices/switches. So add support for it. There are two directions: * RX

Re: [PATCH v2 4/8] net: dsa: hellcreek: Add support for hardware timestamping

2020-07-23 Thread kernel test robot
Hi Kurt, Thank you for the patch! Yet something to improve: [auto build test ERROR on net-next/master] [also build test ERROR on next-20200723] [cannot apply to robh/for-next sparc-next/master net/master linus/master v5.8-rc6] [If your patch is applied to the wrong git tree, kindly drop us a not

[PATCH v2 4/8] net: dsa: hellcreek: Add support for hardware timestamping

2020-07-23 Thread Kurt Kanzenbach
From: Kamil Alkhouri The switch has the ability to take hardware generated time stamps per port for PTPv2 event messages in Rx and Tx direction. That is useful for achieving needed time synchronization precision for TSN devices/switches. So add support for it. There are two directions: * RX

Re: [PATCH v1 4/8] net: dsa: hellcreek: Add support for hardware timestamping

2020-07-13 Thread Richard Cochran
On Mon, Jul 13, 2020 at 05:12:17PM +0300, Vladimir Oltean wrote: > On Mon, Jul 13, 2020 at 07:01:12AM -0700, Richard Cochran wrote: > > I don't think it makes sense for DSA drivers to set this bit, as it > > serves no purpose in the DSA context. > > > > For whom does this bit serve a purpose, tho

Re: [PATCH v1 4/8] net: dsa: hellcreek: Add support for hardware timestamping

2020-07-13 Thread Vladimir Oltean
On Mon, Jul 13, 2020 at 07:01:12AM -0700, Richard Cochran wrote: > On Mon, Jul 13, 2020 at 12:57:34PM +0200, Kurt Kanzenbach wrote: > > > I would like to get some clarification on whether "SKBTX_IN_PROGRESS" > > > should be set in shtx->tx_flags or not. On one hand, it's asking for > > > trouble, o

Re: [PATCH v1 4/8] net: dsa: hellcreek: Add support for hardware timestamping

2020-07-13 Thread Richard Cochran
On Mon, Jul 13, 2020 at 12:57:34PM +0200, Kurt Kanzenbach wrote: > Hi Vladimir, > > On Mon Jul 13 2020, Vladimir Oltean wrote: > >> +/* Get a pointer to the PTP header in this skb */ > >> +static u8 *parse_ptp_header(struct sk_buff *skb, unsigned int type) > > > > Maybe this and the function from

Re: [PATCH v1 4/8] net: dsa: hellcreek: Add support for hardware timestamping

2020-07-13 Thread Kurt Kanzenbach
Hi Vladimir, On Mon Jul 13 2020, Vladimir Oltean wrote: > Hi Kurt, > > On Fri, Jul 10, 2020 at 01:36:07PM +0200, Kurt Kanzenbach wrote: >> From: Kamil Alkhouri >> >> The switch has the ability to take hardware generated time stamps per port >> for >> PTPv2 event messages in Rx and Tx direction.

Re: [PATCH v1 4/8] net: dsa: hellcreek: Add support for hardware timestamping

2020-07-13 Thread Vladimir Oltean
Hi Kurt, On Fri, Jul 10, 2020 at 01:36:07PM +0200, Kurt Kanzenbach wrote: > From: Kamil Alkhouri > > The switch has the ability to take hardware generated time stamps per port for > PTPv2 event messages in Rx and Tx direction. That is useful for achieving > needed > time synchronization precisi

Re: [PATCH v1 4/8] net: dsa: hellcreek: Add support for hardware timestamping

2020-07-12 Thread Kurt Kanzenbach
On Sat Jul 11 2020, Richard Cochran wrote: > On Fri, Jul 10, 2020 at 01:36:07PM +0200, Kurt Kanzenbach wrote: >> +static void hellcreek_get_rxts(struct hellcreek *hellcreek, >> + struct hellcreek_port_hwtstamp *ps, >> + struct sk_buff *skb, struct

Re: [PATCH v1 4/8] net: dsa: hellcreek: Add support for hardware timestamping

2020-07-11 Thread Richard Cochran
On Fri, Jul 10, 2020 at 01:36:07PM +0200, Kurt Kanzenbach wrote: > +static void hellcreek_get_rxts(struct hellcreek *hellcreek, > +struct hellcreek_port_hwtstamp *ps, > +struct sk_buff *skb, struct sk_buff_head *rxq, > +

[PATCH v1 4/8] net: dsa: hellcreek: Add support for hardware timestamping

2020-07-10 Thread Kurt Kanzenbach
From: Kamil Alkhouri The switch has the ability to take hardware generated time stamps per port for PTPv2 event messages in Rx and Tx direction. That is useful for achieving needed time synchronization precision for TSN devices/switches. So add support for it. There are two directions: * RX

[RFC PATCH 4/9] net: dsa: hellcreek: Add support for hardware timestamping

2020-06-17 Thread Kurt Kanzenbach
From: Kamil Alkhouri The switch has the ability to take hardware generated time stamps per port for PTPv2 event messages in Rx and Tx direction. That is useful for achieving needed time synchronization precision for TSN devices/switches. So add support for it. There are two directions: * RX