diff options
author | Ilya Maximets <i.maximets@ovn.org> | 2020-05-14 20:20:56 +0200 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2020-05-15 20:14:00 +0200 |
commit | c36bba351ba7af8d48501dfa062a772f357536ba (patch) | |
tree | 4fff1c83a9972f70d8548b8bf5dcd4724b785972 /ofproto | |
parent | 3c18bb0fe9f23308061217f72e2245f0e311b20b (diff) | |
download | openvswitch-c36bba351ba7af8d48501dfa062a772f357536ba.tar.gz |
ofproto: Fix statistics of removed flow.
'fr' is a new variable on the stack. '+=' here adds the real statistics
to a random stack memory.
Fixes: 164413156cf9 ("Add offload packets statistics")
Acked-by: Roi Dayan <roid@mellanox.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'ofproto')
-rw-r--r-- | ofproto/ofproto.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ofproto/ofproto.c b/ofproto/ofproto.c index 0fbd6c380..59f06aa94 100644 --- a/ofproto/ofproto.c +++ b/ofproto/ofproto.c @@ -6085,8 +6085,8 @@ ofproto_rule_send_removed(struct rule *rule) fr.hard_timeout = rule->hard_timeout; ovs_mutex_unlock(&rule->mutex); rule->ofproto->ofproto_class->rule_get_stats(rule, &stats, &used); - fr.packet_count += stats.n_packets; - fr.byte_count += stats.n_bytes; + fr.packet_count = stats.n_packets; + fr.byte_count = stats.n_bytes; connmgr_send_flow_removed(connmgr, &fr); ovs_mutex_unlock(&ofproto_mutex); } |