[Linuxptp-users] Filter for master nodes
Hello, I need to restrict ptp4l slave to accept one specific ptp4l instance as a master, e.g. by MAC address. The reason is security concern. Are there any solutions for such a problem? I thought about disabling BMCA and defining master node manually, but I'm not sure is it possible. Maybe the best way is to check clock id for the node that BMCA has chosen? -- Best regards, Yan Yankovskyi | Junior Software Engineer, Ukraine GlobalLogic M +380.95.049.64.73Skype huandesale www.globallogic.com http://www.globallogic.com/email_disclaimer.txt -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users
Re: [Linuxptp-users] ptp4l doesn't recognize /dev/ptp0
> Just making the device node in the system does not instantiate the > actual device in the kernel. Only the device driver can do that. ptp driver is built into the kernel, if you are talking about it. I can see ptp in /proc/devices as well. But /dev/ptp0 device isn't present after startup. On Tue, Apr 24, 2018 at 5:30 PM, Richard Cochran <richardcoch...@gmail.com> wrote: > On Tue, Apr 24, 2018 at 01:35:29PM +0300, Yan Yankovskyi via > Linuxptp-users wrote: > > I use the following command: > > > > mknod /dev/ptp0 c 252 0 > > > > On ptp4l launch I'm getting the following error: > > > > Failed to open /dev/ptp0: No such device or address > > > > But it is actually present. Do you have any thoughts regarding this > > situation? > > Just making the device node in the system does not instantiate the > actual device in the kernel. Only the device driver can do that. > > HTH, > Richard > -- Best regards, Yan Yankovskyi | Junior Software Engineer, Ukraine GlobalLogic M +380.95.049.64.73 <+380950496473> Skype huandesale www.globallogic.com http://www.globallogic.com/email_disclaimer.txt -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users
[Linuxptp-users] ptp4l doesn't recognize /dev/ptp0
Hello, After manual creation of /dev/ptp0 node, ptp4l doesn't accept this node as a PTP clock. I use the following command: mknod /dev/ptp0 c 252 0 On ptp4l launch I'm getting the following error: Failed to open /dev/ptp0: No such device or address But it is actually present. Do you have any thoughts regarding this situation? -- Best regards, Yan Yankovskyi | Junior Software Engineer, Ukraine GlobalLogic M +380.95.049.64.73 <+380950496473> Skype huandesale www.globallogic.com http://www.globallogic.com/email_disclaimer.txt -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users
[Linuxptp-users] PTP data in kernel space
Hello, I need to get gmTimeBaseIndicator, gmIdentity and clock value. I use the following command: pmc -u -b 0 'GET TIME_STATUS_NP' But I need to receive this data in a kernel module, and sending the data from user to kernel space is inefficient. Is there a way of getting such data in kernel space? -- Best regards, Yan Yankovskyi | Junior Software Engineer, Ukraine GlobalLogic M +380.95.049.64.73 <+380950496473> Skype huandesale www.globallogic.com http://www.globallogic.com/email_disclaimer.txt -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users
Re: [Linuxptp-users] Software clock
I need to use PTP synchronization for synchronizing video stream (something like this). To do it I have to adjust the clock, but using the system clock looks like bad architecture decision. So I decided to ask is it possible to have some separate clock, that will be dedicated only for this purpose. By the way, 802.1AS-2011 standard describes application interfaces (chapter 9), especially ClockTarget. Is it implemented in ptp4l, or it should be implemented using some custom software? On Thu, Mar 22, 2018 at 6:12 PM, Richard Cochran <richardcoch...@gmail.com> wrote: > > On Thu, Mar 22, 2018 at 09:15:31AM +0200, Yan Yankovskyi via > Linuxptp-users wrote: > > In case of use software timestamping we are adjusting system clock. Is it > > possible to create another clock, and use it in ptp4l? I see that in > > clock_create function in case if phc_index < 0 we use CLOCK_REALTIME as > > value for clkid, so I suppose it isn't possible. > > Right. The kernel delivers SW time stamps on CLOCK_REALTIME, and so > the use of CLOCK_REALTIME with SW time stamping is hard coded. > > > But it implies that using > > software timestamping we are limited to only one instance of ptp4l at the > > same time, while using hardware timestamping we can launch as many ptp4l > > instances simultaneously, as many physical devices we have, right? > > Well, using option free_running=1 you can have as many instances as > you like, but I'm not sure why would anyone want to do this. You can > even launch multiple ptp4l programs on the same interface in different > PTP domains, assuming at most one instance has free_running=0. > > What problem are you trying to solve? > > Thanks, > Richard > > -- Best regards, Yan Yankovskyi | Junior Software Engineer, Ukraine GlobalLogic M +380.95.049.64.73 <+380950496473> Skype huandesale www.globallogic.com http://www.globallogic.com/email_disclaimer.txt -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users
[Linuxptp-users] Software clock
Hello, In case of use software timestamping we are adjusting system clock. Is it possible to create another clock, and use it in ptp4l? I see that in clock_create function in case if phc_index < 0 we use CLOCK_REALTIME as value for clkid, so I suppose it isn't possible. But it implies that using software timestamping we are limited to only one instance of ptp4l at the same time, while using hardware timestamping we can launch as many ptp4l instances simultaneously, as many physical devices we have, right? -- Best regards, Yan Yankovskyi | Junior Software Engineer, Ukraine GlobalLogic M +380.95.049.64.73 <+380950496473> Skype huandesale www.globallogic.com http://www.globallogic.com/email_disclaimer.txt -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users
[Linuxptp-users] Increase synchronization frequency
Hello. I try to reduce logSyncInterval below default value 0, and I am keep getting 1 sync message per second. I use the same settings for both master and slave. Increasing of this value works as expected, but decreasing affects only output format (avg and max value / variance of values for each field instead of a single value). I use software timestamping. What am I doing wrong? Thanks. BTW, in set_tmo_log() function there is a conditional expression while (tmo.it_value.tv_nsec >= NS_PER_SEC) In what situation can it be true? -- Best regards, Yan Yankovskyi | Junior Software Engineer, Ukraine GlobalLogic M +380.95.049.64.73 <+380950496473> Skype huandesale www.globallogic.com http://www.globallogic.com/email_disclaimer.txt -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users
Re: [Linuxptp-users] Bad message error
> The topic was running PTP over a VLAN > interface. This is now fully supported by the Linux kernel. Even in kernel version 4.15.2 in file net/8021q/vlan_dev.c function vlan_ethtool_get_ts_info contains the following code: info->so_timestamping = SOF_TIMESTAMPING_RX_SOFTWARE | SOF_TIMESTAMPING_SOFTWARE; And it seems that absence of SOF_TIMESTAMPING_TX_SOFTWARE flag in this place is leading to fail in ethtool check. Is adding the flag in this function is all I need to do to implement this functionality? It seems like it isn't, but I'm not sure. Don't you know any manual I could refer? Also, as a network driver I am using a custom EoP driver. Do you have any ideas about on which stage something can go wrong? I guess that the problem may be caused by this driver. On Wed, Feb 7, 2018 at 5:52 PM, Richard Cochranwrote: > On Wed, Feb 07, 2018 at 12:39:12PM +0200, Yan Yankovskyi wrote: > > On Tue, Feb 6, 2018 at 7:49 PM, Richard Cochran < > richardcoch...@gmail.com> > > wrote: > > > By "board running Linux" you mean a custom embedded design, don't you? > > > > Exactly. Connection is established using the BroadR-Reach <-> Ethernet > > converter, if it matters. > > IOW, you are using your own unpublished custom driver. Sorry, can't > help you with that. > > If there is an issue with TLV handling, please reproduce it using > standard drivers and unaltered linuxptp sources. Then, post the > details of the configuration. > > > >> ethtool reports that the board doesn't support > > SOF_TIMESTAMPING_TX_SOFTWARE, > > > > > Then you are out of luck. > > > > Is it crucial? Am I able to add support of this timestamp mode by myself? > > I hope so. > > Thanks, > Richard > -- Best regards, Yan Yankovskyi | Junior Software Engineer, Ukraine GlobalLogic M +380.95.049.64.73 <+380950496473> Skype huandesale www.globallogic.com http://www.globallogic.com/email_disclaimer.txt -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users
Re: [Linuxptp-users] Bad message error
I also checked the values for the working case, where the host behaves as a slave, and I found out that: 1) *ptr value is always set to 0x; 2) len (cnt - pdulen) is either 0 or 2, i.e. it is always less then sizeof(struct TLV). On Wed, Feb 7, 2018 at 12:39 PM, Yan Yankovskyi < yan.yankovs...@globallogic.com> wrote: > On Tue, Feb 6, 2018 at 7:49 PM, Richard Cochran> wrote: > > By "board running Linux" you mean a custom embedded design, don't you? > > Exactly. Connection is established using the BroadR-Reach <-> Ethernet > converter, if it matters. > > >> ethtool reports that the board doesn't support > SOF_TIMESTAMPING_TX_SOFTWARE, > > > Then you are out of luck. > > Is it crucial? Am I able to add support of this timestamp mode by myself? > > > Looks like the endianness of the value is wrong. > > You mean endianess of *ptr variable value? Because if I have for example > 0x68e3 or 0xe368 values for tlv->length field, it doesn't change much. > I have a raw value of *ptr equal to 0x68e3, doesn't it seem like a > correct value? It implies that tlv->type equals 0. > > Thanks. > > -- > Best regards, > > Yan Yankovskyi | Junior Software Engineer, Ukraine > GlobalLogic > M +380.95.049.64.73 <+380950496473> Skype huandesale > > www.globallogic.com > > http://www.globallogic.com/email_disclaimer.txt > -- Best regards, Yan Yankovskyi | Junior Software Engineer, Ukraine GlobalLogic M +380.95.049.64.73 <+380950496473> Skype huandesale www.globallogic.com http://www.globallogic.com/email_disclaimer.txt -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users
Re: [Linuxptp-users] Bad message error
On Tue, Feb 6, 2018 at 7:49 PM, Richard Cochranwrote: > By "board running Linux" you mean a custom embedded design, don't you? Exactly. Connection is established using the BroadR-Reach <-> Ethernet converter, if it matters. >> ethtool reports that the board doesn't support SOF_TIMESTAMPING_TX_SOFTWARE, > Then you are out of luck. Is it crucial? Am I able to add support of this timestamp mode by myself? > Looks like the endianness of the value is wrong. You mean endianess of *ptr variable value? Because if I have for example 0x68e3 or 0xe368 values for tlv->length field, it doesn't change much. I have a raw value of *ptr equal to 0x68e3, doesn't it seem like a correct value? It implies that tlv->type equals 0. Thanks. -- Best regards, Yan Yankovskyi | Junior Software Engineer, Ukraine GlobalLogic M +380.95.049.64.73 <+380950496473> Skype huandesale www.globallogic.com http://www.globallogic.com/email_disclaimer.txt -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users
[Linuxptp-users] Bad message error
Hello, I have a configuration with a PC running Ubuntu and a board running Linux. ethtool reports that the board doesn't support SOF_TIMESTAMPING_TX_SOFTWARE, and I disabled ethtool check as mentioned in this post http://linuxptp-users.narkive.com/Q6DUVkta/using-ptp4l-on-vlan-interfaces#post7 . Now if the board behaves as a master, I see correct log on the PC. But when I try use slave-only mode on the board, it says "port 1: bad message" all the time. I found out that error detects in the "suffix_post_recv" function ("msg.c" file). len variable is always equal to 6, but tlv->length variable is taking for example the following values: 210, 20250, 50666, 18066, and so on. Such values lead to failing either on (tlv->length % 2) or on (tlv->length > len) check, and I'm gerring -EBADMSG error. I would be thankful if anyone could explain what do such values mean and what can be the cause. Please correct if I'm using wrong mailing list. -- Best regards, Yan Yankovskyi | Junior Software Engineer, Ukraine GlobalLogic M +380.95.049.64.73 <+380950496473> Skype huandesale www.globallogic.com http://www.globallogic.com/email_disclaimer.txt -- Check out the vibrant tech community on one of the world's most engaging tech sites, Slashdot.org! http://sdm.link/slashdot___ Linuxptp-users mailing list Linuxptp-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxptp-users