net/sched: Fix update of lastuse in act modules implementing stats_update
authorRoi Dayan <roid@mellanox.com>
Tue, 26 Dec 2017 05:48:51 +0000 (07:48 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Jan 2018 08:45:22 +0000 (09:45 +0100)
commit71e7f85e10f189f4aa0162d6eea4a7163a48e3a6
tree1f8076b001b6835a43702fbb172823dc5076086d
parent3ef57b767e1b70ca594d5c6f7de687326cedcc7f
net/sched: Fix update of lastuse in act modules implementing stats_update

[ Upstream commit 3bb23421a504f01551b7cb9dff0e41dbf16656b0 ]

We need to update lastuse to to the most updated value between what
is already set and the new value.
If HW matching fails, i.e. because of an issue, the stats are not updated
but it could be that software did match and updated lastuse.

Fixes: 5712bf9c5c30 ("net/sched: act_mirred: Use passed lastuse argument")
Fixes: 9fea47d93bcc ("net/sched: act_gact: Update statistics when offloaded to hardware")
Signed-off-by: Roi Dayan <roid@mellanox.com>
Reviewed-by: Paul Blakey <paulb@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/sched/act_gact.c
net/sched/act_mirred.c