summaryrefslogtreecommitdiff
path: root/taia.c
blob: 34d53473e5f3c12ffc09bfa1c06a9bc7cdd47fdc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#include <stdbool.h>

#include "taia.h"

static const struct taia tolerance_taia = {
	.sec.x = 0,
	.nano = 700000000ULL,	/* 700ms acceptance window */
	.atto = 0,
};

bool taia_looks_good(struct taia *arr_taia, struct taia *pkt_taia)
{
	bool good = false;
	struct taia tmp;

	if (taia_less(arr_taia, pkt_taia)) {
		taia_sub(&tmp, pkt_taia, arr_taia);
		if (taia_less(&tmp, &tolerance_taia))
			good = true;
	} else {
		taia_sub(&tmp, arr_taia, pkt_taia);
		if (taia_less(&tmp, &tolerance_taia))
			good = true;
	}

	return good;
}
tions'>+219 2017-02-10net: cgroups: fix build errors when linux/phy*.h is removed from net/dsa.hRussell King1-0/+1 2017-02-10net: sunrpc: fix build errors when linux/phy*.h is removed from net/dsa.hRussell King1-0/+1 2017-02-10net: Fix checkpatch, Missing a blank line after declarationstcharding1-0/+13 2017-02-10net: Fix checkpatch block comments warningstcharding1-32/+33 2017-02-10net: Fix checkpatch whitespace errorstcharding1-19/+20 2017-02-10net: Fix checkpatch WARNING: please, no space before tabstcharding1-71/+71 2017-02-10net/act_pedit: Introduce 'add' operationAmir Vadai1-4/+26 2017-02-10net/act_pedit: Support using offset relative to the conventional network headersAmir Vadai1-16/+180 2017-02-10switchdev: bridge: Offload mc router portsNogah Frankel1-0/+15 2017-02-10bridge: mcast: Merge the mc router ports deletions to one functionNogah Frankel1-15/+9 2017-02-10switchdev: bridge: Offload multicast disabledNogah Frankel1-0/+16 2017-02-10sched: check negative err value to safe one level of indentJiri Pirko1-13/+9 2017-02-10sched: add missing curly braces in else branch in tc_ctl_tfilterJiri Pirko1-1/+2 2017-02-10sched: move err set right before goto errout in tc_ctl_tfilterJiri Pirko1-10/+19 2017-02-10sched: push TC filter protocol creation into a separate functionJiri Pirko1-51/+59 2017-02-10sched: move tcf_proto_destroy and tcf_destroy_chain helpers into cls_apiJiri Pirko13-24/+32 2017-02-10sched: rename tcf_destroy to tcf_destroy_protoJiri Pirko2-6/+6 2017-02-10ipv4: fib: Add events for FIB replace and appendIdo Schimmel1-13/+14 2017-02-10ipv4: fib: Send notification before deleting FIB aliasIdo Schimmel1-7/+7 2017-02-10ipv4: fib: Send deletion notification with actual FIB alias typeIdo Schimmel1-2/+2 2017-02-10ipv4: fib: Only flush FIB aliases belonging to currently flushed tableIdo Schimmel1-1/+2 2017-02-09openvswitch: Pack struct sw_flow_key.Jarno Rajahalme4-34/+39 2017-02-09openvswitch: Add force commit.Jarno Rajahalme1-2/+24 2017-02-09openvswitch: Add original direction conntrack tuple to sw_flow_key.Jarno Rajahalme