Giter Site home page Giter Site logo

Query for using Open AVB Stack about openavnu HOT 29 CLOSED

avnu avatar avnu commented on July 19, 2024
Query for using Open AVB Stack

from openavnu.

Comments (29)

andrew-elder avatar andrew-elder commented on July 19, 2024

Keyuh,

Welcome to the fun world of AVB debugging!

How are you measuring the packet delay?

I don't know how "mature" the AVB stack running on the dsp4you switch is. I
don't have one of those switches. You should ping them and ask them. I
would recommend you get a couple of XMOS endpoints to add to your test
setup. They are available here:
http://www.digikey.com/product-detail/en/XK-AVB-LC-SYS/880-1033-ND/2472196?cur=USD
They give you a good reference point and allow you to work on the talker
and listener i210 code independently.

Good luck,
Andrew

On 8/9/2013 7:29 AM, Keyur wrote:

Dear Sir,

We are using Intel I210 ethernet AVB cards to test Talker Listener
functionality. We download Open AVB stack and running Simple listener and
simple talker on Inter I210 cards. Now when we start transmitting Audio
stream from talker we measure time at listener side for receiving each
audio packets. It takes around 125 us to reach each packet at listener
side. But some time we found it taker more than 1ms time to reach to
listener, even in one talker and one listener scenario.

After that we use AVB-SW from dsp4you company. When we insert switch
between talker-listener than it creates more problem. Listener getting
data at around 900us. So we are getting delay of 900us between each packets.

Below I have provided link for AVB switch.
http://www.dsp4you.com/products/avb-oem-series/avb-sw

So, I want to know that, do we need to change gptp daemon or MRPD daemon
to use it with AVB-SW or I can use it straight forward with switch?

Let me know your inputs.

Thanks & Regards,
Keyur Parekh.


Reply to this email directly or view it on GitHub
#14.

Andrew Elder
AudioScience, Inc.
+1-585-271-8870
www.audioscience.com

from openavnu.

keyurparekh1 avatar keyurparekh1 commented on July 19, 2024

Hello Andrew,

I am really glad to get reply from you. I will give you brief about our set up. So that you can understand our issue and can help us in our problem.

We have bought two Intel I210 cards. Those cards are connected with two different computers using PCI interface. Now I am running simple talker on machine and simple listener on other machine. Talker machine works as master using gptp daemon and listener machine works as slave.

Now I am measuring time at listener side. I am using linux API gettimeoftheday inside pcap call back function. Whenever we have packet to receive application will jump to PCAP callback function and we are printing time using above API. So without dsp4you switch we can print time and its give 125us between each packets.

But when ever we connect switch it gives us around 900 to 1000us delay between each packets. So our confusion is, is gptp daemon smart enough to handle switches between talker or listener? Or do we need to modify it to use daemons with AVB switches.

Also In gptp daemon read me its mention that it will create problem with switches, so is it about avb switches or normal switches? We also got reply from dsp4you that, their switches work on 100MB speed. So is there any setting to do in AVB stack to work Intel card on same speed?

Thanks in advance for your great support.

Regards,
Keyur parekh

from openavnu.

intel-ethernet avatar intel-ethernet commented on July 19, 2024

But when ever we connect switch it gives us around 900 to 1000us delay between each packets.

EKM: IMO that seems like a lot of forwarding latency. You may want to ensure the stream is properly advertised and the listener is properly generating the listener response to the switch to setup the AVB stream reservation. I have not used this particular brand of switch so I don’t know what is possible to determine (does it have a web-based UI?).

So our confusion is, is gptp daemon smart enough to handle switches between talker or listener? Or do we need to modify it to use daemons with AVB switches.

EKM: IMO gptp should “just work” assuming the switch also participates in 802.1AS. The problem is if (non-AVB) switches just forward 802.1AS multicast frames to all ports (which is the default behavior for most unmanaged switches) .. then things get weird (weird as in ‘broken’).

Also In gptp daemon read me its mention that it will create problem with switches, so is it about avb switches or normal switches? We also got reply from dsp4you that, their switches work on 100MB speed. So is there any setting to do in AVB stack to work Intel card on same speed?

EKM: The speed shouldn’t matter overall. You can always force a link speed if that helps (?) using ethtool.

ekm

from openavnu.

keyurparekh1 avatar keyurparekh1 commented on July 19, 2024

Hello,

I am attaching wireshark log here. We have try to capture packets in three different scenario.

  1. We connected talker-listener without switch
  2. We connected talker-listener with switch
  3. We connected talker-listener with switch And disabled Qav sharper.(by passing 0 to the igb_set_class_bandwidth function in simple_talker.c)

What we found is, with Qav sharper disabled the packets are arriving much faster !!!...

If you have any clue from  this info please let us know.

I am not able to attach log here. Can I have your mail Id? So that I can send you logs.....

from openavnu.

andrew-elder avatar andrew-elder commented on July 19, 2024

Assuming your switch is an AVB switch, you also need to reserve AVB
bandwidth in the switch using MSRP. Are you doing that?

With the switch in the middle, the talker and the switch traffic shaper
come in to play.

On 8/12/2013 3:00 AM, Keyur wrote:

Hello,

I am attaching wireshark log here. We have try to capture packets in
three different scenario.

  1. We connected talker-listener without switch
  2. We connected talker-listener with switch
  3. We connected talker-listener with switch And disabled Qav sharper.(by
    passing 0 to the igb_set_class_bandwidth function in simple_talker.c)

What we found is, with Qav sharper disabled the packets are arriving much
faster !!!...

|If you have any clue from this info please let us know.
|

I am not able to attach log here. Can I have your mail Id? So that I can
send you logs.....


Reply to this email directly or view it on GitHub
#14 (comment).

Andrew Elder
AudioScience, Inc.
+1-585-271-8870
www.audioscience.com

from openavnu.

keyurparekh1 avatar keyurparekh1 commented on July 19, 2024

Yes Switch is AVB switch from dsp4you company. We are running gptp daemon and mrpd daemon from Open AVB on both talker and listener side.

to run gptp daemon we use :- ./daemon_pl (interface name)
to run mrpd daemon we use :- ./mrpd -lps -i (interface name)

I have one important question. Whenever we disable Qav shapper in AVB stack, means we pass 0 into igb_set_class_bandwidth, than we can receive data at listener side. But when we enable Qav shapper at talker side, than it creates problem to receive data at listener side.

from openavnu.

intel-ethernet avatar intel-ethernet commented on July 19, 2024

Not knowing what parameters are you passing in when you enable the Qav shaper, I can’t tell what rate you are programming. Theoretically, if your supplied tx times @ given packet size are <= the allocated bandwidth, the traffic shaper should never activate.

ekm

