Commit Graph

1265 Commits (3f2e73e91bc2a3ac064898a3b7f19847f38e5695)

Author SHA1 Message Date
Richard Cochran 831f7e073b config: Constify the public interface.
The two methods, config_create_interface and config_read, never modify the
strings passed in.  This patch adds the const keyword to ensure these
functions stay that way.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
2020-03-04 09:43:31 -08:00
Richard Cochran b8480ef908 Group related objects together within the makefile.
Any program that links to the servo interface must also link with the
implementations of that interface.  Similarly, the filter and network
transport interfaces each require their implementations.  This patch
re-factors the makefile to reflect this fact in order to simplify
adding new programs making use of these interfaces.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Reviewed-by: Jacob Keller <jacob.e.keller@intel.com>
2020-03-04 09:43:25 -08:00
Erik Hons a380afc482 clock: reset master/local rr when best clock id changes
This fixes an issue with free running clocks. When the master clock id
changes the measured master/local ratio should be reset. If it isn't,
and the local clock becomes master, then the last measured ratio to
the old master continues to be used in peer delay calculations. If a
bad master/local ration calculation triggers this state change the
port can get "stuck" in not "asCapable" mode.

Signed-off-by: Erik Hons <erik.hons@ni.com>
2020-02-09 04:34:43 -08:00
Miroslav Lichvar ee6930a884 unicast: Enable sharing master tables between ports.
Don't require each port to have its own master table specified in the
config. Instead of ports claming configured tables, clone the table in
each port, so different ports don't interfere with each other.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2020-02-09 04:20:08 -08:00
Richard Cochran 581a6bd59b Accept external PHC devices from the command line.
A single, external PTP Hardware Clock device may be wired to one or more
MAC devices, providing the MACs with an input clock.  This patch adds
support for such a hardware architecture by letting the command line PHC
override the one discovered via the ethtool ioctl.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2020-02-08 07:31:14 -08:00
Richard Cochran e0580929f4 phc2sys: Fix frequency estimation when synchronizing a PHC to the system clock.
When synchronizing a PHC to the Linux system clock (CLOCK_REALTIME),
the phc2sys uses the sysoff method, reversing the master and slave
roles.

The offset between a master clock and a slave clock is given by

    offset = slave_ts - master_ts,

and the call to sysoff_measure() provides the 'offset' and 'slave_ts'
values.  The needed local time stamp on the 'master' is given by

    master_ts = slave_ts - offset,

but the code calcuates

    master_ts = slave_ts + offset.

When passed to the servo, the local time stamp is used to estimate the
frequency offset between the two clocks before starting the main
synchronization loop.  The effect of the bug may be seen with a simple
test.  Here is a sample output with the existing code.

    $ sudo testptp -d /dev/ptp1 -f 62400000
    frequency adjustment okay
    $ sudo ./phc2sys -m -q -c eth6 -s CLOCK_REALTIME -O0
    phc2sys[90221.239]: eth6 sys offset 191001318 s0 freq -62400000 delay   5547
    phc2sys[90222.239]: eth6 sys offset 253380897 s1 freq  +8265884 delay   5507
    phc2sys[90223.239]: eth6 sys offset  -8301685 s2 freq    -35801 delay   5487
    phc2sys[90224.239]: eth6 sys offset  -8297136 s2 freq  -2521757 delay   5531
    phc2sys[90225.239]: eth6 sys offset  -5806117 s2 freq  -2519879 delay   5542
    phc2sys[90226.239]: eth6 sys offset  -3317009 s2 freq  -1772606 delay   5495
    phc2sys[90227.240]: eth6 sys offset  -1575231 s2 freq  -1025931 delay   5505
    phc2sys[90228.240]: eth6 sys offset   -580249 s2 freq   -503518 delay   5524
    phc2sys[90229.240]: eth6 sys offset   -107770 s2 freq   -205114 delay   5519
    phc2sys[90230.240]: eth6 sys offset     66298 s2 freq    -63377 delay   5490
    phc2sys[90230.881]: eth6 sys offset     86942 s2 freq    -22844 delay   5495

