mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-02 23:27:06 +00:00
net sched: fix reporting the first-time use timestamp
[ Upstream commitb15e62631c
] 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:48d8ee1694
("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> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
54f7f67f02
commit
b26b3e7739
1 changed files with 2 additions and 1 deletions
|
@ -69,7 +69,8 @@ static inline void tcf_tm_dump(struct tcf_t *dtm, const struct tcf_t *stm)
|
|||
{
|
||||
dtm->install = jiffies_to_clock_t(jiffies - stm->install);
|
||||
dtm->lastuse = jiffies_to_clock_t(jiffies - stm->lastuse);
|
||||
dtm->firstuse = jiffies_to_clock_t(jiffies - stm->firstuse);
|
||||
dtm->firstuse = stm->firstuse ?
|
||||
jiffies_to_clock_t(jiffies - stm->firstuse) : 0;
|
||||
dtm->expires = jiffies_to_clock_t(stm->expires);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue