lkml.org 
[lkml]   [2022]   [Nov]   [25]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC Patch net-next v2 3/8] net: dsa: microchip: Initial hardware time stamping support
On Fri, Nov 25, 2022 at 07:06:07AM +0000, Arun.Ramadoss@microchip.com wrote:
> KSZ switches need a additional 4 bytes in tail tag if the PTP is
> enabled in hardware. If the PTP is enabled and if we didn't add 4
> additional bytes in the tail tag then packets are corrupted.
>
> Tristram explained this in the patch conversation
>
> https://lore.kernel.org/netdev/20201118203013.5077-1-ceggers@arri.de/T/#mb3eba4918bda351a405168e7a2140d29262f4c63
>
> I did the follwing experiment today,
> * Removed the ptp time stamp check in tag_ksz.c. In the ksz_xmit
> function, 4 additional bytes are added only if KSZ_SKB_CB->ts_en bit is
> set.
> * Setup the board, ping two boards. Ping is successful.
> * Run the ptpl in the background
> * Now if I run the ping, ping is not successful. And also in the ptp4l
> log message it shows as bad message received.
>
> We need a mechanism to inform tag_ksz.c to add 4 additional bytes in
> tail_tag for all the packets if the ptp is enabled in the hardware.

Ok. The code + comments need to be sufficiently self-explanatory that
this question does not get asked again. It will not be trivial to do a
proper job documenting the hardware oddities as a justification for the
software workarounds, but it should be possible.

\
 
 \ /
  Last update: 2022-11-25 22:41    [W:0.060 / U:1.852 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site