And this is the output with the bug fix in place.

    $ sudo testptp -d /dev/ptp1 -f 62400000
    frequency adjustment okay
    $ sudo ./phc2sys -m -q -c eth6 -s CLOCK_REALTIME -O0
    phc2sys[90365.624]: eth6 sys offset 311912675 s0 freq -62400000 delay   5490
    phc2sys[90366.624]: eth6 sys offset 374292766 s1 freq  -31098 delay   5642
    phc2sys[90367.624]: eth6 sys offset     -3825 s2 freq  -34923 delay   5617
    phc2sys[90368.625]: eth6 sys offset         6 s2 freq  -32240 delay   5564
    phc2sys[90369.625]: eth6 sys offset      1241 s2 freq  -31003 delay   5605
    phc2sys[90370.625]: eth6 sys offset      1131 s2 freq  -30741 delay   5600
    phc2sys[90371.625]: eth6 sys offset       801 s2 freq  -30732 delay   5621
    phc2sys[90372.625]: eth6 sys offset       458 s2 freq  -30834 delay   5640
    phc2sys[90373.626]: eth6 sys offset       186 s2 freq  -30969 delay   5598
    phc2sys[90374.626]: eth6 sys offset       134 s2 freq  -30965 delay   5599
    phc2sys[90375.626]: eth6 sys offset        43 s2 freq  -31016 delay   5595
    phc2sys[90375.681]: eth6 sys offset       -32 s2 freq  -31078 delay   5541

This patch fixes the issue by correcting the calculation of the local
time stamp value.

Fixes: 8142da41b6 ("phc2sys: Use reversed sysoff when synchronizing to system clock.")
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
Reported-by: Cliff Spradlin <cspradlin@google.com>
Tested-by: Vladimir Oltean <olteanv@gmail.com>
2019-12-25 10:26:04 -08:00
Richard Cochran a920c13413 Correct the signature of the legacy system offset measurement method.
The sysoff_measure() function gained an additional parameter some time
ago, but the legacy method for older kernels without PTP_SYS_OFFSET was
overlooked.  This patch brings the legacy method up to date again.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2019-12-25 10:25:59 -08:00
Miroslav Lichvar e20d8228f9 port: Avoid calling freed servo after switching PHC.
In port_synchronize(), when the clock returned SERVO_UNLOCKED and
port_dispatch() triggered a switch of the PHC, the variable "s" would
point to a servo which was already freed and the following call of
servo_offset_threshold() would read invalid memory.

Don't save the servo before dispatching the port.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Fixes: 3f5f5653d7 ("port: Add interval update mechanism.")
2019-10-12 20:42:58 -07:00
Miroslav Lichvar f9e84e69bf port: Don't leak transport when unicast initialization fails.
[RC: Fix two more bad goto labels. ]

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2019-10-12 20:40:44 -07:00
Petr Machata 7985634179 pmc: Support querying TLV_PORT_PROPERTIES_NP
TLV_PORT_PROPERTIES_NP messages serve for querying of port properties, such
as timestamp type and, prominently, netdevice name associated with the
port. pmc however does not support this query, which makes it difficult to
access this information e.g. from scripts. Add this support to pmc.

Signed-off-by: Mykola Zhuravel <mykola@mellanox.com>
Signed-off-by: Petr Machata <petrm@mellanox.com>
2019-10-12 19:42:42 -07:00
Petr Machata f9f00d8fe8 util: Add a function to render timestamp type
TLV_PORT_PROPERTIES_NP carries, among other attributes, a timestamp type
used for that port. In order to make it possible to format the value for
user consumption, introduce a new function ts_str().

