Re: [Linuxptp-users] Bad message error

2018-02-08 Thread Yan Yankovskyi via Linuxptp-users
> 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 Cochran 
wrote:

> 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

2018-02-07 Thread Richard Cochran
On Wed, Feb 07, 2018 at 12:39:12PM +0200, Yan Yankovskyi 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.

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

--
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

2018-02-07 Thread Yan Yankovskyi via Linuxptp-users
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

2018-02-07 Thread Yan Yankovskyi via Linuxptp-users
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
--
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

2018-02-06 Thread Richard Cochran
On Tue, Feb 06, 2018 at 06:20:59PM +0200, Yan Yankovskyi via Linuxptp-users 
wrote:
> I have a configuration with a PC running Ubuntu and a board running Linux.

By "board running Linux" you mean a custom embedded design, don't you?
Or what do you mean?

> ethtool reports that the board doesn't support SOF_TIMESTAMPING_TX_SOFTWARE,

Then you are out of luck.

> and I disabled ethtool check as mentioned in this post
> http://linuxptp-users.narkive.com/Q6DUVkta/using-ptp4l-on-vlan-interfaces#post7

That thread is out of date.  The topic was running PTP over a VLAN
interface.  This is now fully supported by the Linux kernel.

> . 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.

Looks like the endianness of the value is wrong.

HTH,
Richard




--
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