DSP4U AVB_DG PTP Problems

Technical discussions related to any XMOS development kit or reference design. Eg XK-1A, sliceKIT, etc.
voodoosound
Active Member
Posts: 63
Joined: Sat Oct 15, 2011 8:53 pm

DSP4U AVB_DG PTP Problems

Post by voodoosound »

Hi *,

I use XDE 13.0.1 on Linux Mint 17 64Bit for this project.

When I launch the DSP4U AVB_DG board, it starts gPTP and MRP, according to my Switch.
But after gPTP received an Announce Message, it changes its role to slave (as expected).
Then it changes back to master (unexpected). Now the switch says that this port is not AS capable and I have PDelay Rx Timeouts. PTP keeps on sending messages, which makes me suggest, that something in the gPTP implementation is broken.

I compared the PTP messages with the Atterotech dev board.
But I could not find any difference.
Debugging with printf() did not help eather.

Are there #defines I did not see?
Does anyone have a clou, why gPTP misbehaves?

Best,
Ck


User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am

Post by infiniteimprobability »

Hi,
can I ask which switch you are using? Only the extreme switches are AVnu certified at the moment so would give us the highest confidence on the switch side..

Also, which version of the XMOS reference design software are you using? Version 6.0.4 of sw_avb is the version that passed AVnu compliance, although there shouldn't in theory be issues with the latest (6.1.1).

Technically it was the Atterotech board that passed compliance, but the DSP4U is just a board support package of the same firmware, which explains why you get similar results.
PDelay Rx Timeouts. PTP keeps on sending messages, which makes me suggest, that something in the gPTP implementation is broken.
Can you clarify which side of PTP keeps sending which messages?

Regarding gPTP implementation broken - possibly but given the recent AVnu compliance pass for the XMOS endpoint I'd not rule out an issue on the switch side if it's non-compilant.

Do you have a trace (a wireshark trace from a tap maybe) that may help? If not... see below
Debugging with printf() did not help eather.
Do you mean the console when running with xSCOPE?

Perhaps you could enable as follows (gptp.xc):
#define DEBUG_PRINT 1
#define DEBUG_PRINT_ANNOUNCE 0
#define DEBUG_PRINT_AS_CAPABLE 1

... and post the result? Going to need a bit more info to help here..
voodoosound
Active Member
Posts: 63
Joined: Sat Oct 15, 2011 8:53 pm

Post by voodoosound »

Hi,

I tried a Lab X Titanium at first, but on the Extreme Networkx x440t it was the same result.
I did not save the traces.

I am using the sw_avb 5.2.1. and certification is at the moment not relevant.
It is working in other Projects, so I sticked to it.

I do not expect gPTP to be broken. I ment that I miss or mess up some #define that causes gPTP to stop working. Something that differs between the Atterotech and DSP4U boards, that is important to be aware of. Like the audio stuff running on another tile.

It seems to be something below the role decision goes wrong.

stdout sais:

Code: Select all

PTP Role: Master
PTP Role: Slave
PTP Role: Master
The switch shows it for an instance as "master" port and then the AVB_DG switches back from Slave to Master role and the switch port switches to "not AS capable".
Sometimes the AVDECC controller manages to read some descriptors before it stops.
User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am

Post by infiniteimprobability »

I think this could be due to an updated gPTP spec (IEEE Std 802.1ASTM-2011/Cor 1-2013). Version 5.2.1 isn't AVnu compliant and doesn't handle ASCAPABLE. There's a gPTP spec corrigendum which includes compensation for PHY delay and an upper limit of 800ns wire delay as part of the pdelay value. So 5.2.1 likely isn't subtracting the PHY delay and so reports a large delay, above neighborPropDelayThresh for the switch.

This means the switch is not able to mark the endpoint ASCAPABLE and so the endpoint will drop back to being master (default state).

I understand that earlier versions of the extreme switch firmware allowed a greater pdelay and may work, but later, compliant versions meet the new spec.
Sometimes the AVDECC controller manages to read some descriptors before it stops.
Not sure why this is - gPTP and AVDECC are completely independent. Maybe again a compatibility issue with the old, non-compliant endpoint firmware.
User avatar
infiniteimprobability
XCore Legend
Posts: 1126
Joined: Thu May 27, 2010 10:08 am

Post by infiniteimprobability »

It's an oldish thread now, but I thought i'd add this link.

http://extrcdn.extremenetworks.com/wp-c ... itches.pdf

It's a very handy guide for extreme switch users. It shows commands for setting gPTP delay thresholds and debugging AScapable (AVB capable) on the switch ports. i.e.

To see gptp info for port 1:
# show network-clock gptp ports 1

To set the pdelay neighbour threshold of port 1 to 9999 nanoseconds:
# configure network-clock gptp ports 1 peer-delay neighbor-thresh 9999 nanoseconds