Signed-off-by: Petr Machata <petrm@mellanox.com>
2019-10-12 19:42:42 -07:00
Petr Machata 48e605ef01 pmc.8: Mention PORT_STATS_NP
In commit 2b5bec8d27 ("pmc: Add a new TLV to obtain per-port
statistics"), pmc gained a new TLV to obtain port stats from ptp4l. Mention
the TLV in the pmc man page.

Signed-off-by: Petr Machata <petrm@mellanox.com>
2019-09-11 21:32:48 -07:00
Petr Machata a48666bee3 udp6: Make mc6_addr transport-local
mc6_addr holds the parsed multicast address to which messages should be sent.
But since each port can have a different scope, and the primary MC address
depends on the scope, it really can't be stored in a global variable. Move both
to struct udp6.

Additionally, document the fact that the primary multicast address is changed at
runtime.

Reported-by: Alex Veber <alexve@mellanox.com>
Signed-off-by: Petr Machata <petrm@mellanox.com>
2019-09-10 20:56:30 -07:00
Petr Machata 2b5bec8d27 pmc: Add a new TLV to obtain per-port statistics
Add an ability of pmc to query per-port stats added in the previous patch.

Signed-off-by: Petr Machata <petrm@mellanox.com>
2019-09-10 20:56:30 -07:00
Petr Machata e3f0891996 port: Introduce per-port stats for received and transmitted messages
Add struct PortStats to keep per-port number of messages sent and received,
split by message type. Bump TX counters after messages are sent
successfully, and RX counters after a message is received. To keep things
simple, reserve one counter for each theoretically possible message type,
including the reserved ones.

Signed-off-by: Petr Machata <petrm@mellanox.com>
2019-09-10 20:56:30 -07:00
Richard Cochran d32758aa09 phc2sys, phc_ctl: Re-factor common code.
The two programs, phc2sys and phc_ctl, use nearly identical subroutines to
open an instance of a dynamic posix clock.  In anticipation of yet a third
program with similar needs, this patch refactors the common code into the
utilities.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2019-08-25 12:19:36 -07:00
Richard Cochran 46b673792a Keep configuration options in alphabetical order.
The order of the options list has gone a bit astray.  This patch
restores the ordering.

Fixes: 450b1ed844 ("port: Add inhibit_delay_req.")
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2019-08-19 08:37:23 -07:00
Vladimir Oltean 68337acd10 configs: default.cfg: Fix typo in inhibit_delay_req
ptp4l -f default.cfg complains:

  unknown option inhibit_pdelay_req at line 41 in global section
  failed to parse configuration file /etc/linuxptp/default.cfg

Fixes: 450b1ed844 ("port: Add inhibit_delay_req.")
Signed-off-by: Vladimir Oltean <olteanv@gmail.com>
2019-08-19 08:30:01 -07:00
Khor, Isaac Shi Yan c15e8c7600 ptp4l: Add configuration option for socket priority
Users may need to use different socket priorities for ptp4l traffic for
the purpose of traffic shaping. An example is to route ptp4l traffic
through a specific Linux egress queue using the mqprio qdisc.

 - Update raw.c open_socket() to accept a socket_priority parameter
 - Add the socket_priority option to config.c and the default.cfg config
   file. The option defaults to 0.

CC: "Ong, Boon Leong" <boon.leong.ong@intel.com>
CC: "Wong, Vincent Por Yin" <vincent.por.yin.wong@intel.com>
Signed-off-by: Khor, Isaac Shi Yan <isaac.shi.yan.khor@intel.com>
2019-08-06 21:07:21 -07:00
Hubert Feurstein f2aac1b30e clock: prepend port number to grandmaster notice
Signed-off-by: Hubert Feurstein <h.feurstein@gmail.com>
2019-08-06 21:07:21 -07:00
Petr Machata ba3705a0f0 sk: Recognize HWTSTAMP_FILTER_SOME
struct hwtstamp_config.rx_filter passed to SIOCSHWTSTAMP can be updated by
the kernel with the value of HWTSTAMP_FILTER_SOME. That indicates that all
requested packets will be timestamped, and some others as well.

Update hwts_init() to recognize this as a valid response in HWTS_FILTER_NORMAL
mode, instead of rejecting it as mismatch.

Cc: "Keller, Jacob E" <jacob.e.keller@intel.com>
Cc: "Geva, Erez" <erez.geva.ext@siemens.com>
Signed-off-by: Petr Machata <petrm@mellanox.com>
2019-07-05 20:44:18 -07:00
Miroslav Lichvar 40e5868e66 pmc: Describe -f option in man page.
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2019-07-05 20:41:11 -07:00
Miroslav Lichvar 3962f63841 nsm: Add man page.
Add a man page for the nsm program based on the pmc man page.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2019-07-05 20:41:11 -07:00
Miroslav Lichvar 27657d0118 Improve G.8275.[12] example configs.
Set the announce, sync and delay request intervals in the example
configs per the G.8275.1 and G.8275.2 recommendations. Enable the L2
transport in G.8275.1.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2019-07-05 20:29:19 -07:00
Hangbin Liu 268be957d2 rtnl: add team activebackup support
This patch add team interface activebackup mode support. As linux team use
genl netlink message, when we get a rtnl link change notify, we have to setup
a new genl socket and request the current active port.

v2: check nlmsg_len before copy rta_data
v3: a) Do not make rtnl_buf global as it may be freed by calling rtnl_close()
       while we are using it in rtnl_link_status()
    b) Reorder declarations of variables as reversed Christmas tree for
       function rtnl_link_status()
    c) remove rtnl_len
