- Jan 13, 2017
-
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Dec 15, 2016
-
-
Adam Wujek authored
Commit copied from the WRS. wrs_shm_get have to close file descriptors when it fails to open shmem. Otherwise program which tries to open shmem will keep opening file descriptors. Signed-off-by:
Adam Wujek <adam.wujek@cern.ch>
-
- Dec 12, 2016
-
-
Adam Wujek authored
Signed-off-by:
Adam Wujek <adam.wujek@cern.ch>
-
- Dec 07, 2016
-
-
Adam Wujek authored
--Add a new function dump_vlan to print vlan number --To be able to read aux data use recvmsg instead of recvfrom --For incoming data use aux to read VLAN number --For outgoing use VLAN header Signed-off-by:
Adam Wujek <adam.wujek@cern.ch>
-
Adam Wujek authored
--Read VLAN number from aux; network driver strips VLAN information from the frame --Remove a hack from common-fun.c fro WRS, it is not needed anymore; even for WRS we read VLAN from aux Signed-off-by:
Adam Wujek <adam.wujek@cern.ch>
-
Otherwise it breaks Minipc and wr_mon cannot start.
-
- Dec 03, 2016
-
-
Alessandro Rubini authored
commit 168655e6 fsm: when no frame, set msgtype to PPM_NO_MESSAGE was good, but I didn't notice that pp_packet_prefilter() may force a packet drop. This moves the assignemento of PPM_NO_MESSAGE to a later place, just before calling the state machine. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Dec 02, 2016
-
-
Alessandro Rubini authored
The main problem was introduced by: d2a57023 std-servo: fix initial jump for p2p slaves There, we falled back on unix->get_time to make adjustments if hal->get_time failed. Only happens as non-wr slave. Actually, the get_time call has never been implemented in the hal, and we always falled on unix time. But if frames are timestamped with WR time, we can adjust based on Unix time. We now read WR time internally, waiting for something better (we have constant addresses in here). Note: we are still unable to steer frequency, despite the efforts (and it used to work, ages ago). Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This dates back to the original copying over from ptp-noposix: 89a46c6d time-wrs/wrs-socket.c: implementation of net functions for wrs arch (but the bug was not in ptp-noposix). It is exposed by the newer compiler (well, library) we are using. But a calloc of 0 bytes should return NULL, to ensure it's not used... Documentation disagrees: If size is 0, then malloc() returns either NULL, or a unique pointer value that can later be successfully passed to free(). Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This reverts commit 67b8a0f1. It is now redundant, as we make it at config time.
-
Alessandro Rubini authored
This is already in place for arch-unix, but is not working for arch-wrs because we need to look for the interface name before opening it. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
bug introduced in cc014e83 fsm: centralize checks on the frame Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This is old misc stuff that I rebased yesterday. Actually, I had more moves to fsm-lib, but some of it already moved to common-fun (which I dislike, but let's ignore the thing by now).
-
- Dec 01, 2016
-
-
Adam Wujek authored
update: include/libwr/sfp_lib.h include/libwr/util.h shmem.c util.c Signed-off-by:
Adam Wujek <adam.wujek@cern.ch>
-
Alessandro Rubini authored
This is another step in a general cleanup of the state machine. To help me knowning what is audited and what is not, I rename the "common functions" to fsm-lib. This is the management of announce. - master and slave functions were the same, so they are unified now - hooks->handle_annunce returns int (it may fail) Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
We check the frame length for the various message type in a single place, thus removing all checks around (that didn't cover all cases anyways). Also, we check for protocol version 2, something that we never did. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
This removes a number of explicit checks in the states themselves. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Adam Wujek authored
update: include/libwr/sfp_lib.h include/libwr/util.h shmem.c util.c Signed-off-by:
Adam Wujek <adam.wujek@cern.ch>
-
- Nov 21, 2016
-
-
Adam Wujek authored
On the switch, there is no need for the ppsi to use config file in the /wr/etc/ppsi.conf. Signed-off-by:
Adam Wujek <adam.wujek@cern.ch>
-
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
As a side effect, we get a reported "enter initializing" message when wrs has a link-up event (because in that case state-change is performed externally, not by a state that switches to another). Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Commit d2b2c636 introduced a caching of the current state structure. The "current" structure, as long as not null, is considered valid. arch-wrs, just sets ppi->state to initializing on link-up, without clearing the cached pointer, so fsm.c was using the old pointer, resulting in use of closed file descriptors, as no init was performed. This doesn't apply to change from withing the states themselves, as fsm.c manages the state change. As a side effect, now that we check the state numberm there's no need to zero the pointer on state leave. (And while a it another trivial detail...). Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Some arguments are not needed any more. Removed. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- Nov 04, 2016
-
-
Most arguments of net->send are redundant, as the ppi includes all info. In particular, chtype and "is_pdelay_addr" derive from the message type. And the timestamp is always internal. I chose not to remove message, len and msgtype because the message being sent includes the header (ppi->tx_offset), so there's some calculation to extract them. This may happen in a later commit, if I find that is a size improvement. Bugs fixed as a side effect: - the "if" for "is_pelay" missed PDELAY_RESP_F_UP (now it's in msgtype.c) - wrpc pdelay was always using the e2e mac address This commit decreases the size of all archs by 60 bytes, but increases wrpc by 20 bytes because of the fix above Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Most stuff in the header can be factorized. The commit does so. Some fixme's are removed (about correctionField for example) but we know they still apply. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
This was my fault. The initial time jump was based on "T4 + MPD". This on the assumption that T4 is sharper then time->get(). At least this is true for White Rabbit systems, where time->get() was not even correct when I started the project. As a result, the initial jump for a p2p slave was always wrong, because it referred to an old timestamp. We ended up a few hundreds ms off the master, to the start a long steering. We now add ofm to the current time, and the result is good in both case. WR systems have their own servo anyways, but even a slave to non-wr masters should behave well, because time->set now works. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
The idea that somebody wants to steer time for >1s offsets is perverse. Let's simplify (if any, we may want to jump for <1s offsets that are bigger than a few milliseconds). Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-