avnu / gptp Goto Github PK
View Code? Open in Web Editor NEWLicense: BSD 3-Clause "New" or "Revised" License
License: BSD 3-Clause "New" or "Revised" License
Hi,
I was investigating random crash in our application and found that in daemon_cl.cpp we initialize
portInit.index = 0;
and this value is ussed to register port in clock:
void registerPort(CommonPort* port, uint16_t index) {
if (index < MAX_PORTS) {
port_list[index - 1] = port;
}
++number_ports;
}
This cause that we modify port_list at index '-1' and increase number_ports.
In constructor I set all port_list to the NULL which help me to found this issue.
After that port_list is used in CommonPort::processStateChange(Event e)
Here we try to get some values from port which was registered in the wrong way.
If there is NULL j index is 33 and we get some garbage values. If port_list was not initialized with NULLs we also get some garbage. Here we get the crash.
Potential fixes is to not allow to registerPort with index less then 1 or do not substract 1.
I'll be very glad to get some feedback if this is the issue of the daemon_cl sample.
The gPTP Travis (sanity) build (and icon) seems to have gone missing when this repo was split from the main OpenAvnu repo. Can someone please put it back?
Short summary (details in attached file):
Event 3: recvmsg() does not initialize reflected_bytes.
Uninitialized Variable help
*gptpCommonHeader was not initialized.
*gptpCommonHeader references reflected_bytes.
reflected_bytes was defined at linux_hal_generic.cpp:290.
Hi, some steps over from my last question.
Now, I'm facing an other problem:
I'm trying to compile for ARCH=I210, but I have the following error:
In file included from ../src/linux_hal_generic.cpp:34:0:
../src/linux_hal_generic_tsprivate.hpp:42:10: fatal error: igb.h: File or directory not found
#include <igb.h>
Then, I put all "igb_avb/lib" content in "gptp/linux/src"
and I had as follow:
g++ -Wall -g -I. -I../../common -I../src -I/home/iemai/header/include/ -DPTP_HW_CROSSTSTAMP -I../../../../lib/igb/ -DWITH_IGBLIB -std=c++0x -Wnon-virtual-dtor obj/ptp_message.o obj/ap_message.o obj/avbts_osnet.o obj/ether_port.o obj/common_port.o obj/ieee1588clock.o obj/linux_hal_common.o obj/linux_hal_persist_file.o obj/gptp_log.o obj/platform.o obj/ini.o obj/gptp_cfg.o obj/linux_hal_generic.o obj/linux_hal_generic_adj.o obj/linux_hal_i210.o ../src/daemon_cl.cpp -o obj/daemon_cl -lz -ligb -lpci -L../../../../lib/igb/ -lpthread -lrt
/usr/bin/ld: unable to found -ligb
collect2: error: ld returned 1 exit status
Makefile:141: recipe for target 'obj/daemon_cl' failed
make: *** [obj/daemon_cl] Error 1
Please, how can I resolve this issue?
Many thanks and regards
Hello, I'm facing a problem using I210 on Windows 7.
Environment:
Windows 7 Enterprise
Intel(R) Ethernet I210-T1 GbE NIC
Driver version: 12.13.27.0
I have also added TimeSync to the registry.
But when I run the executable I get the following output:
INFO : GPTP [11:52:00:962] Starting IPC listener thread succeeded
Opening: rpcap://\Device\NPF_{797A8B7A-26A9-4B74-AB0B-3B0F7DC508D7}
ERROR : GPTP [11:52:01:009] Unable to determine clock rate for interface Intel(R) Ethernet I210-T1 GbE NIC
ERROR : GPTP [11:52:01:025] Failed to initialize hardware timestamper, falling back to software timestamping
STATUS : GPTP [11:52:01:025] Starting PDelay
Error is: 6
Error is: 6
Error is: 6
Error is: 6
Error is: 6
Error is: 6
ERROR : GPTP [11:52:01:212] Error (TX) timestamping PDelay request (Retrying-0), error=-1
Error is: 6
ERROR : GPTP [11:52:01:212] Error (TX) timestamping PDelay request, error=-1
Also a window pops up with the message:
the variable "ret" is being used without being initialized
Is anyone having the same error? If so, do you have any idea of what the cause is or how to solve it?
Thanks and regards.
Short summary (details in attached file):
LinuxGPTPPersistFile::triggerWriteStorage()
.../linux/src/linux_hal_persist_file.cpp
bool triggerWriteStorage(void)
{
if (!writeCB) {
event Event 2: Considering the case where writeCB must have been equal to 0.
GPTP_LOG_ERROR("Persistent write callback not registered");
}
bool result = false;
if (memoryDataLength > storedDataLength) {
...
}
writeCB((char *)restoredata, storedDataLength);
Null Pointer Dereference: writeCB is dereferenced here, but it is NULL.
Hi Everyone,
This is an issue I have already posted but on the Open Avnu TSN and AVB repository. This problem is not solved for me.
I was executing my gPTP deamon for the server and the client . I could see that the AsCapable: Enabled in both the system but still i get the following error "Received PDelay FUP has different seqID than the PDelay request".
This might have happened because the Pdelay Response follow up message came earlier than the Pdelay Request message or it might have come too late that already another Pdelay Request message have triggered in between. As a result the sequence id of both is not matching.
I checked with the wireshark and found that there is no unexpected Pdelay Request interfering in between a Pdelay Request and Pdelay Response Follow up message. In that case, why does my Sequence id not matching? and what should I do to solve this error?
I have attched the images of gPTP executed on my server and client. Please do help me.
TSN Server:
Thanks in advance!
Short summary (details in attached file):
in case of pthread_create()
failure in OSTimerQueue *LinuxTimerQueueFactory::createOSTimerQueue
(linux_hal_common.cpp), destructor LinuxTimerQueue::~LinuxTimerQueue()
is invoked on delete (ret)
and there pthread_join(_private->signal_thread, NULL)
is called but signal_thread
seems to be uninitialized/undefined according to pthread_create()
return value description:
On success, pthread_create() returns 0; on error, it returns an error number, and the contents of *thread are undefined.
Now that the gptp is separated out of the OpenAvnu code, can we have a separate release for the gptp starting with the versioning v1.0
Short summary (details in attached file):
InterfaceName::InterfaceName()
.../common/avbts_osnet.hpp
InterfaceName(char *name, int length) {
this->name = new char[length + 1];
PLAT_strncpy(this->name, name, length);
}
strncpy() may write a non-null value into the very last byte of the string.
The string's capacity is length + 1, which is bounded above by 1073741824 and the length of the string pointed to by name and below by 1. The last character written by strncpy() could be character length + 1 - 1, which evaluates to length, which is bounded above by 1073741823 and the length of the string pointed to by name, minus 1 and below by 0.
If a subsequent statement definitely null-terminates the string, you can safely ignore this warning.
Hello There,
I tried to run gptp daemon in my Linux system connected to one more Linux system through Ethernet cable. But I am getting the following error
INFO : GPTP [10:14:31:177] gPTP starting
ERROR : GPTP [10:14:31:178] Group ptp not found, will try root (0) instead
ERROR : GPTP [10:14:31:178] Failed to configure timestamping: Operation not supported
ERROR : GPTP [10:14:31:178] post_init failed
ERROR : GPTP [10:14:31:178] failed to initialize port
Using ethtool -T eth0
command I got the following information.
Time stamping parameters for eth0:
Capabilities:
software-transmit (SOF_TIMESTAMPING_TX_SOFTWARE)
software-receive (SOF_TIMESTAMPING_RX_SOFTWARE)
software-system-clock (SOF_TIMESTAMPING_SOFTWARE)
PTP Hardware Clock: none
Hardware Transmit Timestamp Modes: none
Hardware Receive Filter Modes: none
As per my understanding gptp required HardwareTimeStamp.So my system is not supporting it. I am planning to buy Beaglebone black to run gptp.Does Beaglebone supports the gptp ?
Hi,
I am new to Open AVB and interested to understand this tech.
First, I had a look to documentation and issues on this git and found, in order to have a running AVB demo on my Linux host PC, I need to:
Compilation is ok.
I'm a bit confused: many issues report mandatory Intel I210, but in gPTP README.rst is:
To build for I210:
ARCH=I210 make clean all
To build for 'generic' Linux:
make clean all
Then, could I run a demo on host PC with any kind of NIC card, no matter about hardware timestamping?
Please, any hints for me?
Thanks a lot
Short summary (details in attached file):
Event 22: net_iface_l->sd_event has gone out of scope and no longer references the resource of interest.
There are no remaining references to the resource socket(17, SOCK_DGRAM, 0) from linux_hal_common.cpp:1058.
The resource was allocated at linux_hal_common.cpp:1058.
The last reference was lost at linux_hal_common.cpp:1071.
The resource was not freed.
Short summary (details in attached file):
event Event 11: linkDelayInterval is set to -128. See related event 10. Jump to previous message Jump to next message hide
this->linkDelayInterval = linkDelayInterval;
Coercion Alters Value help
linkDelayInterval is coerced from signed char to unsigned char.
event Event 11: announceInterval is set to -128. See related event 10. Jump to previous message Jump to next message hide
this->announceInterval = announceInterval;
Coercion Alters Value help
announceInterval is coerced from signed char to unsigned char.
Hi,
Is there any test framework using which the gptp is tested, to check if it conforms with the Avnu specifications?
https://avnu.org/wp-content/uploads/2014/05/gPTP_TestPlan_Public_Summary.pdf
Currently there is no threads synchronization during daemon shutdown. On Linux two sources of segmentation fault were identified (for slave only) so far:
It is quite sporadic (1/X00) and it has been fixed (and well tested in slave mode) on our side by adding/calling pthread_cancel() and _join() for "watchNetLink" and "openPort" threads at the end of main thread. Those threads should be "cancelled" at POSIX.1 cancellation points, which are recv() and select() functions in those cases.
Is there someone interested in pull request with mentioned changes or do you see other (better) ways to fix it? Any comments appreciated.
../../../../lib/igb/igb.h:30:10: fatal error: linux/kobject.h: can't find that file or directory
#include <linux/kobject.h>
^~~~~~~~~~~~~~~~~
compilation terminated.
Makefile:150: recipe for target 'obj/linux_hal_generic.o' failed
make: *** [obj/linux_hal_generic.o] Error 1
After I locate that and add it to include directory, I would get a lot more error message which I think may be a compiler-related problem.
What should I prepare before compiling for I210?
Currently, the sync interval is set either through the configuration file (including the default value) or through the signaling message. This is correct behavior in the master role.
For the slave role, the sync interval is used to set the sync timeout and should be taken from ingress sync message header (logMessageInterval field). The sync timeout is set, by default, to 3x the sync interval.
Alternatively, a second ingress sync interval could be added, but it's probably OK to re-use for slave.
Short summary (details in file attached):
Event 17: result has gone out of scope and no longer references the resource of interest.
There are no remaining references to the resource new () from linux_hal_common.hpp:382.
The resource was allocated at linux_hal_common.hpp:382.
The last reference was lost at linux_hal_common.hpp:383.
The resource was not freed.
Short summary (details in file attached):
Event 18: net_iface_l->sd_general has gone out of scope and no longer references the resource of interest.
There are no remaining references to the resource socket(17, SOCK_DGRAM, 0) from linux_hal_common.cpp:1053.
The resource was allocated at linux_hal_common.cpp:1053.
The last reference was lost at linux_hal_common.cpp:1062.
The resource was not freed.
Short summary (details in attached file):
Event 13: lock_factory has gone out of scope and no longer references the resource of interest.
There are no remaining references to the resource new () from daemon_cl.cpp:213.
The resource was allocated at daemon_cl.cpp:213.
The last reference was lost at daemon_cl.cpp:221.
The resource was not freed.
Short summary (details in attached file):
Event 14: thread_factory has gone out of scope and no longer references the resource of interest.
There are no remaining references to the resource new () from daemon_cl.cpp:165.
The resource was allocated at daemon_cl.cpp:165.
The last reference was lost at daemon_cl.cpp:174.
The resource was not freed.
Short summary (details in attached file):
Event 13: timerq_factory has gone out of scope and no longer references the resource of interest.
There are no remaining references to the resource new () from daemon_cl.cpp:212.
The resource was allocated at daemon_cl.cpp:212.
The last reference was lost at daemon_cl.cpp:221.
The resource was not freed.
Short summary (details in attached file):
Event 15: _private has gone out of scope and no longer references the resource of interest.
There are no remaining references to the resource new () from linux_hal_common.cpp:802.
The resource was allocated at linux_hal_common.cpp:802.
The last reference was lost at daemon_cl.cpp:122.
The resource was not freed.
Hi, I have two 8269 adapters and I'd like to test its time sync function.
I've followed the README to install the latest intel driver and switch the driver to the intel version in device manager, setup registry(reboot), and connect two PCs directly via p2p mode.
But when I start gPTP, it tolds me "Failed to initialize hardware timestamper, falling..."
$ ./gptp -w 2A-16-XX-XX-XX-39 2A-16-XX-XX-XX-39 2A-16-XX-XX-XX-F2
INFO : GPTP [22:24:19:433] Starting IPC listener thread succeeded
STATUS : GPTP [22:24:19:438] AsCapable: Enabled
Opening: rpcap://\Device\NPF_{B6A3CA4D-3AAD-4653-9E16-302C78475C15}
ERROR : GPTP [22:24:19:481] Failed to initialize hardware timestamper, falling back to software timestamping
STATUS : GPTP [22:24:22:484] *** Announce Timeout Expired - Becoming Master
STATUS : GPTP [22:24:22:486] New Grandmaster "2A:16:XX:XX:XX:XX:XX:39" (previous "00:00:00:00:00:00:00:00")
Could you please help me resolving this? Thanks!
Additional:
It's Windows 10 1803 (OS Build 17134.1006) x64
The driver is Intel 20.70.11.3 (6/29/2019)
Short summary (details in attached file):
Event 26: default_factory has gone out of scope and no longer references the resource of interest.
There are no remaining references to the resource new () from daemon_cl.cpp:209.
The resource was allocated at daemon_cl.cpp:209.
The last reference was lost at daemon_cl.cpp:221.
The resource was not freed.
Currently we have gPTP which is capable of synchronizing endstations, if I want to scale the implementation, so that it will work on switch devices too, how difficult it would be?
Current implementation has the functionalities specific to a single port, so will it be just a task of having the same running on multiple ports? Is there any limitation for the current achitecture, that I should be aware of?
Brief description:
Using pyshark, we are able to capture the live logs. But here, current timestamp and sequenceID parameter values are getting assigned inappropriately from server side to the client side, due to the delay of live capturing.
Server side, we are running gptp daemon_cl.
Client side, we are pumping the dummy packets.
Environment:
Scapy version: 2.4.0
Python version: 3.6.6
Operating System: Ubuntu18.04
Expected Result:
Server side timestamp and sequenceID should match with the Client side timestamp and sequenceID parameters
Hello!
Anyone knows about this?
I checked this structs and find those codes at ../src/linux_hal_generic.cpp:293
.
struct {
struct cmsghdr cm;
char control[256];
} control;
The last element of cmsghdr is a __flexarr
. So , a char control[256]
after a __flexarr
. This cause an error.
Full logs at below:
user@user-Lenovo-Product:~/AVnu/gptp/linux/build$ ARCH=I210 make all
g++ -Wall -g -I. -I../../common -I../src -I/home/user/header/include/ -DPTP_HW_CROSSTSTAMP -I../../../../lib/igb/ -DWITH_IGBLIB -std=c++0x -Wnon-virtual-dtor -c ../src/linux_hal_generic.cpp -o obj/linux_hal_generic.o
In file included from /usr/include/x86_64-linux-gnu/sys/socket.h:33,
from ../src/linux_hal_generic.cpp:38:
/usr/include/x86_64-linux-gnu/bits/socket.h: In member function ‘virtual net_result LinuxNetworkInterface::nrecv(LinkLayerAddress*, uint8_t*, size_t&)’:
/usr/include/x86_64-linux-gnu/bits/socket.h:285:33: error: flexible array member ‘cmsghdr::__cmsg_data’ not at end of ‘struct LinuxNetworkInterface::nrecv(LinkLayerAddress*, uint8_t*, size_t&)::<unnamed>’
285 | __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */
| ^~~~~~~~~~~
../src/linux_hal_generic.cpp:64:8: note: next member ‘char LinuxNetworkInterface::nrecv(LinkLayerAddress*, uint8_t*, size_t&)::<unnamed struct>::control [256]’ declared here
64 | char control[256];
| ^~~~~~~
../src/linux_hal_generic.cpp:62:9: note: in the definition of ‘struct LinuxNetworkInterface::nrecv(LinkLayerAddress*, uint8_t*, size_t&)::<unnamed>’
62 | struct {
| ^
In file included from /usr/include/x86_64-linux-gnu/sys/socket.h:33,
from ../src/linux_hal_generic.cpp:38:
/usr/include/x86_64-linux-gnu/bits/socket.h: In member function ‘virtual int LinuxTimestamperGeneric::HWTimestamper_txtimestamp(PortIdentity*, PTPMessageId, Timestamp&, unsigned int&, bool)’:
/usr/include/x86_64-linux-gnu/bits/socket.h:285:33: error: flexible array member ‘cmsghdr::__cmsg_data’ not at end of ‘struct LinuxTimestamperGeneric::HWTimestamper_txtimestamp(PortIdentity*, PTPMessageId, Timestamp&, unsigned int&, bool)::<unnamed>’
285 | __extension__ unsigned char __cmsg_data __flexarr; /* Ancillary data. */
| ^~~~~~~~~~~
../src/linux_hal_generic.cpp:295:8: note: next member ‘char LinuxTimestamperGeneric::HWTimestamper_txtimestamp(PortIdentity*, PTPMessageId, Timestamp&, unsigned int&, bool)::<unnamed struct>::control [256]’ declared here
295 | char control[256];
| ^~~~~~~
../src/linux_hal_generic.cpp:293:9: note: in the definition of ‘struct LinuxTimestamperGeneric::HWTimestamper_txtimestamp(PortIdentity*, PTPMessageId, Timestamp&, unsigned int&, bool)::<unnamed>’
293 | struct {
| ^
make: *** [Makefile:150:obj/linux_hal_generic.o] Error 1
Line 433 : int tlv_length = size - PTP_COMMON_HDR_LENGTH + PTP_ANNOUNCE_LENGTH;
should be changed to
int tlv_length = size - (PTP_COMMON_HDR_LENGTH + PTP_ANNOUNCE_LENGTH);
Short summary (details in attached file):
Event 1: recvmsg() does not initialize buf.
*msgHdr was not initialized.
*msgHdr references buf.
buf was defined at linux_hal_common.cpp:177.
Hi *,
I am trying to update the kernel I use with my AVB project.
Kernel 4.8.6-rt5 is working very well.
The same code (with adjustments for the new kernel) compiles under 5.2.17-rt9, but the synchronization resets repeatedly.
The sequence id of the FUP msg is wrong.
I tried ptp4l as well. no sync at all.
I have no two ptp daemons running, as propsed in another issue.
It is no network setup problem, since 5/6 servers with kernel 4.8.6-rt5 work flawlessly.
Any idea?
Any changes to the kernel, that break the code?
Some new or colliding kernel options?
Thanks and BR,
Ck
In the file 'common/ieee1588.hpp' default constructor for Timestamp looks as follows:
Timestamp() {
Timestamp( 0, 0, 0 );
}
This will not work in C++. Could you please correct that in next releases.
By the way, I started to play with this project recently and found some more places, where some improvements/corrections could be applied. Is there a change that I could contribute to this (gptp) project?
Short summary (details in attached file):
buildPTPMessage()
.../common/ptp_message.cpp
PTPMessageCommon *buildPTPMessage
( char *buf, int size, LinkLayerAddress *remote,
CommonPort *port )
{
...
annc->
grandmasterClockQuality->offsetScaledLogVariance =
Coercion Alters Value help
PLAT_ntohs(...) is coerced from unsigned short to short.
PLAT_ntohs
( annc->grandmasterClockQuality->
offsetScaledLogVariance );
PLAT_ntohs()
.../linux/src/platform.cpp
uint16_t PLAT_ntohs( uint16_t s ) {
return ntohs( s );
}
SCA complains here about ntohs() but I believe the real issue is the type of offsetScaledLogVariance in struct ClockQuality, which currently in the code is int16_t. There seems to be inconsistency in IEEE 802.1AS-2011:
This inconsistency has been corrected in IEEE 802.1AS-2011/Cor 1-2013 where UInteger16 was specified in the Table 14-1 and later in the code examples.
Short summary (details in attached file):
Event 13: timer_factory has gone out of scope and no longer references the resource of interest.
There are no remaining references to the resource new () from daemon_cl.cpp:214.
The resource was allocated at daemon_cl.cpp:214.
The last reference was lost at daemon_cl.cpp:221.
The resource was not freed.
Short summary (details in attached file):
SignallingTLV::SignallingTLV()
.../common/avbts_message.hpp
expand/collapse
SignallingTLV() {
tlvType = PLAT_htons(0x3);
lengthField = PLAT_htons(12);
organizationId[0] = '\x00';
organizationId[1] = '\x80';
organizationId[2] = '\xC2';
Coercion Alters Value help
-128 is coerced from char to unsigned char.
-62 is coerced from char to unsigned char.
Negative values cannot be stored as unsigned char. Coercing them to unsigned char can cause data loss or sign change.
Compilation of the repository with ARCH=I210 does not work out of the box.
Is this intended or should i normally do something different?
log of make with ARCH=I210
mgnad@pc1:~/gptp/linux/build$ ARCH=I210 make clean all
rm -f *~ obj/*.o obj/daemon_cl
g++ -Wall -g -I. -I../../common -I../src -I/home/mgnad/header/include/ -DPTP_HW_CROSSTSTAMP -I../../../../lib/igb/ -DWITH_IGBLIB -std=c++0x -Wnon-virtual-dtor -c ../../common/ptp_message.cpp -o obj/ptp_message.o
../../common/ptp_message.cpp: In function ‘PTPMessageCommon* buildPTPMessage(char*, int, LinkLayerAddress*, CommonPort*)’:
../../common/ptp_message.cpp:244:31: warning: ‘void* memcpy(void*, const void*, size_t)’ writing to an object of type ‘class FollowUpTLV’ with no trivial copy-assignment; use copy-assignment or copy-initialization instead [-Wclass-memaccess]
244 | sizeof(followup_msg->tlv) );
| ^
In file included from ../../common/common_port.hpp:38,
from ../../common/avbts_clock.hpp:39,
from ../../common/ptp_message.cpp:35:
../../common/avbts_message.hpp:730:7: note: ‘class FollowUpTLV’ declared here
730 | class FollowUpTLV {
| ^~~~~~~~~~~
g++ -Wall -g -I. -I../../common -I../src -I/home/mgnad/header/include/ -DPTP_HW_CROSSTSTAMP -I../../../../lib/igb/ -DWITH_IGBLIB -std=c++0x -Wnon-virtual-dtor -c ../../common/ap_message.cpp -o obj/ap_message.o
g++ -Wall -g -I. -I../../common -I../src -I/home/mgnad/header/include/ -DPTP_HW_CROSSTSTAMP -I../../../../lib/igb/ -DWITH_IGBLIB -std=c++0x -Wnon-virtual-dtor -c ../../common/avbts_osnet.cpp -o obj/avbts_osnet.o
g++ -Wall -g -I. -I../../common -I../src -I/home/mgnad/header/include/ -DPTP_HW_CROSSTSTAMP -I../../../../lib/igb/ -DWITH_IGBLIB -std=c++0x -Wnon-virtual-dtor -c ../../common/ether_port.cpp -o obj/ether_port.o
g++ -Wall -g -I. -I../../common -I../src -I/home/mgnad/header/include/ -DPTP_HW_CROSSTSTAMP -I../../../../lib/igb/ -DWITH_IGBLIB -std=c++0x -Wnon-virtual-dtor -c ../../common/common_port.cpp -o obj/common_port.o
g++ -Wall -g -I. -I../../common -I../src -I/home/mgnad/header/include/ -DPTP_HW_CROSSTSTAMP -I../../../../lib/igb/ -DWITH_IGBLIB -std=c++0x -Wnon-virtual-dtor -c ../../common/ieee1588clock.cpp -o obj/ieee1588clock.o
../../common/ieee1588clock.cpp: In constructor ‘IEEE1588Clock::IEEE1588Clock(bool, bool, uint8_t, OSTimerQueueFactory*, OS_IPC*, OSLockFactory*)’:
../../common/ieee1588clock.cpp:112:64: warning: ‘void* memset(void*, int, size_t)’ writing to an object of non-trivial type ‘class ClockIdentity’; use assignment instead [-Wclass-memaccess]
112 | memset( &LastEBestIdentity, 0xFF, sizeof( LastEBestIdentity ));
| ^
In file included from ../../common/ieee1588clock.cpp:34:
../../common/ieee1588.hpp:125:7: note: ‘class ClockIdentity’ declared here
125 | class ClockIdentity {
| ^~~~~~~~~~~~~
g++ -Wall -g -I. -I../../common -I../src -I/home/mgnad/header/include/ -DPTP_HW_CROSSTSTAMP -I../../../../lib/igb/ -DWITH_IGBLIB -std=c++0x -Wnon-virtual-dtor -c ../src/linux_hal_common.cpp -o obj/linux_hal_common.o
g++ -Wall -g -I. -I../../common -I../src -I/home/mgnad/header/include/ -DPTP_HW_CROSSTSTAMP -I../../../../lib/igb/ -DWITH_IGBLIB -std=c++0x -Wnon-virtual-dtor -c ../src/linux_hal_persist_file.cpp -o obj/linux_hal_persist_file.o
g++ -Wall -g -I. -I../../common -I../src -I/home/mgnad/header/include/ -DPTP_HW_CROSSTSTAMP -I../../../../lib/igb/ -DWITH_IGBLIB -std=c++0x -Wnon-virtual-dtor -c ../../common/gptp_log.cpp -o obj/gptp_log.o
g++ -Wall -g -I. -I../../common -I../src -I/home/mgnad/header/include/ -DPTP_HW_CROSSTSTAMP -I../../../../lib/igb/ -DWITH_IGBLIB -std=c++0x -Wnon-virtual-dtor -c ../src/platform.cpp -o obj/platform.o
cc -Wall -g -I. -I../../common -I../src -I/home/mgnad/header/include/ -DPTP_HW_CROSSTSTAMP -I../../../../lib/igb/ -DWITH_IGBLIB -c ../../common/ini.c -o obj/ini.o
g++ -Wall -g -I. -I../../common -I../src -I/home/mgnad/header/include/ -DPTP_HW_CROSSTSTAMP -I../../../../lib/igb/ -DWITH_IGBLIB -std=c++0x -Wnon-virtual-dtor -c ../../common/gptp_cfg.cpp -o obj/gptp_cfg.o
g++ -Wall -g -I. -I../../common -I../src -I/home/mgnad/header/include/ -DPTP_HW_CROSSTSTAMP -I../../../../lib/igb/ -DWITH_IGBLIB -std=c++0x -Wnon-virtual-dtor -c ../src/linux_hal_generic.cpp -o obj/linux_hal_generic.o
In file included from ../src/linux_hal_generic.cpp:34:
../src/linux_hal_generic_tsprivate.hpp:42:10: fatal error: igb.h: No such file or directory
42 | #include <igb.h>
| ^~~~~~~
compilation terminated.
make: *** [Makefile:150: obj/linux_hal_generic.o] Error 1
To make it work I had to:
diff --git a/linux/build/Makefile b/linux/build/Makefile
index 1e00b1a..5201ca5 100644
--- a/linux/build/Makefile
+++ b/linux/build/Makefile
@@ -90,8 +90,8 @@ HEADER_FILES = $(COMMON_DIR)/ether_port.hpp\
$(SRC_DIR)/platform.hpp
ifeq ($(ARCH),I210)
- IGB_LIB_INCPATH=../../../../lib/igb/
- IGB_LIB_PATH=../../../../lib/igb/
+ IGB_LIB_INCPATH=../../../../lib/igb_avb/lib
+ IGB_LIB_PATH=../../../../lib/igb_avb/lib
CFLAGS_G += -I$(IGB_LIB_INCPATH) -DWITH_IGBLIB
LDFLAGS_G += -lz -ligb -lpci -L$(IGB_LIB_PATH)
OBJ_FILES += $(OBJ_DIR)/linux_hal_generic.o \
Short summary (details in attached file):
Negative Character Value help at ini.c:47
isspace() is invoked here with an argument of signed type char, but only has defined behavior for int arguments that are either representable as unsigned char or equal to the value of macro EOF(-1).
Short summary (details in attached file):
Event 13: condition_factory has gone out of scope and no longer references the resource of interest.
There are no remaining references to the resource new () from daemon_cl.cpp:215.
The resource was allocated at daemon_cl.cpp:215.
The last reference was lost at daemon_cl.cpp:221.
The resource was not freed.
Short summary (details in attached file):
Event 32: ifname has gone out of scope and no longer references the resource of interest.
There are no remaining references to the resource new () from daemon_cl.cpp:223.
The resource was allocated at daemon_cl.cpp:223.
The last reference was lost at daemon_cl.cpp:390.
The resource was not freed.
Hi,
I am testing GPTP on a TI board which has CPSW driver. I am running gptp daemons on two separate TI boards using a Point-To-Point connection. I have written an application which will read the GPTP daemon shared memory and will try to calculate the synchronized master clock using the parameters defined in that shared memory.
I am doing the calculations in the below way:
Local Clock = System Clock - Local-To-System Phase Offset
Master Clock = Local Clock - Master-To-Local Phase Offset
Kindly let me know if this is the right way of calculating the Master Clock/Timestamp.
If there is some flaw in my understanding, please let me know the correct way.
Thanks in Advance.
Regards,
Mandar
Short summary (details in attached file):
Event 31: name has gone out of scope and no longer references the resource of interest.
There are no remaining references to the resource new[length + 1] () from avbts_osnet.hpp:173.
The resource was allocated at avbts_osnet.hpp:173.
The last reference was lost at daemon_cl.cpp:390.
The resource was not freed.
Short summary (details in file attached):
Event 13: ipc has gone out of scope and no longer references the resource of interest.
There are no remaining references to the resource new () from daemon_cl.cpp:216.
The resource was allocated at daemon_cl.cpp:216.
The last reference was lost at daemon_cl.cpp:221.
The resource was not freed.
Short summary (details in attached file):
Negative Character Value help at ini.c:35
isspace() is invoked here with an argument of signed type char, but only has defined behavior for int arguments that are either representable as unsigned char or equal to the value of macro EOF(-1).
Short summary (details in attached file):
GptpIniParser::iniCallBack()
.../common/gptp_cfg.cpp
parser->_config.phy_delay[LINKSPEED_1G].set_tx_delay( phdly );
phdly is coerced from int to unsigned short.
phdly evaluates to strtoul(value, &pEnd, 10)gptp_cfg.cpp:158.
Coercing them to unsigned short can cause data loss or sign change.
I am working on supporting gPTP for One of the Intel 82574L chip.
But i could not find the Phy delays for particular chip in the Datasheet "https://www.intel.com/content/dam/doc/datasheet/82574l-gbe-controller-datasheet.pdf".
I found that the PHY delays (PHY_DELAY_MB_TX_I20, PHY_DELAY_MB_RX_I20) for i210 are derived from "https://www.intel.com/content/www/us/en/embedded/products/networking/i210-ethernet-controller-datasheet.html".
Is there any common derived Phy delays for all the NIC's.
Short summary (details in attached file):
Negative Character Value help at ini.c:27
isspace() is invoked here with an argument of signed type char, but only has defined behavior for int arguments that are either representable as unsigned char or equal to the value of macro EOF(-1).
Short summary (details in attached file):
Event 29: net_iface_l has gone out of scope and no longer references the resource of interest.
There are no remaining references to the resource new () from linux_hal_common.cpp:1040.
The resource was allocated at linux_hal_common.cpp:1040.
The last reference was lost at linux_hal_common.cpp:1044.
The resource was not freed.
Short summary (details in attached file):
.../common/ini.c
/* Return pointer to first non-whitespace char in given string. */
static char* lskip(const char* s)
{
while (*s && isspace(*s))
s++;
return (char*)s;
}
This cast loses the const qualifier in conversion.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.