v4: Remove the first !rtnl_buf check in rtnl_link_status as it's alway true
v5: a) Re-order {nl, rtnl}_open and add function nl_close()
    b) revert the v3_{a,c}, v4 changes, use nl_close to close genl fd
    c) do not use len in get_team_active_iface() as it may mislead reader
v6: Return index at the end to fix fd leak in get_team_active_iface()

Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
2019-07-05 20:08:41 -07:00
Vedang Patel 450b1ed844 port: Add inhibit_delay_req.
Add provision to disable delay requests. Designated masters who do not
need to calculate pdelay can use this option. This is required by
Automotive Profile to reduce network load.

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
2019-05-08 21:29:48 -07:00
Vedang Patel 3f5f5653d7 port: Add interval update mechanism.
This commit adds functionality to increase the sync and pdelay request
intervals once gptp synchronization has been achieved. This is useful
while running Automotive Profile where the network is usually static.

Here, we are assuming that the gPTP synchronization is achieved whenever
the last 'n' offsets calculated using the Sync messages are below a
certain threshold. Both, the number of offsets to consider and the offset
threshold are configurable.

In order to support the interval update, a new clock servo state
CLOCK_SERVO_STABLE has been added. The clock will transition to this
state whenever the above condition is satisfied. When this transition
occurs, the slave will send an "interval request" signaling message
asking the master to change the sync interval. It will also update the
pdelay request interval locally.

Four new config options have been added to provide this functionality:

- servo_offset_threshold: All the offset values being considered should
  be below this value.
- servo_num_offset_values: number of previously received offset values
  to consider.
- operLogSyncInterval: slave will ask the master to switch to this
  interval for sending sync messages when the offset stabilizes.
- operLogPdelayReqInterval: the slave will set this interval for pdelay
  request messages when the offset stabilizes.

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
2019-05-08 21:29:48 -07:00
Vedang Patel 78b4b780da clock: add APIs to access servo and servo_state
Make servo and it's current state available outside clock.c

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
2019-05-08 21:29:48 -07:00
Vedang Patel 630ce719fc port: implement message interval request processing
This implements transmission and receipt of message interval requests.
Using this mechanism, a time-aware device can request change in sync,
link delay and announce intervals on the device connected on the other
end.

As part of the commit, we are also saving the initial values of Announce
and Sync Interval.

