Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gPTP not functioning expectedly with an AVB switch ! #168

Closed
SumeetPJain opened this issue Dec 29, 2014 · 6 comments
Closed

gPTP not functioning expectedly with an AVB switch ! #168

SumeetPJain opened this issue Dec 29, 2014 · 6 comments

Comments

@SumeetPJain
Copy link

This is my observation:-

  1. The previous open-avb-master package (having only software synchronization) is working fine with an AVB switch.
  2. The latest open-avb-master package (having hardware synchronization using linux ptp subsystem) isn't working fine for me with the same AVB switch. Following is the error log:-

ERROR at 788 in ../../common/ptp_message.cpp: PTP assist flag is not set, discarding invalid sync
ERROR at 899 in ../../common/ptp_message.cpp: Received Follow Up but there is no sync message

I keep getting these errors. One difference I noticed between the latest and previous version of open-avb-master
is:-
(in file:- /common/ptp_message.cpp)
In latest package:- if( flags[PTP_ASSIST_BYTE] & (0x1<<PTP_ASSIST_BIT)) {.....}
In previous version:- if(true) {.....}

If I replace "if( flags[PTP_ASSIST_BYTE] & (0x1<<PTP_ASSIST_BIT))" with "if(true)", then the above errors doesn't pop up but both the machines get into gptp slave mode. Can anyone shed light on this ?

Can you please elaborate on the importance of this new modification and provide a solution for the errors I am facing using the latest open-avb-master package with an AVB switch.

PS:- My AVB switch is not AVNU certified switch.

Regards and Thanks,
Sumeet Jain

@christopher-s-hall
Copy link
Contributor

Responding to #1

Is the switch acting as master? If so, the switch isn’t behaving correctly. See table 11-4 of the 801.AS standard document for the correct setting of the flags field. Incidentally, I just tested the current OpenAVB code against an Extreme switch (in the master role) and the behavior is correct. No workaround is needed.

Chris

From: engineerdrmz [mailto:[email protected]]
Sent: Monday, December 29, 2014 1:57 AM
To: AVnu/Open-AVB
Subject: Re: [Open-AVB] gPTP not functioning expectedly with an AVB switch ! (#168)

Other observations:-

  1. If I replace "if( flags[PTP_ASSIST_BYTE] & (0x1<<PTP_ASSIST_BIT))" with "if(true)", then the package works fine.
  2. After applying the above change, I used wireshark to analyse the IPG. It remains ~125 usec for a bunch of packets and then suddenly a burst of ptp packets pops up and the if I calculate the IPG of last AVB packet before burst and first AVB packet after burst it comes out to be ~500 usec.
    Is this the expected behaviour or the switch has any role to play in it ?

Thanks and Regards,
Sumeet Jain


Reply to this email directly or view it on GitHubhttps://github.com//issues/168#issuecomment-68244726.

@SumeetPJain
Copy link
Author

Hi Chris,

  1. What do you mean when you say "switch is acting as a master (Is switch sending the sync packets to both the systems (talker and listener) connected to it and as a result of which both of them are behaving as slave ? )". I saw the wireshark logs and found that both the systems are receiving the sync packets from the switch so may be that is the issue.
  2. If possible, can you run the talker/listener with NIC's at 100 Mbps (without any switch) and see the IPG . For me it comes around ~1.2 msec (wireshark). But if you play around with PKT_SZ macro and define it at the value of 1400, then we get the expected IPG. I don't know what the real issue is but with 100 Mbps everything should work fine but it isn't happening. The Qav shaper value also looks to be fine. If you can experiment this and confirm my observation.

-Sumeet

@christopher-s-hall
Copy link
Contributor

Your switch is in the master role since it is sending sync messages to both connected devices. Also, look at the wireshark sync frame dissection. I’m guessing that in flags PTP_TWO_STEP is not set. It should be for 802.1AS.

From: Sumeet [mailto:[email protected]]
Sent: Tuesday, January 06, 2015 5:46 AM
To: AVnu/Open-AVB
Cc: Hall, Christopher S
Subject: Re: [Open-AVB] gPTP not functioning expectedly with an AVB switch ! (#168)

Hi Chris,

  1. What do you mean when you say "switch is acting as a master (Is switch sending the sync packets to both the systems (talker and listener) connected to it and as a result of which both of them are behaving as slave ? )". I saw the wireshark logs and found that both the systems are receiving the sync packets from the switch so may be that is the issue.
  2. If possible, can you run the talker/listener with NIC's at 100 Mbps (without any switch) and see the IPG . For me it comes around ~1.2 msec (wireshark). But if you play around with PKT_SZ macro and define it at the value of 1400, then we get the expected IPG. I don't know what the real issue is but with 100 Mbps everything should work fine but it isn't happening. The Qav shaper value also looks to be fine. If you can experiment this and confirm my observation.

-Sumeet


Reply to this email directly or view it on GitHubhttps://github.com//issues/168#issuecomment-68866491.

@SumeetPJain
Copy link
Author

That is true. PTP_TWO_STEP isn't set. And any comments for (2) ?

@andrew-elder
Copy link

Has this issue been resolved?

@SumeetPJain
Copy link
Author

Yes @andrew-elder

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants