From: Vladimir Oltean <olteanv@gmail.com>
To: Arun.Ramadoss@microchip.com
Cc: andrew@lunn.ch, linux-kernel@vger.kernel.org,
UNGLinuxDriver@microchip.com, vivien.didelot@gmail.com,
linux@armlinux.org.uk, Tristram.Ha@microchip.com,
f.fainelli@gmail.com, kuba@kernel.org, edumazet@google.com,
pabeni@redhat.com, richardcochran@gmail.com,
netdev@vger.kernel.org, Woojung.Huh@microchip.com,
davem@davemloft.net
Subject: Re: [RFC Patch net-next v2 3/8] net: dsa: microchip: Initial hardware time stamping support
Date: Fri, 25 Nov 2022 23:40:33 +0200 [thread overview]
Message-ID: <20221125214033.mb67ozczo7th6vi3@skbuf> (raw)
In-Reply-To: <4b2408602ce29c421250102c5165564d7dafda77.camel@microchip.com>
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.
next prev parent reply other threads:[~2022-11-25 21:40 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-11-21 15:41 [RFC Patch net-next v2 0/8] net: dsa: microchip: add PTP support for KSZ9x and LAN937x Arun Ramadoss
2022-11-21 15:41 ` [RFC Patch net-next v2 1/8] net: ptp: add helper for one-step P2P clocks Arun Ramadoss
2022-11-22 14:34 ` Richard Cochran
2022-11-23 7:10 ` Arun.Ramadoss
2022-11-24 14:52 ` Richard Cochran
2022-11-21 15:41 ` [RFC Patch net-next v2 2/8] net: dsa: microchip: adding the posix clock support Arun Ramadoss
2022-11-21 21:33 ` Vladimir Oltean
2022-11-21 22:01 ` Vladimir Oltean
2022-11-21 15:41 ` [RFC Patch net-next v2 3/8] net: dsa: microchip: Initial hardware time stamping support Arun Ramadoss
2022-11-21 23:13 ` Vladimir Oltean
2022-11-23 13:57 ` Arun.Ramadoss
2022-11-24 10:22 ` Vladimir Oltean
2022-11-24 10:52 ` Arun.Ramadoss
2022-11-24 14:14 ` Vladimir Oltean
2022-11-25 7:06 ` Arun.Ramadoss
2022-11-25 21:40 ` Vladimir Oltean [this message]
2022-11-21 15:41 ` [RFC Patch net-next v2 4/8] net: dsa: microchip: Manipulating absolute time using ptp hw clock Arun Ramadoss
2022-11-21 15:41 ` [RFC Patch net-next v2 5/8] net: dsa: microchip: enable the ptp interrupt for timestamping Arun Ramadoss
2022-11-21 15:41 ` [RFC Patch net-next v2 6/8] net: dsa: microchip: Adding the ptp packet reception logic Arun Ramadoss
2022-11-21 15:41 ` [RFC Patch net-next v2 7/8] net: dsa: microchip: add the transmission tstamp logic Arun Ramadoss
2022-11-21 22:51 ` Vladimir Oltean
2022-11-23 8:49 ` Arun.Ramadoss
2022-11-21 15:41 ` [RFC Patch net-next v2 8/8] net: dsa: microchip: ptp: add periodic output signal Arun Ramadoss
2022-11-22 14:36 ` Richard Cochran
2022-11-22 14:38 ` Richard Cochran
2022-11-21 21:17 ` [RFC Patch net-next v2 0/8] net: dsa: microchip: add PTP support for KSZ9x and LAN937x Vladimir Oltean
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221125214033.mb67ozczo7th6vi3@skbuf \
--to=olteanv@gmail.com \
--cc=Arun.Ramadoss@microchip.com \
--cc=Tristram.Ha@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=Woojung.Huh@microchip.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=vivien.didelot@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox