Giter Site home page Giter Site logo

tsn-doc's People

Contributors

edersondisouza avatar koalo avatar vcgomes avatar vedangpatel1 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tsn-doc's Issues

Could you please add an example for SRP, too?

Hello!

Could you please add an example for SRP, too?
Or, maybe how the bandwidth reserve working?

I have some guesses, but I am not sure if it's right. For example, the CBS has an effect for bandwidth reserving too? So we do not need other actions to reserve any bandwidth?

TAPRIO hardware offload

Just stumbled upon the sentence "No NIC driver in kernel mainline currently supports the EST feature so TAPRIO hardware offload isn’t supported." in the documentation. This is no longer true since at least the igc supports full hardware offload.

I just put this issue here so it does not get lost and might look at it later (or someone else adapts the sentence to the current situation).

check_clocks.c does only support a single interface for ptp4l

The application check_clocks does not work, when ptp4l works on multiple interfaces (e.g. a switch ptp4l -f /etc/ptp4l-tsn.cfg -i enp2s0np2 -i enp2s0np3 -i enp2s0np4 -i enp2s0np5).

Rought overview of the required adaptions for such cases

  • The intefaces appear as additional messages on the socket, when query the port states here, so poll needs to be called multiple times to read all port states.
    int n = poll(&pollfd, 1, 1000);
  • For all received ports, this needs to be done:
    static bool get_port_status(uint8_t *rec_buf, int *port_state)

PS: I don't known if this issue is out ot scope for the application check_clocks. But I think it's worth documenting this, in case someone else has the same issues like me.

Specified device failed to setup ETF hardware offload.

Hello
Setting up qdisk on an i350 interface is failing when using both taprio and mqprio.

the error is after calling the "offload" command in both cases: Specified device failed to setup ETF hardware offload.

We are on 5.10.100-rt62 kernel with built-in kernel drivers for i350.

Any idea why setting offload is failing?

Media Clock Recovery

Hello,

I want to understand how the media clock recovery is addressed on the listener side. As per the section 3.3 (Figuire 10) of Avnu document https://avnu.org/wp-content/uploads/2014/05/AVnu_SWAPIs-v1.3-SWAVI-Updates_Final_Approved_Clean.pdf, we need to do media clock recovery using the presentation time in AAF frames(or CRF frames) and adjust the DAC's clock through HW clock recovery circuit.

I am not able to understand how this is achieved using the ALSA AAF/ Gstreamer AVTP plugins.
Could anyone please explain this?

Many thanks

Error when setting qdiscs

Having a bit of a nightmare getting this all to work, but made some progress...

setup, kernel with time stamping enabled(confirmed with ethtool -T OK)
32bit 5.10.76-v7l-MIDAS_KERNEL+ #2 SMP Fri Oct 29 19:42:13 BST 2021 armv7l GNU/Linux
Using an i210 NIC. IGB driver 5.7.2. diver installed with:
modprobe igb IntMode=2 RSS=4
I believe I need these options to get the 4 queues.

this command works:(or at least no error returned)
sudo tc qdisc add dev eth1 parent root handle 6666 mqprio \ num_tc 3 \ map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 \ queues 1@0 1@1 2@2 \ hw 0

However setting the video or audio qdiscs params e.g:

sudo tc qdisc replace dev eth1 parent 6666:2 handle 8888 cbs \ idleslope 3648 sendslope -996352 hicredit 12 locredit -113 \ offload 1

just gives:
Error: Specified qdisc not found.

This command shows what the queues are:
tc qdisc show dev eth1

`qdisc mqprio 6666: root tc 3 map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 
             queues:(0:0) (1:1) (2:3) 
qdisc pfifo_fast 0: parent 6666:4 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: parent 6666:3 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: parent 6666:2 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
qdisc pfifo_fast 0: parent 6666:1 bands 3 priomap  1 2 2 2 1 2 0 0 1 1 1 1 1 1 1 1
`