From: Keyur [mailto:[email protected]]
Sent: Monday, August 12, 2013 5:20 AM
To: intel-ethernet/Open-AVB
Cc: Mann, Eric
Subject: Re: [Open-AVB] Query for using Open AVB Stack (#14)

Yes Switch is AVB switch from dsp4you company. We are running gptp daemon and mrpd daemon from Open AVB on both talker and listener side.

to run gptp daemon we use :- ./daemon_pl (interface name)
to run mrpd daemon we use :- ./mrpd -lps -i (interface name)

I have one important question. Whenever we disable Qav shapper in AVB stack, means we pass 0 into igb_set_class_bandwidth, than we can receive data at listener side. But when we enable Qav shapper at talker side, than it creates problem to receive data at listener side.


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

from openavnu.

keyurparekh1 avatar keyurparekh1 commented on July 19, 2024

Yes you are correct. I am doing same thing as you mention to disable Qav shaper. But if I disable it, than my talker listener works with AVB switch.

If I am not disabling Qav shapper, than I am not able to receive 1722 packets at listener side properly. So that I am not able to play audio.

from openavnu.

intel-ethernet avatar intel-ethernet commented on July 19, 2024

Can you copy/paste the bit of code you are using to initialize the Qav shaper? Parameter values, etc?

from openavnu.

keyurparekh1 avatar keyurparekh1 commented on July 19, 2024

Hello,

Is anybody use AVB switch with Open AVB stack??
Below is some brief about my set up to test Intel card.

With switch :-

  1. Connect Intel I210 cards with two different PC.
  2. Running gptp and mrpd daemon on both machines. So one machine become master and other become slave.
  3. Connect switch between two intel cards.
  4. Running talker application on machine and listener application on other machine. By doing that, I am getting each 1722 packet at listener side after 900us approx.
  5. And I also observed that switch is also transmitting gptp packets to both cards.

So can anybody suggest that when we connect AVB switch than do we need to run mrpd and gptp daemon on both talker and listener side?

from openavnu.

keyurparekh1 avatar keyurparekh1 commented on July 19, 2024

Hello,
I have copied simple talker code for your reference. Below is API to select Qav shapper.

Standard API:-
igb_set_class_bandwidth(&igb_dev, PACKET_IPG / 125000, 0, PKT_SZ - 22,
0);

Change API :-
igb_set_class_bandwidth(&igb_dev, 0, 0, PKT_SZ - 22,
0);
by passing zero in above API in second parameter, we are disabling Qav shapper.

from openavnu.

jdkoftinoff avatar jdkoftinoff commented on July 19, 2024

When you say you are receiving each 1722 packet after approx 900 µs or 1000 µs, perhaps you mean that you are losing 6 out of every 7, or 7 out of every 8 frames?

Please look at the sequence_num field of your received packet and tell us if the value is increasing by 1 on transmit and receive or is it increasing by more than one on receive.

Jeff

On 2013-08-16, at 1:06 AM, Keyur [email protected] wrote:

Hello,
I have copied simple talker code for your reference. Below is API to select Qav shapper.

Standard API:-
igb_set_class_bandwidth(&igb_dev, PACKET_IPG / 125000, 0, PKT_SZ - 22,
0);

Change API :-
igb_set_class_bandwidth(&igb_dev, 0, 0, PKT_SZ - 22,
0);
by passing zero in above API in second parameter, we are disabling Qav shapper.


Reply to this email directly or view it on GitHub.

from openavnu.

keyurparekh1 avatar keyurparekh1 commented on July 19, 2024

Hello Jeff,

I check into wireshark, I am not missing any packets. Sequence number is correct. and it is increasing by 1.

from openavnu.

jdkoftinoff avatar jdkoftinoff commented on July 19, 2024

Are you saying that if you send 1722 packets for 10 seconds you still receive all 80,000 packets at the listener after 70 or 80 seconds? Then this means your talker is not sending at the appropriate rate, as the switch will not buffer them that long.

from openavnu.

keyurparekh1 avatar keyurparekh1 commented on July 19, 2024

Yes you are correct. As gap between two packet is approx 900us, than in 10 seconds i will receive around 10000 packets. So if you saying talker is not sending packets at proper rate, than can you tell me how change it?

As I have used simple talker from github only. I didn't make single change into it.

from openavnu.

andrew-elder avatar andrew-elder commented on July 19, 2024

So, if you put a wiretap between the talker and the switch, you can see in the capture that the packets are not launched in time?


From: "Keyur" [email protected]
Sent: Friday, August 16, 2013 8:00 AM
To: "intel-ethernet/Open-AVB" [email protected]
Cc: "andrew-elder" [email protected]
Subject: Re: [Open-AVB] Query for using Open AVB Stack (#14)

Yes you are correct. As gap between two packet is approx 900us, than in 10 seconds i will receive around 10000 packets. So if you saying talker is not sending packets at proper rate, than can you tell me how change it?

As I have used simple talker from github only. I didn't make single change into it.

Reply to this email directly or view it on GitHub.

from openavnu.

keyurparekh1 avatar keyurparekh1 commented on July 19, 2024

We already measure time at talker side. It also gives same time to launch packets. 900us.

from openavnu.

intel-ethernet avatar intel-ethernet commented on July 19, 2024

I don’t have this brand of switch, so at present I can’t directly reproduce the issue you are seeing on your end.

Total speculation but … a few suggestions based on things which have affected others in the past:

a) If you are using TIMED transmission (either with or without the Qav shaper active) if for whatever reason the timed transmissions become ‘too late’ (more than 500 msec), then you will see stalls of ~500 msec as the launch timer is a rolling 1 second (in 32-nsec precision) counter. So ‘old’ packets look like packets ‘in the future’ due to aliasing.

b) You can also try the alternative – don’t use timed transmission and ONLY use the Qav shaper … which one user said ‘fixed’ his problem of high-bandwidth streaming.

