[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20221209113833.4kbgof3kfw4zjpaq@skbuf>
Date: Fri, 9 Dec 2022 13:38:33 +0200
From: Vladimir Oltean <olteanv@...il.com>
To: Arun Ramadoss <arun.ramadoss@...rochip.com>
Cc: linux-kernel@...r.kernel.org, netdev@...r.kernel.org,
woojung.huh@...rochip.com, UNGLinuxDriver@...rochip.com,
andrew@...n.ch, vivien.didelot@...il.com, f.fainelli@...il.com,
davem@...emloft.net, edumazet@...gle.com, kuba@...nel.org,
pabeni@...hat.com, linux@...linux.org.uk,
Tristram.Ha@...rochip.com, richardcochran@...il.com,
ceggers@...i.de
Subject: Re: [Patch net-next v3 03/13] net: dsa: microchip: ptp: add 4 bytes
in tail tag when ptp enabled
On Fri, Dec 09, 2022 at 12:54:27PM +0530, Arun Ramadoss wrote:
> When the PTP is enabled in hardware bit 6 of PTP_MSG_CONF1 register, the
> transmit frame needs additional 4 bytes before the tail tag. It is
> needed for all the transmission packets irrespective of PTP packets or
> not.
> The 4-byte timestamp field is 0 for frames other than Pdelay_Resp. For
> the one-step Pdelay_Resp, the switch needs the receive timestamp of the
> Pdelay_Req message so that it can put the turnaround time in the
> correction field.
> Since PTP has to be enabled for both Transmission and reception
> timestamping, driver needs to track of the tx and rx setting of the all
> the user ports in the switch.
> Two flags hw_tx_en and hw_rx_en are added in ksz_port to track the
> timestampping setting of each port. When any one of ports has tx or rx
> timestampping enabled, bit 6 of PTP_MSG_CONF1 is set and it is indicated
> to tag_ksz.c through tagger bytes. This flag adds 4 additional bytes to
> the tail tag. When tx and rx timestamping of all the ports are disabled,
> then 4 bytes are not added.
>
> Testing using hwstamp -i <interface>
>
> Signed-off-by: Arun Ramadoss <arun.ramadoss@...rochip.com>
> ---
Reviewed-by: Vladimir Oltean <olteanv@...il.com> # mostly api
Powered by blists - more mailing lists