sys message log seems to confirm card is ok:
Oct 29 20:10:25 cm432 kernel: [ 1158.798888] igb 0000:01:00.0: added PHC on eth1 Oct 29 20:10:25 cm432 kernel: [ 1158.798897] igb 0000:01:00.0: Intel(R) Gigabit Ethernet Linux Driver Oct 29 20:10:25 cm432 kernel: [ 1158.798903] igb 0000:01:00.0: eth1: (PCIe:2.5GT/s:Width x1) Oct 29 20:10:25 cm432 kernel: [ 1158.798911] igb 0000:01:00.0 eth1: MAC: 68:05:ca:e3:2e:31 Oct 29 20:10:25 cm432 kernel: [ 1158.799062] igb 0000:01:00.0: eth1: PBA No: G65055-012 Oct 29 20:10:25 cm432 kernel: [ 1158.857918] igb 0000:01:00.0: LRO is disabled Oct 29 20:10:25 cm432 kernel: [ 1158.857933] igb 0000:01:00.0: Using MSI-X interrupts. 4 rx queue(s), 4 tx queue(s) Oct 29 20:10:28 cm432 kernel: [ 1161.905352] 8021q: adding VLAN 0 to HW filter on device eth1 Oct 29 20:46:54 cm432 ptp4l: [3347.991] selected /dev/ptp0 as PTP clock
Any ideas how to fix?
TIA

ptp4l and gPTP relationship

Goodmorning,
I approached TSN-AVB networks by Avnu repository.
In Avnu repository we can find gPTP, but in TSN-docs said using ptp4l.
It seems that gPTP implementation could be omitted, almost usefuless.
Please, could you clarifying me about this point?

Thanks a lot.
Best regards

getting error "no bin "clockselect", unpacking elements" on listener side

debian@arm:$ gst-launch-1.0 clockselect. ( clock-id=realtime avtpsrc ifname=eth0.5 address=01:AA:AA:AA:AA:AA ! queue max-size-buffers=0 max-size-time=0 ! avtpaafdepay streamid=0xAABBCCDDEEFF000B ! audioconvert ! autoaudiosink )
0:00:00.252186083 1213 0x6cfac0 ERROR GST_PIPELINE gst/parse/grammar.y:1131:priv_gst_parse_yyparse: no bin "clockselect", unpacking elements
WARNING: erroneous pipeline: no bin "clockselect", unpacking elements
debian@arm:
$

I am getting error "no bin "clockselect", unpacking elements" please helpout

CBS with TAPRIO

Hi,

Can I use CBS with TAPRIO qdisc instead of MQPRIO.
I checked cbs with taprio, but it drops all the packets.
Please suggest if any kernel modifcation is needed for cbs with taprio qdisc

Minimum requirements for audio / video

Hello,
I would like to know the minimum requirements regarding audio and or video.
Is a Coffee Lake based processor necessary for video, or could an older processor be sufficient?
I assume the h264 decoder is the necessary part, in order to get avb video running.
Thanks,

pcm aaf address

Hello, just a tip, please.
Setting /etc/asound.conf

 pcm.aaf0 {
        type aaf
        ifname enp1s0.5
        addr 01:AA:AA:AA:AA:AA
...

which is correct value for addr about Talker host?

phy MAC address
enp1s0 ether ...
or any address is allowed?

Then, how must it set-up in Listeners host?
Many thanks

CBS Qdisc config fail with i218-LM

Hi,

I am getting stuck at the configuration of CBS Qdisc as shown below:

$ sudo tc qdisc add dev $DEV parent root handle 6666 mqprio \
>         num_tc 3 \
>         map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 \
>         queues 1@0 1@1 2@2 \
>         hw 0
RTNETLINK answers: Operation not supported

I am using the intel i218-LM chip. Would it be possible the error is raised due to lack of support on i218-LM ?

System: Debian 10, kernel v4.19.0-10-amd64

tc qdisc taprio configuration problem.

Currently, I am working on a TSN project and I am trying to implement a TSN scenario in a Ubuntu 20.04 VM.

I leverage on tc qdisc command:

tc qdisc replace dev gateway-eth0 parent root handle 100 taprio \ 
num_tc 8 \
map 0 1 2 3 4 5 6 7 1 1 1 1 1 1 1 1 \ 
queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 \ 
base-time 1000 \

clockid CLOCK_TAI \ 

sched-entry S 10 300000 \ 
sched-entry S 32 500000 \
sched-entry S 128 200000 \

Στιγμιότυπο οθόνης_20230110_074459

And also mangle the iptables to classify the packets based on the dscp field.
Στιγμιότυπο οθόνης_20230110_020819
From what I have read, with this qdisc command I define:

i) 8 traffic classes
ii) map priority 0 to TC0, 1 to TC1 2 to TC2 etc.
iii) TC0 is mapped to one TX queue TX-0, TC1 to TX-1, TC2 to TX2 etc.

In the sched-entry part of the command, my goal is to open TC2 and TC5, and TC7 queues for different periods.