I don’t know if it is an interaction in software between periodically slightly ‘late’ packets being transmitted in bursts (e.g. the I210 will transmit slightly late timed packets – up to 500 msec – immediately), the traffic shaper back pressuring the bursts of late transmits, the software runs out of transmit descriptors, then sw submits a burst of late packets …. It may also be system specific (CPU speed, other processes).

I’ll continue to look at the traffic shaper configuration settings to see if I can find anything unusual in the transmit behavior.

ekm

From: Keyur [mailto:[email protected]]
Sent: Friday, August 16, 2013 6:12 AM
To: intel-ethernet/Open-AVB
Cc: Mann, Eric
Subject: Re: [Open-AVB] Query for using Open AVB Stack (#14)

We already measure time at talker side. It also gives same time to launch packets. 900us.


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

from openavnu.

keyurparekh1 avatar keyurparekh1 commented on July 19, 2024

Hello,

Can you guide me, how can I remove timed transmission from talker code?

from openavnu.

intel-ethernet avatar intel-ethernet commented on July 19, 2024

the easiest way (for experimental purposes) is to edit lib/igb/igb.c:igb_xmit() and comment out this function call:

/* 
 * Set up the context descriptor to specify
 * launchtimes for the packet.
 */
igb_tx_ctx_setup(txr, packet); <--- comment this out

Now you will be totally dependent on the class shaper in the I210 to pace out the frames ...

from openavnu.

keyurparekh1 avatar keyurparekh1 commented on July 19, 2024

Hello, I tried with commenting igb_tx_ctx_setup(txr,packet); API.

But still problem continues........

from openavnu.

intel-ethernet avatar intel-ethernet commented on July 19, 2024

I'm still not able to reproduce this ... I can send you my stripped down version of simple_talker, or you can send me your code (directly to my email address, zipped) and I can try it.

What I did:
a) commented out igb_tx_ctx_setup() in lib/igb/igb.c:igb_xmit(), recompiled library
b) modified simple_talker in the following ways:
b.1 - allocated 32 DMA pages (4KB each)
b.2 - carved up the 32 DMA pages into 1024 bytes each --> 128 total available packets
b.3 - commented out all MPRD-related calls (i'm sending this back-to-back to another I210 card)
b.4 - configured the class shaper to send (7) Class A frames per 125 usec which is 56,000 packets/sec.
c) observe on the peer the packet rate. (To be fair, I didn't instrument the peer to detect long gaps, but I would suspect it would show up as a reduced packet rate ?).

from openavnu.

intel-ethernet avatar intel-ethernet commented on July 19, 2024

I think this issue is closed based on off-line emails we have exchanged. If useful, I can post back my 'performance enhanced' version of simple talker which allocates multiple DMA pages to fully fill up the tx ring of the I210 with AVB data ... ? Is this useful?

from openavnu.

keyurparekh1 avatar keyurparekh1 commented on July 19, 2024

yes definitely it will be useful to us. Currently we are shifted to some other work, so that we didn't continue this debugging. But modified application will be greatly appreciated.

from openavnu.

KiranKodagali avatar KiranKodagali commented on July 19, 2024

Looks like I am facing the same issue what is discussed here. This issue was closed based on the offline mails so can you please send me(to my mail-id) the solution/fix to that issue. If possible send me application also.

from openavnu.

pinealservo avatar pinealservo commented on July 19, 2024

@intel-ethernet, did you see the request here for the information you exchanged with @keyurparekh1 in offline emails?

from openavnu.

ajolas avatar ajolas commented on July 19, 2024

Hello, everyone.
We are facing the same problem with ~1ms delays between the AVB packets. Problem present in both simple_talker and live_stream talker. Disabling the timed tx doesn't help. As I understand, there is a solution for the issue. Can anyone share the information?

from openavnu.

andrew-elder avatar andrew-elder commented on July 19, 2024

Closing this question. No further correspondence for over a year!

from openavnu.

zeefpt avatar zeefpt commented on July 19, 2024

HI folks ,

Can you put the example you use for streaming audio/video using simple_talker and live_stream talker or a static sample music/video ?

Im trying to use gstreamer-1.0 to livestream the example but with not sucess.!

Regards,

from openavnu.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.