For more information look at sections 10.2.4.4, 10.3.9.5, 10.3.14, 10.4,
10.5.4 and 11.2.17 of 802.1AS standard

Please note that this commit does not implement logic related to
computeNeighborRateRatio and computeNeighborPropDelay flags mentioned in
Section 10.5.4.3.9 of 802.1AS Standard.

[ RC - memset the targetPortIdentity to all ones. ]

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2019-05-08 21:29:29 -07:00
Vedang Patel 888afcdbae port: Add logPdelayReqInterval.
It will be used to store the current value of Pdelay Request Interval.
It will be represented as power of two in seconds.

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
2019-05-08 21:29:29 -07:00
Vedang Patel 43085ab741 port: Separate unicast specific code from port_signaling_construct()
Make port_signaling_construct() to create a generic signaling
ptp_message. Move the unicast specific code to
port_signaling_uc_construct().

This is done to support the creation of Message Interval Request TLV (as
defined in 802.1AS Section 10.5.4.3). This TLV can be used to request
change in Announce Interval, Sync Interval or Link Delay Interval on a
remote system.

[ RC - fix trivial rebase conflict on top of targetPortIdentity check. ]

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2019-05-08 21:28:56 -07:00
Vedang Patel 705e5a32fa port: Make port_capable() accessible outside port.c
Make sure port_capable() can be accessed by the signaling construct in
port_signaling.c

Signed-off-by: Vedang Patel <vedang.patel@intel.com>
2019-05-08 21:21:30 -07:00
Richard Cochran b59a739d0f Ignore signaling messages on target port mismatch.
IEEE 1588 specifies dropping signaling messages if the
targetPortIdentity does not match the receiving port.  Up until now
the unicast code did check that field, but only for the unicast
transmission request and cancel operations.

