2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-31 06:15:47 +00:00

dpctl: dpif: Add kernel datapath cache hit output.

This patch adds cache usage statistics to the output:

 $ ovs-dpctl show
 system@ovs-system:
   lookups: hit:24 missed:71 lost:0
   flows: 0
   masks: hit:334 total:0 hit/pkt:3.52
   cache: hit:4 hit-rate:4.21%
   port 0: ovs-system (internal)
   port 1: genev_sys_6081 (geneve: packet_type=ptap)
   port 2: br-int (internal)
   port 3: br-ex (internal)
   port 4: eth2
   port 5: sw1p1 (internal)
   port 6: sw0p4 (internal)

Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Acked-by: Flavio Leitner <fbl@sysclose.org>
Acked-by: Paolo Valerio <pvalerio@redhat.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
This commit is contained in:
Eelco Chaudron
2021-09-06 10:53:42 +02:00
committed by Ilya Maximets
parent 317b1bfd7d
commit efd55eb34c
5 changed files with 22 additions and 1 deletions

View File

@@ -1963,6 +1963,7 @@ dpif_netdev_get_stats(const struct dpif *dpif, struct dpif_dp_stats *stats)
}
stats->n_masks = UINT32_MAX;
stats->n_mask_hit = UINT64_MAX;
stats->n_cache_hit = UINT64_MAX;
return 0;
}