diff options
author | Eelco Chaudron <echaudro@redhat.com> | 2018-06-25 12:58:05 +0200 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2018-07-06 14:26:20 -0700 |
commit | 95dcecc5b5df36011872dc108f5cc65fbcc7d0d0 (patch) | |
tree | 0c49da0eece3a2060294bcf745a4857dfa4bb53b /lib/mac-learning.h | |
parent | 4ef1edf085a2160a79ec043f885e62b25d2b92a7 (diff) | |
download | openvswitch-95dcecc5b5df36011872dc108f5cc65fbcc7d0d0.tar.gz |
ofproto: Add CLI commands to show and clear mac_learning statistics
Add two new commands, fdb/stats-show and fdb/stats-clear, to
ovs-appctl to show and clear the new mac_learning statistics.
$ ovs-appctl fdb/stats-show ovs_pvp_br0
Statistics for bridge "ovs_pvp_br0":
Current/maximum MAC entries in the table: 4/2048
Total number of learned MAC entries : 4
Total number of expired MAC entries : 1
Total number of evicted MAC entries : 0
Total number of port moved MAC entries : 32
$ ovs-appctl fdb/stats-clear ovs_pvp_br0
statistics successfully cleared
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Signed-off-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'lib/mac-learning.h')
-rw-r--r-- | lib/mac-learning.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/mac-learning.h b/lib/mac-learning.h index fcb9fde9c..ad2f1fe4e 100644 --- a/lib/mac-learning.h +++ b/lib/mac-learning.h @@ -189,6 +189,7 @@ int mac_entry_age(const struct mac_learning *ml, const struct mac_entry *e) struct mac_learning *mac_learning_create(unsigned int idle_time); struct mac_learning *mac_learning_ref(const struct mac_learning *); void mac_learning_unref(struct mac_learning *); +void mac_learning_clear_statistics(struct mac_learning *ml); bool mac_learning_run(struct mac_learning *ml) OVS_REQ_WRLOCK(ml->rwlock); void mac_learning_wait(struct mac_learning *ml) |