summaryrefslogtreecommitdiff
path: root/ofproto/ofproto-dpif-xlate-cache.h
diff options
context:
space:
mode:
authorJarno Rajahalme <jarno@ovn.org>2016-09-14 16:51:27 -0700
committerJarno Rajahalme <jarno@ovn.org>2016-09-14 16:51:27 -0700
commita027899ee3e5a65c9253a24be8f8abdd9c47a023 (patch)
tree486306b267149e9a3731fdab0427b4d6b2f9bc8b /ofproto/ofproto-dpif-xlate-cache.h
parent901a517e5c8d253928e17a2c90573a1c545a2858 (diff)
downloadopenvswitch-a027899ee3e5a65c9253a24be8f8abdd9c47a023.tar.gz
ofproto-dpif-xlate: Add xlate cache type XC_TABLE.
Xlate cache entry type XC_TABLE is required for the table stats (number of misses and matches) to be correctly attributed. It appears that table stats have been off ever since xlate cache was introduced. This was now revealed by a PACKET_OUT unit test case in a later patch that checks for table stats explicitly. Fixes: b256dc52 ("ofproto-dpif-xlate: Cache xlate_actions() effects.") Signed-off-by: Jarno Rajahalme <jarno@ovn.org> Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'ofproto/ofproto-dpif-xlate-cache.h')
-rw-r--r--ofproto/ofproto-dpif-xlate-cache.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/ofproto/ofproto-dpif-xlate-cache.h b/ofproto/ofproto-dpif-xlate-cache.h
index 7e69c6fc1..65717781b 100644
--- a/ofproto/ofproto-dpif-xlate-cache.h
+++ b/ofproto/ofproto-dpif-xlate-cache.h
@@ -40,6 +40,7 @@ struct ofputil_flow_mod;
struct rule_dpif;
enum xc_type {
+ XC_TABLE,
XC_RULE,
XC_BOND,
XC_NETDEV,
@@ -64,6 +65,11 @@ enum xc_type {
struct xc_entry {
enum xc_type type;
union {
+ struct {
+ struct ofproto_dpif *ofproto;
+ uint8_t id;
+ bool match; /* or miss. */
+ } table;
struct rule_dpif *rule;
struct {
struct netdev *tx;