To test this I sent ping packets using ping -Q 0x40 <IP> (priority 5) in order to send packets to traffic class 5.
Στιγμιότυπο οθόνης_20230110_074819

It seems that the traffic went to the correct queue.

But when I use ping -Q 0x16 <IP> (priority 2) the traffic went through the last queue
Στιγμιότυπο οθόνης_20230110_075106

Are the sched-entries right?

Thank you.

phc2sys stucks in "Waiting for ptp4l..."

Hello, I have a host PC as follow with Intel i210 adapter:

@ubuntu:~$ uname -a
Linux ubuntu 5.4.0-48-generic #52~18.04.1-Ubuntu

I follow tsn-doc tutorial, setting-up vlan, disabling network manager for pointed device, disabling NTP, etc.
then using:

art@ubuntu:~$ sudo ptp4l -i enp1s0 -f configs/gPTP.cfg --step_threshold=1 -m
[sudo] password di art: 
ptp4l[5663.757]: selected /dev/ptp0 as PTP clock
ptp4l[5663.788]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[5663.788]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[5663.788]: port 1: link down
ptp4l[5663.788]: port 1: LISTENING to FAULTY on FAULT_DETECTED (FT_UNSPECIFIED)
ptp4l[5663.819]: selected local clock 6cb311.fffe.523b81 as best master
ptp4l[5663.819]: port 1: assuming the grand master role
ptp4l[5692.030]: selected local clock 6cb311.fffe.523b81 as best master
ptp4l[5692.030]: port 1: assuming the grand master role
art@ubuntu:~$ sudo pmc -u -b 0 -t 1 "SET GRANDMASTER_SETTINGS_NP clockClass 248 clockAccuracy 0xfe offsetScaledLogVariance 0xffff currentUtcOffset 37 leap61 0 leap59 0 currentUtcOffsetValid 1 ptpTimescale 1 timeTraceable 1 frequencyTraceable 0 timeSource 0xa0"
sending: SET GRANDMASTER_SETTINGS_NP
	6cb311.fffe.523b81-0 seq 0 RESPONSE MANAGEMENT GRANDMASTER_SETTINGS_NP 
		clockClass              248
		clockAccuracy           0xfe
		offsetScaledLogVariance 0xffff
		currentUtcOffset        37
		leap61                  0
		leap59                  0
		currentUtcOffsetValid   1
		ptpTimescale            1
		timeTraceable           1
		frequencyTraceable      0
		timeSource              0xa0
art@ubuntu:~$ sudo phc2sys -w -m -s enp1s0 -c CLOCK_REALTIME --step_threshold=1 –transportSpecific=1
phc2sys[1374.742]: Waiting for ptp4l...
phc2sys[1375.743]: Waiting for ptp4l...
phc2sys[1376.743]: Waiting for ptp4l...
...

phc2sys never syncs.
If I run
sudo ptp4l -i enp1s0 --step_threshold=1 -m

it seems to work, but clock_check gives system is not syncronized:

phc-rt delta is not 37 sec !
phc-tai delta is greater than 50 usec !
TAI offset set in kernel is not correct !
Please verify ptp4l and phc config and restart them if necessary to synchronize the clocks !

Any hints, please?
Thanks a lot

calc-cbs-params.py uses kbit/s and bytes inconsistently

Hello,
I'm currently researching on CBS and my computations on the CBS parameters differed from the script provided in this project.
I had a look into it and found a potential bug in lines 28-29:

hicredit = math.ceil(idleslope_a * frame_non_sr / link_speed)
locredit = math.ceil(sendslope_a * max_frame_size_a / link_speed)

The variables idleslope_a, sendslope_a and linkspeed are measured in kbit/s

idleslope += int(stream['rate']) * frame_size * 8 / 1000

parser.add_argument('-S', dest='link_speed', default=1000000, type=int,
help='Link speed in kbps')

sendslope_a = idleslope_a - args.link_speed

while max_frame_size_a and frame_non_sr are in Byte (if I did not miss anything).
The usage of kbit/s and byte in one equation sounds wrong to me. Also Annex L section L.2 a) shows an example, where all computations are done in bit and bit/s.

If I missed a point somewhere in the code or the specification, I'd be thankful for pointing it out.

Thanks!

Configured TAPRIO - ptp4l do not sync

Hi,
I am having a simple three node setup formed in a triangle:

source-->hop-->sink
source-->sink

