lib_tsn, MSRP

If you have a simple question and just want an answer.
Post Reply
User avatar
Sebastian
Active Member
Posts: 39
Joined: Wed Jul 20, 2016 9:15 am

lib_tsn, MSRP

Post by Sebastian »

Hello every one,

I found a strange behaviour in the MSRP attribute registration.
Maybe someone else could reproduce it.
The MSRP protocol is a hard "nut" to understand,
so every comment is welcome. :)

My Hardware:
->AVDECC Controller (Riedel AVB Manager, HIVE)
->Swtich (Luminex GigaCore10)
->xCORE-200 multichannel audio platform
->RME Digiface

RME Digiface is configured as talker with 8 Streams.
xCore-200 as Listener.


To have a look at the MRSP attribute list, I used the function mrp_debug_dump_attr() in avb_mrp.c

When I change the Talker stream, the listener attributes never get cleared from the attrs[] list.

After six (6) times switching the talker stream the attrs[] list reaches MRP_MAX_ATTRS and no more changes are possible.


It makes no differece if I use other Talker HW or Bridge HW.
Also tested with

-> 8 x XMOS Talker (custom board)
-> MacOS High Sierra with 8 Talker streams
-> Extreme Networks, Motu, Presonus Switch


thanks in advance,
Sebastian


User avatar
akp
XCore Expert
Posts: 578
Joined: Thu Nov 26, 2015 11:47 pm

Post by akp »

Sorry, I work with talker, not listener, so I am not sure I can help. However, I did have some similar problem in mrp_update_state() and made the following change, something along these lines might help...
change

Code: Select all

    case MRP_EVENT_REDECLARE:
      switch (st->applicant_state)
        {
        case MRP_VO:
        case MRP_AO:
        case MRP_QO:
#ifdef MRP_FULL_PARTICIPANT
          mrp_change_applicant_state(st, e, MRP_LO);
#else
          mrp_change_applicant_state(st, e, MRP_VO);
#endif
          break;
        case MRP_AN:
          mrp_change_applicant_state(st, e, MRP_VN);
          break;
        case MRP_AA:
        case MRP_QA:
        case MRP_AP:
        case MRP_QP:
          mrp_change_applicant_state(st, e, MRP_VP);
          break;
        }
      break;
to

Code: Select all

    case MRP_EVENT_REDECLARE:
      switch (st->applicant_state)
        {
        case MRP_VO:
        case MRP_AO:
        case MRP_QO:
#ifdef MRP_FULL_PARTICIPANT
          mrp_change_applicant_state(st, e, MRP_LO);
          // Fix listener attr not getting freed
          if (st->registrar_state == MRP_MT)
          {
            mrp_change_applicant_state(st, e, MRP_UNUSED);
          }
#else
          mrp_change_applicant_state(st, e, MRP_VO);
#endif
          break;
        case MRP_AN:
          mrp_change_applicant_state(st, e, MRP_VN);
          break;
        case MRP_AA:
        case MRP_QA:
        case MRP_AP:
        case MRP_QP:
          mrp_change_applicant_state(st, e, MRP_VP);
          break;
        }
      break;
User avatar
Sebastian
Active Member
Posts: 39
Joined: Wed Jul 20, 2016 9:15 am

Post by Sebastian »

Wow thank you,
I've already given up on someone answering.

I will test it the next days and will post the results.
User avatar
akp
XCore Expert
Posts: 578
Joined: Thu Nov 26, 2015 11:47 pm

Post by akp »

Any joy?
User avatar
Sebastian
Active Member
Posts: 39
Joined: Wed Jul 20, 2016 9:15 am

Post by Sebastian »

Hi akp,

sorry for the late answer, but I was pretty deep into other project. And of cource Christmas and all the stuff :)

I tested your patch, and yes the attrs[] list is cleared for Listener and Talker.
==> Thank you, that was really helpfull.

However, sometimes I still can't get a connection. Here I do not know whether it is because of the switches or the Xmos devices.
We use allmost Presonus SW5E Switches.
(Marvel Chipset like the Motu Switch, but different Firmware)

At the moment I have to finish a other project, but I want to dive deeper to the msrp protocol by end of january.

thanks,
Sebastian
User avatar
akp
XCore Expert
Posts: 578
Joined: Thu Nov 26, 2015 11:47 pm

Post by akp »

Super, that's great it's fixed. It would be nice if XMOS incorporated all the fixes since the last release but I don't know if they will. Perhaps there are better ways to implement some of the changes.

We don't use the Presonus switch, just MOTU and an Extreme Networks switch. Good luck. I assume you are getting PTP sync OK? That's the first thing I look for.
Post Reply