datapath: Check for backported netdev_features_t.
[sliver-openvswitch.git] / datapath / datapath.h
index 64920de..b3ae7cd 100644 (file)
  * @n_lost: Number of received packets that had no matching flow in the flow
  * table that could not be sent to userspace (normally due to an overflow in
  * one of the datapath's queues).
+ * @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.
  */
 struct dp_stats_percpu {
        u64 n_hit;
        u64 n_missed;
        u64 n_lost;
+       u64 n_mask_hit;
        struct u64_stats_sync sync;
 };
 
@@ -86,6 +90,8 @@ struct datapath {
        /* Network namespace ref. */
        struct net *net;
 #endif
+
+       u32 user_features;
 };
 
 /**
@@ -144,6 +150,8 @@ int lockdep_ovsl_is_held(void);
 #define ASSERT_OVSL()          WARN_ON(unlikely(!lockdep_ovsl_is_held()))
 #define ovsl_dereference(p)                                    \
        rcu_dereference_protected(p, lockdep_ovsl_is_held())
+#define rcu_dereference_ovsl(p)                                        \
+       rcu_dereference_check(p, lockdep_ovsl_is_held())
 
 static inline struct net *ovs_dp_get_net(struct datapath *dp)
 {