Thank you gentleman for some interesting thoughts and considerations. I apologise for late response, as I’ve been busy implementing and trying different approaches regarding 1-step TC.
One thing is made quite obvious: different HW - different approach to 1-step implementation. Lack of elegant generic solution makes a great deal of headache when it comes to making things work in SW. As a matter of fact, there are HWs out there that take more or less correct approach in implementing 1-step, and, I believe we (me and my colleague) happen to have one. Thus we have a privilege to actually implement a generic solution, with respect to existing code, so that all parties remain happy. Since in 1-step mode HW is supposed to do most of the work, SW is left with smaller portion of workload. With this in mind, we came to conclusion, that not much is needed to make at least 1-step E2E TC work. Having studied linuxptp codebase, we added a few lines of code here and there, in majority of cases simply because we needed to skip some steps SW was trying to do (due to it’s 2-step inclination). Shortly after, we were blasted with some amazing results: 1-step E2E TC was working, and also not interfering with existing 2-step functionality. We could stop there, but ….. after a cup of coffee, we went on trying to make 1-step P2P TC work. This chunk seemed much trickier, and, at times, too bewildering. But as it turned out, it was only a shadow of little creature. Having added a few more lines (if I remember correctly - 5 lines), we were once again left speechless, staring at shrinking master offset values, until they came down to acceptable level, close to zero. My apologies for tons of text and little technicalities, but the purpose of this message was to tell you what we’ve done with our problem, without submerging into the depths of code. I will prepare and send patches separately, for further discussion of the problem within linuxptp-community. I totally agree that linuxptp should not be a collection of HW specific hacks, while at the same time providing flexibility. On a final note, I believe that linuxptp is a great 1-stop-shop for running a complete PTP solution; and the state of completeness is not beyond the horizon. Thanks again and have a great weekend. /Volodymyr > On 25 Nov 2020, at 21:10, Richard Cochran <richardcoch...@gmail.com> wrote: > > On Wed, Nov 25, 2020 at 09:19:51PM +0200, Vladimir Oltean wrote: > >> The spectrum of options is indeed large. Is there something in >> particular that you would prefer to see? > > I think that > > - linuxptp should support the Linux kernel's APIs. > > - It should NOT become a collection of HW specific hacks! > > - The kernel should hide the HW differences in a reasonable way. > > - We can expand the API/ioctls to support new hardware features, but > again the API ought to support multiple devices, not just the > latest random HW design. > > - HW designers should think their designs through before they > inflict us with their new stuff. It never hurts to ask SW people > beforehand what will work. Hey, we'll even answer questions on > this list, for free! > > > WRT the question of the TC implementation, 2-step is the only mode > that is sure to work with all HW today. > > > Thanks, > Richard
_______________________________________________ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users