PPSi:a9373c900f91138f51476c2db521c437be33e221 commitshttps://ohwr.org/project/ppsi/commits/a9373c900f91138f51476c2db521c437be33e2212016-11-21T17:30:25Zhttps://ohwr.org/project/ppsi/commit/a9373c900f91138f51476c2db521c437be33e221simplify __send_and_log2016-11-21T17:30:25ZAlessandro Rubinirubini@gnudd.com
Some arguments are not needed any more. Removed.
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/faa87f7a1b2ca7fdb15797df4967c9cf5c3e29b3remove arguments to net->send; some fixes as side effect2016-11-04T09:15:44ZAlessandro Rubinirubini@gnudd.com
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: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/8f25cb18714a482c404417e8c79c859eb36fcc2ctrivial: remove redundant assignment2016-11-04T09:15:44ZAlessandro Rubinirubini@gnudd.comSigned-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/d1ecc9a1107dc02248821c8de7dcc3047dd63e76proto-standard/msg.c: factorize using msgtype_info2016-11-04T09:15:44ZAlessandro Rubinirubini@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: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/bd55f147ca40212c93b3bc00b26b21749f7ea642trivial: rename pack_header to init_header2016-11-04T09:15:44ZAlessandro Rubinirubini@gnudd.comSigned-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/5874cdfefad6b97f42375f934bdbee4276260796general: add a msgtype array for type-specific information2016-11-04T09:15:44ZAlessandro Rubinirubini@gnudd.comSigned-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/d2a5702327d25b00d448e3fb5ca846002310933astd-servo: fix initial jump for p2p slaves2016-11-04T09:15:44ZAlessandro Rubinirubini@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: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/d633d167b1a89c361631d21e23765e9219634acfaudit: remove needless '-x' FLAG_NO_RESET2016-11-04T09:15:44ZAlessandro Rubinirubini@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: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/e5ddf2cc0b28485883c1a0630adf962a48172609trivial: remove a function emptied by previous commit2016-11-04T09:15:44ZAlessandro Rubinirubini@gnudd.comSigned-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/60d1358e434d4e2734e3a2dcaa40cc6aea1ab81faudit: remove unused max_dly parameter2016-11-04T09:15:44ZAlessandro Rubinirubini@gnudd.comSigned-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/6de8d4d40a9a734cc4bb9f007b17f2b9b46d3297audit: remove unsed max_rst parameter2016-11-04T09:15:44ZAlessandro Rubinirubini@gnudd.comSigned-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/be01acb053d952e5e5911c6e4385b581a3fd55c0std-servo: don't run PI if we jump seconds2016-11-04T09:15:44ZAlessandro Rubinirubini@gnudd.com
The reshaping for pdelay broke the idea that if the offset is more
than one second we don't run the PI at all (to avoid effects of the I
part after the jump).
This restores the early-exit from the servo when a jump in time happens.
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/4be630a353a018924b280f929be85f324a49c9decleanup: msg.c: all pack return int, for consistency.2016-11-04T09:15:44ZAlessandro Rubinirubini@gnudd.com
Also, two functions that were needlessly public are now static.
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/ed3107cb9db2f05fef73867bd5ec421208a51ec6audit: msg.c: cleanup pack functions2016-11-04T09:15:44ZAlessandro Rubinirubini@gnudd.com
This commit assumes that "transportSpefic" in header byte 0 and
"reserved" in header byte 1 are always 0. Thus, it removes unneeded
bitmasking and while at it uses names for message types. It also
removes redundant assignments and adds a few missing ones.
The commit simplifies all the "pack" functions; it makes them
consistent by setting all header fields in transmit order, and marking
unclean spots (i.e. correctionField assignment).
Buglets fixed in the process;
- correctionField was not cleared in follow_up
- pdelay_resp_f_up was using the wrong length name
- pdelay_resp_f_up was not setting controlField and logMessageInterval
- delay_req was not clearing flags
- pdelay_req was not blanking the trailing bytes
- pdelay_resp was not setting controlField and logMessageInterval
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/81b8db7d1f08611923a9e6569ea9f334f70b8b74trivial: msg.c: fix references to tables2016-11-04T09:15:44ZAlessandro Rubinirubini@gnudd.comSigned-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/8d12b26df302fa1ad99fdb08e67f5c4b7e1a6574time-wrs: clear struct hwtstamp_config before SIOCSHWTSTAMP ioctl2016-11-03T16:15:10ZAdam Wujekadam.wujek@cern.ch
This commit is required to uplift a wr-switch kernel version
Since the kernel commit
850a545bd net: validate HWTSTAMP ioctl parameters
Follows: v3.1-rc9
Precedes: v3.2-rc1
SIOCSHWTSTAMP ioctl check whether field "flags" of struct hwtstamp_config
is empty, otherwise ioctl returns -EINVAL
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9297"><a href="https://ohwr.org/awujek" title="adam.wujek@cern.ch"><img alt="Adam Wujek's avatar" src="https://secure.gravatar.com/avatar/bee62ad02d8f8c7c40900167722fb9d3?s=32&d=identicon" class="avatar s16 avatar-inline" title="Adam Wujek"></a><a href="https://ohwr.org/awujek" title="adam.wujek@cern.ch">Adam Wujek</a> <<a href="mailto:adam.wujek@cern.ch" title="adam.wujek@cern.ch">adam.wujek@cern.ch</a>></span>https://ohwr.org/project/ppsi/commit/6f9508cfb22a78f00fab8db6ff2e6c84441dcb3aarch-wrs: hal_shmem version to 102016-11-03T16:15:10ZAdam Wujekadam.wujek@cern.ch
Update sfp_lib.h and hal_shmem.h to support diagnostics (DOM) in SFPs.
Changes not affecting PPSI code.
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9297"><a href="https://ohwr.org/awujek" title="adam.wujek@cern.ch"><img alt="Adam Wujek's avatar" src="https://secure.gravatar.com/avatar/bee62ad02d8f8c7c40900167722fb9d3?s=32&d=identicon" class="avatar s16 avatar-inline" title="Adam Wujek"></a><a href="https://ohwr.org/awujek" title="adam.wujek@cern.ch">Adam Wujek</a> <<a href="mailto:adam.wujek@cern.ch" title="adam.wujek@cern.ch">adam.wujek@cern.ch</a>></span>https://ohwr.org/project/ppsi/commit/3ece12b3824d42910145fe0fa622d00cac1597efproto-ext-whiterabbit: increase WRS_PPSI_SHMEM_VERSION2016-11-03T15:28:54ZAdam Wujekadam.wujek@cern.ch
There were many changes to the ppsi structures in few previous commits.
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9297"><a href="https://ohwr.org/awujek" title="adam.wujek@cern.ch"><img alt="Adam Wujek's avatar" src="https://secure.gravatar.com/avatar/bee62ad02d8f8c7c40900167722fb9d3?s=32&d=identicon" class="avatar s16 avatar-inline" title="Adam Wujek"></a><a href="https://ohwr.org/awujek" title="adam.wujek@cern.ch">Adam Wujek</a> <<a href="mailto:adam.wujek@cern.ch" title="adam.wujek@cern.ch">adam.wujek@cern.ch</a>></span>https://ohwr.org/project/ppsi/commit/f86618f41e77499bbfb85a1a52f3e4724228d106pdelay bugfix: increment sequence number of pdelay request2016-10-25T14:23:04ZAlessandro Rubinirubini@gnudd.com
bug introduced in <a href="/project/ppsi/commit/4126868c9f75b9dbf4ca85eb479ce8b3e981a84a" data-original="4126868c" data-link="false" data-link-reference="false" data-project="10763" data-commit="4126868c9f75b9dbf4ca85eb479ce8b3e981a84a" data-reference-type="commit" data-container="body" data-placement="bottom" title="pdelay/msg: add pdelay request msg" class="gfm gfm-commit has-tooltip">4126868c</a>, we were incrementing the delay-request
sequence number instead of ours.
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/8565d01a6559be31b92c20e71731248838f9d100proto-standard: __send_and_log is not inline any more2016-10-25T12:52:24ZAlessandro Rubinirubini@gnudd.com
The function has gone big over time, it's better not inline any more.
The change saves 230 byte in wrpc builds.
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/9d1e8e9ea813a10a5183238f93eaf30a2cce3ef3trivial: remove unused define2016-10-25T12:52:24ZAlessandro Rubinirubini@gnudd.comSigned-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/7d10c34187f8e30d9bfb32942481136cb2d29c34trivial: remove unsed in/outbound_latency2016-10-25T12:52:24ZAlessandro Rubinirubini@gnudd.com
While it may make sense to setup constant delay somewhere (for WR we
define them, for instance), the legacy implementation was unused and
wrong.
Unused because nobody sets it (even if we could do it in the config
file). Wrong because inbound is never used, and both are global and
not per-port.
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/5e0e5a623675d50ec56514d51f87a8a348818032general: make delay mechanism configurable and fix defaults2016-10-25T12:52:24ZAlessandro Rubinirubini@gnudd.com
Now this is the behaviour for the choice:
arch-bare-*
if you select P2P, it's built and selected. Default is E2E_ONLY.
arch-sim
arch-unix
arch-wrs
The P2P is built by default configuration, and the mechanism
is selected at configuration time. Default is E2E. If you
choose E2E_ONLY and configure pdelay, it will ignore the config.
(Suboptimal but I'm lazy: do *not* use E2E_ONLY for those archs.
arch-wrpc
The default is e2e until changed at run time.
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/8699f7d5ffacf086ba454a8ad23d2831cbc1b6ccgeneral: move delay mechanism from global to per-port2016-10-25T12:52:24ZAlessandro Rubinirubini@gnudd.comSigned-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/c07764dde5c2be1e012ad88b71e2ad99dc66b2datrivial: Kconfig: remove two wrong lines with no effect2016-10-25T12:52:24ZAlessandro Rubinirubini@gnudd.comSigned-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/39ca8a68fa25ff04c8ba667fe5355a94dcc736e8Merge branch 'adam-shmem'2016-09-30T09:29:35ZAdam Wujekadam.wujek@cern.ch
Uplift shmem from wr-switch-sw repo.
Fix previous uplift of shmem and improve debug printout.
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9297"><a href="https://ohwr.org/awujek" title="adam.wujek@cern.ch"><img alt="Adam Wujek's avatar" src="https://secure.gravatar.com/avatar/bee62ad02d8f8c7c40900167722fb9d3?s=32&d=identicon" class="avatar s16 avatar-inline" title="Adam Wujek"></a><a href="https://ohwr.org/awujek" title="adam.wujek@cern.ch">Adam Wujek</a> <<a href="mailto:adam.wujek@cern.ch" title="adam.wujek@cern.ch">adam.wujek@cern.ch</a>></span>https://ohwr.org/project/ppsi/commit/669743b99916006aa327910ca2bee5856e728265arch-wrs: printout more details when wrs_shm_write is called2016-09-30T09:27:36ZAdam Wujekadam.wujek@cern.ch
Commit based on the commit from wrs-switch-sw described below.
userspace/libwr: printout more details when wrs_shm_write is called
It might be usefull to know whether caller wanted to lock or unlock the shmem
and which shmem.
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9297"><a href="https://ohwr.org/awujek" title="adam.wujek@cern.ch"><img alt="Adam Wujek's avatar" src="https://secure.gravatar.com/avatar/bee62ad02d8f8c7c40900167722fb9d3?s=32&d=identicon" class="avatar s16 avatar-inline" title="Adam Wujek"></a><a href="https://ohwr.org/awujek" title="adam.wujek@cern.ch">Adam Wujek</a> <<a href="mailto:adam.wujek@cern.ch" title="adam.wujek@cern.ch">adam.wujek@cern.ch</a>></span>https://ohwr.org/project/ppsi/commit/18b0f27d914bba6965b82ffa311428f644a9516aarch-wrs: in shmem, use pointers to structs intead of void pointers2016-09-30T09:25:58ZAdam Wujekadam.wujek@cern.ch
Commit based on the commit from wrs-switch-sw described below.
Apply changes to the arch-wrs/wrs-startup.c to follow declaration change of
wrs_shm_alloc.
userspace/libwr: in shmem, use pointers to structs intead of void pointers
In shared memory functions take as parameters pinters to structures instead
of void pointers. By this compiler will warn when wrong type of pointer is
passed. For example when pointer to the data in shmem is passed instead of
pointer to the header.
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9297"><a href="https://ohwr.org/awujek" title="adam.wujek@cern.ch"><img alt="Adam Wujek's avatar" src="https://secure.gravatar.com/avatar/bee62ad02d8f8c7c40900167722fb9d3?s=32&d=identicon" class="avatar s16 avatar-inline" title="Adam Wujek"></a><a href="https://ohwr.org/awujek" title="adam.wujek@cern.ch">Adam Wujek</a> <<a href="mailto:adam.wujek@cern.ch" title="adam.wujek@cern.ch">adam.wujek@cern.ch</a>></span>https://ohwr.org/project/ppsi/commit/0920900666c8b4f969adf3fc8c37fc7241e0b684arch-wrs: fix commit "improve locking of shmem"2016-09-30T09:03:30ZAdam Wujekadam.wujek@cern.ch
The commit:
<a href="/project/ppsi/commit/15076cb6b1b82ebb1752baeec2d24d8018f1d276" data-original="15076cb6" data-link="false" data-link-reference="false" data-project="10763" data-commit="15076cb6b1b82ebb1752baeec2d24d8018f1d276" data-reference-type="commit" data-container="body" data-placement="bottom" title="arch-wrs: improve locking of shmem" class="gfm gfm-commit has-tooltip">15076cb6</a> arch-wrs: improve locking of shmem
didn't fully apply the patch from the wr-switch repo.
This commit apply changes to arch-wrs/shmem.c that were missed
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9297"><a href="https://ohwr.org/awujek" title="adam.wujek@cern.ch"><img alt="Adam Wujek's avatar" src="https://secure.gravatar.com/avatar/bee62ad02d8f8c7c40900167722fb9d3?s=32&d=identicon" class="avatar s16 avatar-inline" title="Adam Wujek"></a><a href="https://ohwr.org/awujek" title="adam.wujek@cern.ch">Adam Wujek</a> <<a href="mailto:adam.wujek@cern.ch" title="adam.wujek@cern.ch">adam.wujek@cern.ch</a>></span>https://ohwr.org/project/ppsi/commit/1edcf5c4dd26bb9ab107f2e8386d588f196fda6bstate-master: turn switch() to actions[]2016-09-20T07:36:23ZAlessandro Rubinirubini@gnudd.com
This shrinks p2p builds by 100 bytes, but increases by 100 bytes
the wrpc defconfig (the one withouth P2P code).
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/7a80b4b1ae5bda942c5ad72727858cfc2a269754state-master: unify master and pre-master2016-09-20T07:36:23ZAlessandro Rubinirubini@gnudd.com
This saves 50 bytes in wrpc-sw (and more in x86 builds)
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/8c1dfbcdc6559c50cdbb0b06de6ea96fa80bddb7SQUASH in '14cacab: shorten'2016-09-20T07:36:23ZAlessandro Rubinirubini@gnudd.comSigned-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/3542ae485f04e6677906c7524d2a0ec0df286811Support E2E build without P2P. Saves 5kB in wrpc-sw2016-09-20T07:36:20ZAlessandro Rubinirubini@gnudd.com
Here in ppsi,
./MAKEALL wrpc_defconfig wrpc_pdelay_defconfig
shows a very small difference, but most pdelay code is then
discarded by the wrpc-sw link time, due to --gc-sections.
This is the result:
laptopo% ./MAKEALL spec_defconfig spec_pdelay_defconfig
##### Building with 'spec_defconfig'
/opt/lm32-gcc-4.5.3/bin/lm32-elf-ar: creating libsdbfs.a
text data bss dec hex filename
87688 3492 6352 97532 17cfc wrc.elf
##### Building with 'spec_pdelay_defconfig'
/opt/lm32-gcc-4.5.3/bin/lm32-elf-ar: creating libsdbfs.a
text data bss dec hex filename
93140 3492 6360 102992 19250 wrc.elf
What is missing now is the run-time choice between e2e and p2p. Later....
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/687d84324d26bce446081a4998f091413c23a313config: prepare for an e2e build with no p2p code inside2016-09-20T07:35:53ZAlessandro Rubinirubini@gnudd.com
There is a size problem in wrpc-sw, when built with SNMP inside, so
some users, notably CERN, want to avoid the pdelay code (allegedly 7kB
in the binary).
Users who need pdelay don't actually run SNMP, so they don't have the
size problem. This new setup allows a wrpc-sw without pdelay-related
code. Wrpc with both mechanisms built in will be run-time configurable.
the wrs and unix configurations for peer delay are removed, because
for those architecture the choice is going to be performed at run time,
in the configuration file.
Please note that this commit is config-only, no code yet is there.
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/a6114e99eefa6c4a779820dfe99a74986573c8c1state-slave: turn switch() to actions[]2016-09-20T07:35:53ZAlessandro Rubinirubini@gnudd.com
Using a data-driven approach to manage incoming frames is definitely
cleaner and clearer. It even has a (very minor) size reduction for wrpc.
I plan to use this approach overall, as time permits.
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/29b77da9c9c1c48c34f4bc0fa5dec48252287085bugfix/workaround: unix-socket: disable settings for UDP/pdelay2016-09-20T07:35:53ZAlessandro Rubinirubini@gnudd.com
This won't work, because packets must be sent to two different
IP multicast addresses. This is not supported. The code being disabled
had the effect of setting the pdelay destination for all frames, even
for E2E runs.
This fixes E2E UDP operation, leaving P2P broken as it was.
Signed-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/ca2443b233de459f589f8e2e188bce9bd66206e7trivial: shorten a long symbolic name2016-09-20T07:35:53ZAlessandro Rubinirubini@gnudd.comSigned-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/ca26578ff8bd1dc6bc69a3ccaf6ea93ca2cfc8dftrivial: fold pre-master.c into master.c2016-09-20T07:35:53ZAlessandro Rubinirubini@gnudd.comSigned-off-by: <span data-trailer="Signed-off-by:" data-user="9028"><a href="https://ohwr.org/rubini" title="rubini@gnudd.com"><img alt="Alessandro Rubini's avatar" src="https://secure.gravatar.com/avatar/18e4fb369cda4873020839db5911d1d1?s=32&d=identicon" class="avatar s16 avatar-inline" title="Alessandro Rubini"></a><a href="https://ohwr.org/rubini" title="rubini@gnudd.com">Alessandro Rubini</a> <<a href="mailto:rubini@gnudd.com" title="rubini@gnudd.com">rubini@gnudd.com</a>></span>https://ohwr.org/project/ppsi/commit/4f221227331f5b3512f9ef80594d29e5593fd231compliance, 11.4.3 b: peer-delay, fix support for 1-step2016-09-20T07:35:53ZDavide Ciminaghiciminaghi@gnudd.com
If no follow-up is to be received, we trigger pp_servo_got_presp()
on reception of peer delay response.https://ohwr.org/project/ppsi/commit/c7627fa8cdfe0c8de7e0fd7ebb628233a4b6db90compliance, 9.5.2.3: discard announces coming from same clock.2016-09-20T07:35:53ZDavide Ciminaghiciminaghi@gnudd.com
In this case we also possibly have switch to port state to PASSIVE.