]> git.baikalelectronics.ru Git - kernel.git/commit
net sched: fix reporting the first-time use timestamp
authorRoman Mashak <mrv@mojatatu.com>
Sun, 17 May 2020 12:46:31 +0000 (08:46 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 19 May 2020 00:32:19 +0000 (17:32 -0700)
commit9f6199a98b059451c8c2048602c7fe8c5d680e65
treeaede4a3797be57d4886a8d3d3b34632c5655db41
parented93a60a641ea5434769e5646376d28c489b92dd
net sched: fix reporting the first-time use timestamp

When a new action is installed, firstuse field of 'tcf_t' is explicitly set
to 0. Value of zero means "new action, not yet used"; as a packet hits the
action, 'firstuse' is stamped with the current jiffies value.

tcf_tm_dump() should return 0 for firstuse if action has not yet been hit.

Fixes: 5ecdaddca16d ("net sched actions: aggregate dumping of actions timeinfo")
Cc: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: Roman Mashak <mrv@mojatatu.com>
Acked-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/act_api.h