30f77abecd
'stats_reset()' callback was missing because the device backend doesn't support it. This commit adds a workaround to this and implements the callback by taking a snapshot of the stats (SNAPSHOT) each time 'stats_reset()' is called. When getting stats with 'stats_get()', hw stats which always increase reduce SNAPSHOT stats. That's how we get the "real" stats since the last 'stats_reset()'. Signed-off-by: Yogev Chaimovich <yogev@cgstowernetworks.com> Acked-by: Yong Wang <yongwang@vmware.com>