summaryrefslogtreecommitdiff
path: root/net/openvswitch/datapath.h
diff options
context:
space:
mode:
authorEelco Chaudron <echaudro@redhat.com>2020-07-31 15:20:56 +0300
committerDavid S. Miller <davem@davemloft.net>2020-08-04 01:17:48 +0300
commit9d2f627b7ec9d5d3246b6cec17f290ee6778c83b (patch)
tree79d4b5e7a6a6f7c49a37585c3b685788ed68e5fd /net/openvswitch/datapath.h
parentd6526926de7397a97308780911565e31a6b67b59 (diff)
downloadlinux-9d2f627b7ec9d5d3246b6cec17f290ee6778c83b.tar.xz
net: openvswitch: add masks cache hit counter
Add a counter that counts the number of masks cache hits, and export it through the megaflow netlink statistics. Reviewed-by: Paolo Abeni <pabeni@redhat.com> Reviewed-by: Tonghao Zhang <xiangxia.m.yue@gmail.com> Signed-off-by: Eelco Chaudron <echaudro@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/openvswitch/datapath.h')
-rw-r--r--net/openvswitch/datapath.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/openvswitch/datapath.h b/net/openvswitch/datapath.h
index 24fcec22fde2..38f7d3e66ca6 100644
--- a/net/openvswitch/datapath.h
+++ b/net/openvswitch/datapath.h
@@ -38,12 +38,15 @@
* @n_mask_hit: Number of masks looked up for flow match.
* @n_mask_hit / (@n_hit + @n_missed) will be the average masks looked
* up per packet.
+ * @n_cache_hit: The number of received packets that had their mask found using
+ * the mask cache.
*/
struct dp_stats_percpu {
u64 n_hit;
u64 n_missed;
u64 n_lost;
u64 n_mask_hit;
+ u64 n_cache_hit;
struct u64_stats_sync syncp;
};