- 31 Jan, 2017 5 commits
-
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com> Conflicts: time-bare/bare-socket.c
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Commit only build for arch-unix (and no tools either) This simplifies a lot the calculations. - all times are now living in a single structure - all fields are signed and 64-bit long - the 2038 bug is over (we still had 32-bit seconds) - no overflow in math or unexplained "unsigned" appearing Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Adam Wujek authored
Saves ~150 bytes Signed-off-by:
Adam Wujek <adam.wujek@cern.ch>
-
- 17 Jan, 2017 1 commit
-
-
Alessandro Rubini authored
If we warn about an ignored frame we'd better tell which one. Also, if it's the hook->servo that ate it, do not warn. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- 13 Jan, 2017 2 commits
-
-
Alessandro Rubini authored
Building with musl was spitting errors for redefined data structures. Use the standard headers when available (I found not alternatives to linux/if_packet.h, but it spits no error). Then, ifr.ifr_data is "caddr_t" not "void *" in musl, so cast the pointer being assigned to silent a warning. Finally, the fields of udphdr in musl use different names unless wi add _GNU_SOURCE -- most likely musl is more posixly-correct, I didn't check. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- 15 Dec, 2016 1 commit
-
-
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>
-
- 12 Dec, 2016 1 commit
-
-
Adam Wujek authored
Signed-off-by:
Adam Wujek <adam.wujek@cern.ch>
-
- 07 Dec, 2016 3 commits
-
-
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>
-
Grzegorz Daniluk authored
Otherwise it breaks Minipc and wr_mon cannot start.
-
- 03 Dec, 2016 3 commits
-
-
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>
-
- 02 Dec, 2016 7 commits
-
-
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).
-
- 01 Dec, 2016 7 commits
-
-
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>
-
- 21 Nov, 2016 8 commits
-
-
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>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
Alessandro Rubini authored
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>
-
Alessandro Rubini authored
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>
-
Alessandro Rubini authored
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>
-
Alessandro Rubini authored
Some arguments are not needed any more. Removed. Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-
- 04 Nov, 2016 2 commits
-
-
Alessandro Rubini authored
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>
-
Alessandro Rubini authored
Signed-off-by:
Alessandro Rubini <rubini@gnudd.com>
-