This patch moves the target port identity check so that it applies to
each and every received signaling message.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2019-05-08 21:21:24 -07:00
Richard Cochran cc54cdef27 Update the unciast discovery options sections of the man page.
Ever since commit d88b4ff229 ("util: Added IPv6 support in help
funtions addreq and str2addr"), the unicast master table supports
entries with IPv6 addresses.  This patch updates the man page to
reflect this fact.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2019-05-08 21:19:08 -07:00
Miroslav Lichvar dd30b3a0d9 util: Fix addreq() to not read past addresses.
Fix the length of compared data to be the size of the IPv4/IPv6 address.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2019-03-25 06:25:07 -07:00
Miroslav Lichvar 86723cfc6a pmc: Don't leak memory when msg_tlv_append() fails.
Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2019-03-25 06:25:07 -07:00
Hangbin Liu 51d76bdfb7 port: should check the new phc_index before switching
In logic, when we want to switch phc, we should check if the new phc
index is valid instead of checking the previous one.

In reality, if we use linux team interface with activebackup mode. As
teamd is a userspace tool, it sets the new slave as active port after
receiving link change message. If we set current active port down and
another slave up. There is a race that we receive the new slave's link
up message while active port(ts_index) is still the old one. This means
we may use a link down interface as ts_index and get phc_index with -1.

If we update the p->phc_index to -1, there will be no possibility to
change it back to other value as we swith phc only when p->phc_index >= 0.

With this fix, we will not switch phc_index until receiving the real
active port(p->iface->ts_info.phc_index >= 0) update message.

Reported-by: Miroslav Lichvar <mlichvar@redhat.com>
Fixes: 536a71031d ("ptp4l: use ts label to get ts info")
Signed-off-by: Hangbin Liu <liuhangbin@gmail.com>
2019-03-25 06:25:07 -07:00
David Mirabito via Linuxptp-devel 6b61ba29c7 Avoid fault when receiving zero length packets
The manpage for recvmsg says -1 will be returned on error, Zero indicates an
"orderly shutdown", presumably only in case of stream sockets.
Further, UNIX Network Programming, Vol 1 says ".. a return value of 0 from
recvfrom is acceptable for a datagram protocol"

Such packets have been observed in the wild, aimed at PTP's multicast
address and port, possibly related to malformed management queries.

Patch to properly check return from recvmesg and not trigger the fault
codepath. Instead, such packets are treated as "Bad Message" the same as
non-zero but still too-short UDP payloads.

Signed-off-by: David Mirabito <davidjm@arista.com>
2019-03-25 06:25:07 -07:00
Richard Cochran 1b7a1e2cda ptp4l: Remove bogus command line option.
Commit c8107c8d ("config: Add a configuration option for TC mode.")
added a new TC mode.  An early version of the patch series included a
new '-t' command line option, but this was dropped considering the
fact that long options are always available.  IOW the TC user can
simply add '--clock_type=P2P_TC' to the command line, making the
single dash option redundant.

This patch fixes the misleading usage message by removing the
non-existing option.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2019-03-25 06:04:40 -07:00
Richard Cochran 32e34d5da3 Simplify the systems requirements section of the readme file.
Now that PTP support support is well established, remove the text that
attempts to explain the (at the time) incomplete kernel support.  Instead
just give a couple of ethtool examples.

Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2019-02-24 19:26:36 -08:00
Richard Cochran 47a4fd040b Update the features listed in the readme file.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2019-02-24 19:22:33 -08:00
Richard Cochran 36624a4345 Add an acknowledgment in the readme for Moser Baer.
Signed-off-by: Richard Cochran <richardcochran@gmail.com>
2019-02-24 19:03:50 -08:00
Miroslav Lichvar 6d50817dc0 port: Prevent undefined shift operations in msg_current().
Adjust checks of logMessageInterval in received packet to prevent 1 of
type int being shifted by values >= 31.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2019-01-28 20:55:30 -08:00
Miroslav Lichvar 3c7e4947e4 phc2sys: Fix crash when trying to synchronize unadjustable clock.
A clock that cannot be adjusted has no servo. Check if a servo is
present before updating the clock.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2019-01-06 20:50:40 -08:00
Miroslav Lichvar 8142da41b6 phc2sys: Use reversed sysoff when synchronizing to system clock.
If synchronizing a PHC to the system clock, use one of the
PTP_SYS_OFFSET ioctls (if supported) to measure the offset between the
two clocks. Negate the offset and switch the timestamp before passing
them to the servo.

This makes the synchronization between PHC and system clock symmetric.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2019-01-06 20:50:40 -08:00
Miroslav Lichvar 68a9011c9d sysoff: Add support for PTP_SYS_OFFSET_EXTENDED ioctl.
This is a more accurate variant of the the PTP_SYS_OFFSET ioctl, which
will probably be supported in future kernel versions.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2019-01-06 20:50:40 -08:00
Miroslav Lichvar 192b8e315c sysoff: Add support for PTP_SYS_OFFSET_PRECISE ioctl.
This ioctl uses cross timestamping for a more accurate measurement of
the offset. It is supported on some onboard Intel NICs using the e1000e
driver and a virtual PHC with the ptp_kvm driver.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2019-01-06 20:50:40 -08:00
Miroslav Lichvar 93baf34adb sysoff: Extend API for different sysoff methods.
The kernel supports different PTP_SYS_OFFSET* ioctls. Use the sysoff
enum to allow selecting between them in sysoff_measure().

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2019-01-06 20:50:40 -08:00
Miroslav Lichvar c0e49c7088 sysoff: Initialize data for ioctl(PTP_SYS_OFFSET).
This fixes valgrind errors.

Signed-off-by: Miroslav Lichvar <mlichvar@redhat.com>
2019-01-06 20:50:40 -08:00
Anders Selhammer 14ac29b059 tmv: Avoid overflow when byte shift in tmv_to_TimeInterval
Added check so that convertion from a positive tmv not result in a negative TimeInterval and vice versa.

Signed-off-by: Anders Selhammer <anders.selhammer@est.tech>
2019-01-06 20:09:39 -08:00