Discussion:
[Linuxptp-devel] Clarification of PHC and PHY on the supported lists?
George Neville-Neil
2013-12-02 20:37:28 UTC
Permalink
Hi,

I am trying to determine why the hardware timestamping support table only lists PHC and not PHY
timestamping. Testing on a system with an Intel 82576 NIC, I was unable, even with a very recent kernel (3.10)
to get PHY level time stamping.

Do I need to build a custom kernel for this to work?

Best,
George
Keller, Jacob E
2013-12-02 21:23:57 UTC
Permalink
Post by George Neville-Neil
Hi,
I am trying to determine why the hardware timestamping support table only lists PHC and not PHY
timestamping. Testing on a system with an Intel 82576 NIC, I was unable, even with a very recent kernel (3.10)
to get PHY level time stamping.
Do I need to build a custom kernel for this to work?
Best,
George
I am not sure the 82576 NIC actually supports PHY level timestamping. I
believe you have to have PHY and NIC support? (maybe only driver
support?) But this is partly because 82576 driver does not use phylib.
(As far as I know, this is because the PHY is tied more closely to the
board than phylib was designed for...?) I don't know exactly the
details..

Richard do you know more about how PHY level timestamping works?

Regards,
Ja
Richard Cochran
2013-12-02 21:53:25 UTC
Permalink
Post by Keller, Jacob E
I am not sure the 82576 NIC actually supports PHY level timestamping. I
believe you have to have PHY and NIC support? (maybe only driver
support?) But this is partly because 82576 driver does not use phylib.
(As far as I know, this is because the PHY is tied more closely to the
board than phylib was designed for...?) I don't know exactly the
details..
Right, the PHY time stamping only works with MAC drivers that use both
phylib and NAPI. All of those drivers are listed in the table.
Post by Keller, Jacob E
Richard do you know more about how PHY level timestamping works?
I wrote a bit more in my other mail.

Thanks,
Richard
Richard Cochran
2013-12-02 21:46:53 UTC
Permalink
Post by George Neville-Neil
Hi,
I am trying to determine why the hardware timestamping support table only lists PHC and not PHY
timestamping. Testing on a system with an Intel 82576 NIC, I was unable, even with a very recent kernel (3.10)
to get PHY level time stamping.
Hi George,

As you know, there are both MACs and PHYs on the market with hardware
time stamping and clock functionality. Linux supports both, but not at
the same time on the same port. Right now, the dp83640 is only PHY
driver in the kernel with time stamping and PHC supported.

[ Looking at the table, I see that it really doesn't tell you whether
the part in question is a MAC or PHY. This can be improved. ]

In order to allow PHY time stamping and PHC functions, the MAC driver
has to play along too, and not all MAC drivers can do this. So the
"PHY" column is really saying whether you can combine that MAC with a
PTP capable PHY or not. The PTP MACs all have "NA" (Not Applicable)
because you cannot have time stamping in both the MAC and the PHY.

Your card, the 82576, does support MAC time stamping and PHC
functions, at it should work in 3.10 kernel. But even if you combine
it with a PTP capable PHY (like the dp83640), the PHY time stamping
won't work.
Post by George Neville-Neil
Do I need to build a custom kernel for this to work?
To support time stamping in the PHY, your kernel needs to have option
CONFIG_NETWORK_PHY_TIMESTAMPING enabled. Since this adds extra checks
into the hot path, probably no distro kernel will turn it on. So, yes,
you will have to recompile if you want PHY time stamping. (And you
will also need the dp83640 combined with a MAC in the table for which
PHY=Y.)

HTH,
Richard
George Neville-Neil
2013-12-02 22:15:08 UTC
Permalink
Post by Richard Cochran
Post by George Neville-Neil
Hi,
I am trying to determine why the hardware timestamping support table only lists PHC and not PHY
timestamping. Testing on a system with an Intel 82576 NIC, I was unable, even with a very recent kernel (3.10)
to get PHY level time stamping.
Hi George,
As you know, there are both MACs and PHYs on the market with hardware
time stamping and clock functionality. Linux supports both, but not at
the same time on the same port. Right now, the dp83640 is only PHY
driver in the kernel with time stamping and PHC supported.
[ Looking at the table, I see that it really doesn't tell you whether
the part in question is a MAC or PHY. This can be improved. ]
In order to allow PHY time stamping and PHC functions, the MAC driver
has to play along too, and not all MAC drivers can do this. So the
"PHY" column is really saying whether you can combine that MAC with a
PTP capable PHY or not. The PTP MACs all have "NA" (Not Applicable)
because you cannot have time stamping in both the MAC and the PHY.
Your card, the 82576, does support MAC time stamping and PHC
functions, at it should work in 3.10 kernel. But even if you combine
it with a PTP capable PHY (like the dp83640), the PHY time stamping
won't work.
Post by George Neville-Neil
Do I need to build a custom kernel for this to work?
To support time stamping in the PHY, your kernel needs to have option
CONFIG_NETWORK_PHY_TIMESTAMPING enabled. Since this adds extra checks
into the hot path, probably no distro kernel will turn it on. So, yes,
you will have to recompile if you want PHY time stamping. (And you
will also need the dp83640 combined with a MAC in the table for which
PHY=Y.)
Thanks for the detailed reply. I think I get it now. BTW You might just cut/paste your
response to me into the Wiki.

Best,
George

Loading...