All of the connections are done using the Intel i210 cards. After I configured the hop using TAPRIO (w/ flags 0x1 and also w/o), the ptp4l stops to be in sync with other hops and also stops to exchange messages. When I try to setup ETF, CBS, or not qdisc on the hop, everything works as expected and clocks are in sync.

Are you aware of similar issues by the TAPRIO qdisc?

On the source is configured ETF qdisc as follows:

qdisc replace dev enp3s0 parent root handle 100 mqprio        \
      num_tc 3                                        \
      map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 \
      queues 1@0 1@1 2@2 \
      hw 0

qdisc replace dev enp3s0 parent 100:1 etf \
    clockid CLOCK_TAI delta 500000 offload  skip_sock_check

qdisc replace dev enp3s0 parent 100:2 etf \
    clockid CLOCK_TAI delta 500000 offload deadline_mode skip_sock_check

The hop has a following TAPRIO + ETF configuration:

qdisc replace dev enp5s0 parent root handle 100 taprio  \
  num_tc 3                                  \ 
  map 2 2 1 0 2 2 2 2 2 2 2 2 2 2 2 2 \  
  queues 1@0 1@1 2@2 \
  base-time 1605802187000000000          \ 
  flags 0x1                                                       \
  txtime-delay 400000 \
  sched-entry S 01 250000 \
  sched-entry S 00 50000 \ 
  sched-entry S 02 250000 \
  sched-entry S 00 50000 \ 
  sched-entry S 04 350000 \
  sched-entry S 00 50000 \ 
  clockid CLOCK_TAI                                                                                                                                                                                                                         
  
  qdisc replace dev enp5s0 parent 100:1 etf \
    clockid CLOCK_TAI delta 500000 offload  skip_sock_check                                                                                                                                                                                     
  qdisc replace dev enp5s0 parent 100:2 etf \   
     clockid CLOCK_TAI delta 500000 offload deadline_mode skip_sock_check           

I am collecting traffic on the sink using TCPDUMP.

ptp4l gPTP.cfg on the hop, sink and source follow same logic :

[global]
gmCapable               1
priority1               248
priority2               248
logAnnounceInterval     2
logSyncInterval         2
logMinDelayReqInterval  2
logMinPdelayReqInterval 2
syncReceiptTimeout      5
announceReceiptTimeout  5
neighborPropDelayThresh 1000
min_neighbor_prop_delay -20000000
assume_two_step         1
path_trace_enabled      1
follow_up_info          1
transportSpecific       0x1
ptp_dst_mac             01:80:C2:00:00:0E
network_transport       L2

[enp3s0]
boundary_clock_jbod     1
[enp4s0]
boundary_clock_jbod     1

Executing following ptp4l command:

ptp4l -f gPTP.cfg --step_threshold=1 --socket_priority 1

What have I tried so far:

  • Changing various parameters regarding the delays, retransmissions, (logMinDelayReqInterval, neighborPropDelayThresh, announceReceiptTimeout,...), but it did not help.
  • Various socket_priority values
  • With and without flags 0x1 on the TAPRIO parent qdisc.
  • Various configs on ETF child qdisc on the hop.
  • Changing SW/HW timestamping.

To note, I also opened an issue on linuxptp, but after looking more into, it seems like the issue is caused by the TAPRIO itself, as other qdiscs do not introduce this problem...
nxp-archive/openil_linuxptp#19

Any pointers on how to solve this issue would be appreciated!
Thanks!

Could you please give more details for calc-cbs-params.py

Hello!

I could not understand, why

  1. H.264 profile High, 1920x1080, 30fps means rate=8000,psize=1470
  2. PCM 16-bit sample, 48 kHz, stereo, 12 frames perAVTPDU means rate=4000,psize=48

How should I get those values? Is there more formulas to calc them?

Thanks.

PHC2SYS option step_threshold and transportSpecific

Hi, my uname -a is
Linux ubuntu 5.0.0-37-generic #40~18.04.1-Ubuntu SMP Thu Nov 14 12:06:39 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Could you help me, please?

I'm trying to synchronize time with LinuxPTP v1.8, and in ptp4l option
--step_threshold=1
don't work, but
step_threshold=1
seems ok (I don't know how to check this..)

In phc2sys command, options
step_threshold
don't exist, maybe I have to use -S option?

More, transportSpecific option don't exist in phc2sys command.
Can I skip it?

Many thanks

OS requirement to install AVB

May I know which Linux distribution should I use, to try the tutorial "Getting Started with AVB on Linux"? I tried Ubuntu 20 and faced some issues, the kernel version 5.8.0 is different from the document. Thanks for any info!

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.