2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 14:25:26 +00:00

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>
This commit is contained in:
Eelco Chaudron
2018-06-25 12:58:05 +02:00
committed by Ben Pfaff
parent 4ef1edf085
commit 95dcecc5b5
3 changed files with 69 additions and 1 deletions

View File

@@ -182,7 +182,7 @@ normalize_idle_time(unsigned int idle_time)
}
/* Clear all the mac_learning statistics */
static void
void
mac_learning_clear_statistics(struct mac_learning *ml)
{
if (ml != NULL) {