Thread: [Linuxptp-devel] Clarification of PHC and PHY on the supported lists?
PTP IEEE 1588 stack for Linux
Brought to you by:
rcochran
From: George Neville-N. <gn...@ne...> - 2013-12-02 20:37:35
|
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 |
From: Keller, J. E <jac...@in...> - 2013-12-02 21:24:04
|
On Mon, 2013-12-02 at 15:37 -0500, George Neville-Neil wrote: > 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, Jake |
From: Richard C. <ric...@gm...> - 2013-12-02 21:53:43
|
On Mon, Dec 02, 2013 at 09:23:57PM +0000, Keller, Jacob E wrote: > > 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. > Richard do you know more about how PHY level timestamping works? I wrote a bit more in my other mail. Thanks, Richard |
From: Richard C. <ric...@gm...> - 2013-12-02 21:47:13
|
On Mon, Dec 02, 2013 at 03:37:28PM -0500, George Neville-Neil wrote: > 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. > 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 |
From: George Neville-N. <gn...@ne...> - 2013-12-02 22:15:15
|
On Dec 2, 2013, at 16:46 , Richard Cochran <ric...@gm...> wrote: > On Mon, Dec 02, 2013 at 03:37:28PM -0500, George Neville-Neil wrote: >> 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. > >> 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 |