Marcin Górski(deleted)
09/01/2014 5:32 AM
post111600
|
Hello,
While browsing QNX 6.6.0 libraries I came across a library called "lsm-avb.so". I assume that this library can be loaded
to add necessary protocols to socket API in order to enable AVB traffic. Is there a place where I can find API to that
library?
|
|
|
Nick Reilly
|
Re: io-pkt avb library API
|
Nick Reilly
09/02/2014 1:15 PM
post111608
|
Re: io-pkt avb library API
The lsm-avb.so is still changing as we add support for more of the AVB protocols. This is the current state.
The API isn't through sockets, instead lsm-avb.so runs its own resource manager under <SOCK prefix>/dev/socket/avb as
this enables us to meet the low latency requirements in some AVB scenarios even when the main io-pkt resource manager is
dealing with another message.
Note that an AVB enabled Ethernet driver is also required, this consists of supporting a few new ioctls along with
supporting the multiple queues, shapers and time stamping that is required for AVB.
Under the avb directory there is a directory of all the interfaces that may be AVB capable. Under each interface is a "
time" entry used for 802.1AS packets (driven by ptpd-avb) and then individual streams are opened and closed with the
stream name containing the parameters specifying the stream.
Stream name is formed as:
"DestMac:VLAN:Priority:Subtype:StreamId:BitDepth:SampleRate:NumSamples:NumVoices"
1722 and 1722a Draft6 streams are currently supported and a clock reference stream can also be specified on the command
line. Whole packets worth of data are meant to be written and read rather than reading and writing a partial packets.
The lsm-avb.so adds the header to the data and transmits on a talker stream with the correct timestamp. For listener
streams the data is buffered until the presentation timestamp is reached.
We do also have an io-audio driver that makes use of the lsm-avb.so.
|
|
|
bhavya ramu(deleted)
|
Re: io-pkt avb library API
|
bhavya ramu(deleted)
11/08/2018 8:49 AM
post119279
|
Re: io-pkt avb library API
Does lsm_avb.so has implementation of gPTP IEEE 802.1AS?
I am new to qnx OS. We have a requirement to support ethernet AVB on QNX platform.
Currently we have gPTP module for linux platform, which uses packet concept for communicating directly to layer 2 but
this mechanism is not available in QNX OS.
Please let me know if there is any reference manual available for understanding usage of lsm_avb.so. Thanks.
|
|
|
Nick Reilly
|
Re: io-pkt avb library API
|
Nick Reilly
11/08/2018 10:10 AM
post119280
|
Re: io-pkt avb library API
lsm-avb.so implements a very limited subset of the full AVB stack, and there are 3rd parties offering other AVB stacks
on QNX. At this point lsm-avb.so is deprecated and so will be removed in future versions. I would advise you to
investigate these other AVB stacks for any future projects.
QNX does support an 802.1AS implementation in "ptpd-avb". While initial versions of ptpd-avb required lsm-avb.so, ptpd-
avb has now been decoupled from lsm-avb.so and supports 802.1AS without any need for lsm-avb.so.
N.B. For true 802.1AS support you will require both hardware that supports the PTP timestamping and a driver
implementing this timestamping for ptpd-avb to function properly. In the absence of these, ptpd-avb will function in a
very limited "software" mode, running off the main system timer with the limited precision of the system tick (1ms by
default). With a true hardware PTP clock and timestamping network driver, far better precision is available better than
1us - typically a few hundred ns, may be better depending on actual hardware.
You are also free to use any 3rd party 802.1AS implementation that comes with a 3rd party AVB stack.
For further information I would advise you to contact your official QNX support contact directly. AVB is a very
demanding set of protocols and while we have customers shipping successful deployments of AVB, if you are new to QNX it
can be challenging.
|
|
|
Mateusz Dziadosz(deleted)
|
Re: io-pkt avb library API
|
Mateusz Dziadosz(deleted)
09/18/2019 9:07 AM
post119953
|
Re: io-pkt avb library API
Hello,
Could you help with running ptpd-avb in "software mode" for ?
I am running QNX 7, when I trying to run ptpd-avb I am getting error because of lack lsm-avb.so:
(init) Open on /dev/socket/avb/fec0/time failed
Options:
-e run in ethernet mode (level2) is not implemented in ptpd-avb
Should I use other implementation of ptpd to do that?
Thanks
|
|
|
Dean Denter
|
Re: io-pkt avb library API
|
Dean Denter
09/18/2019 9:22 AM
post119954
|
Re: io-pkt avb library API
ptpd-avb has been updated in recent patches to removed dependency on lsm-avb.so -- you should also update your install
to pick up the latest set of patches since there have been many fixes released recently in 7.0 for ptpd & ptpd-avb.
There is no need to specify the -e option for s/w ptp -- ptpd-avb (and ptpd) will detect that h/w ptp support is not
available in the driver and run in s/w mode. If you have logging enabled, there should be a "hardware time support = 0,
" log shortly after starting ptpd-avb.
example of s/w support startup (no ptp master connected to this target board), s/w mode log is the 1st (init) log on
line 7:
# ptpd-avb -gCKb rt0
(ptpd info) 13:06:30.341176 (___)
(ptpd info) 13:06:30.342176 (___) Starting ptpd2 daemon with parameters: ptpd-avb -gCKb rt0
(ptpd info) 13:06:30.343176 (___) Info: Going to check lock /dev/shmem/ptpd_lock
(ptpd info) 13:06:30.344176 (___) Info: Startup finished sucessfully
# Timestamp, State, Clock ID, One Way Delay, Offset From Master, Slave to Master, Master to Slave, Drift, Last packet
Received
2019-09-18 13:06:30.345176, init
(ptpd notice) 13:06:30.346176 (init) hardware time support = 0,
(ptpd info) 13:06:30.347176 (init) now in state PTP_LISTENING
2019-09-18 13:06:30.347176, lstn_init 1
(ptpd info) 13:06:33.348137 (lstn_init) now in state PTP_LISTENING
2019-09-18 13:06:33.348137, lstn_init 1
|
|
|
Nick Reilly
|
Re: io-pkt avb library API
|
Nick Reilly
09/18/2019 9:23 AM
post119955
|
Re: io-pkt avb library API
Hi Mateusz,
We updated ptpd-avb to work directly via BPF and not require lsm-avb.so a while ago. Please reach out to your QNX
support contact to obtain the latest version which will contain the fixes for this and other issues.
Regards,
Nick
|
|
|
Mateusz Dziadosz(deleted)
|
Re: io-pkt avb library API
|
Mateusz Dziadosz(deleted)
09/26/2019 8:31 AM
post119997
|
Re: io-pkt avb library API
Hi Nick,
Thanks, I updated software package, now pdpd-avb is working.
But I have still problem with synchronization between two processors with QNX7 one act as grand master -G flag and
second as slave -g flag. I can see ptp packets on both machines using tcpdump, so it does not seems to be a network
issue.
Could you share with source code with me or at least version with additional debug messages for aarch64?
Thanks,
Mateusz
|
|
|
Nick Reilly
|
Re: io-pkt avb library API
|
Nick Reilly
09/26/2019 9:08 AM
post119998
|
Re: io-pkt avb library API
Hi Mateusz,
You will need to have a source code contract in place for us to share source with you.
Try logging with the -C flag on the command line to see what is going on. If you post the start of the logs then we may
be able to see what the issue is.
Regards,
Nick
|
|
|
Piotr Pasterak
|
Re: io-pkt avb library API
|
Piotr Pasterak
11/19/2019 10:03 AM
post120084
|
Re: io-pkt avb library API
Hi,
I have problem with pdpd-avb synchronization as well (ONX on S32V2):
no sucess with: ptpd-avb -b fec0 -g -L -K -cC
when I try with: ptpd-avb -b fec0 -g -L -K -cC -O 550 it seems promising but seems slave clock doesn't follow (pdpd-avb
doesn't control them?):
# ptpd-avb -b fec0 -g -L -K -cC -O 550
serIF0-> <2019-11-14> <15:09:57.945> (ptpd info) 15:07:50.932771 (___)
serIF0-> <2019-11-14> <15:09:57.946> (ptpd info) 15:07:50.933771 (___) Starting ptpd2 daemon with parameters:
ptpd-avb -b fec0 -g -L -K -cC -O 550
serIF0-> <2019-11-14> <15:09:57.947> (ptpd info) 15:07:50.933771 (___) Info: Startup finished sucessfully
serIF0-> <2019-11-14> <15:09:57.947> # Timestamp, State, Clock ID, One Way Delay, Offset From Master, Slave to Master,
Master to Slave, Drift, Last packet Received
serIF0-> <2019-11-14> <15:09:57.948> 2019-11-14 15:07:50.934771, init
serIF0-> <2019-11-14> <15:09:57.948> (ptpd notice) 15:07:50.936771 (init) hardware time support = 1,
serIF0-> <2019-11-14> <15:09:57.949> (ptpd notice) 15:07:50.937771 (init) setPtpTimeFromSystem to TAI:
1573744070s 936771526ns
serIF0-> <2019-11-14> <15:09:57.949> (ptpd info) 15:07:50.937771 (init) now in state PTP_LISTENING
serIF0-> <2019-11-14> <15:09:57.950> 2019-11-14 15:07:50.000000, lstn_init 1
serIF0-> <2019-11-14> <15:10:00.891> (ptpd info) 15:07:53.937771 (lstn_init) now in state PTP_LISTENING
serIF0-> <2019-11-14> <15:10:00.892> 2019-11-14 15:07:49.936771, lstn_init 1
serIF0-> <2019-11-14> <15:10:03.872> (ptpd info) 15:07:56.937771 (lstn_init) now in state PTP_LISTENING
serIF0-> <2019-11-14> <15:10:03.894> 2019-11-14 15:07:50.000000, lstn_init 1
serIF0-> <2019-11-14> <15:10:04.087> (ptpd info) 15:07:57.124771 (lstn_init) now in state PTP_SLAVE
serIF0-> <2019-11-14> <15:10:04.088> 2019-11-14 15:07:49.936771, slv 6805cafffe8d02c1(unknown)/01, 0.000000000, 0.
000000000, 0.000000000, 0.000000000, 0, I
serIF0-> <2019-11-14> <15:10:04.474> (ptpd notice) 15:07:57.174771 (slv) Received first Sync from Master
serIF0-> <2019-11-14> <15:10:04.475> (ptpd notice) 15:07:57.174771 (slv) going to arm DelayReq timer for the
first time, with initial rate: 0
serIF0-> <2019-11-14> <15:10:04.475> (ptpd info) 15:07:57.176771 (slv) updateClock aborted, offset greater than
1 second. (ptpd notice) 15:07:57.176771 (slv) msgDebugHeader: messageType 8
serIF0-> <2019-11-14> <15:10:04.476> (ptpd notice) 15:07:57.177771 (slv) msgDebugHeader: versionPTP 2
serIF0-> <2019-11-14> <15:10:04.476> (ptpd notice) 15:07:57.178771 (slv) msgDebugHeader: messageLength 76
serIF0-> <2019-11-14> <15:10:04.476> (ptpd notice) 15:07:57.178771 (slv) msgDebugHeader: domainNumber 0
serIF0-> <2019-11-14> <15:10:04.477> (ptpd notice) 15:07:57.179771 (slv) msgDebugHeader: flags 00 00
serIF0-> <2019-11-14> <15:10:04.477> (ptpd notice) 15:07:57.180771 (slv) msgDebugHeader: correctionfield 0
serIF0-> <2019-11-14> <15:10:04.478> (ptpd notice) 15:07:57.180771 (slv) msgDebugHeader: sourcePortIdentity.
clockIdentity 68:05:ca:ff:fe:8d02:c1
serIF0-> <2019-11-14> <15:10:04.478> (ptpd notice) 15:07:57.181771 (slv) msgDebugHeader: sourcePortIdentity.
portNumber 1
serIF0-> <2019-11-14> <15:10:04.479> (ptpd notice) 15:07:57.182771 (slv) msgDebugHeader: sequenceId 38
serIF0-> <2019-11-14> <15:10:04.479> (ptpd notice) 15:07:57.182771 (slv) msgDebugHeader: controlField 2
serIF0-> <2019-11-14>...
View Full Message
|
|
|
|