]> git.karo-electronics.de Git - linux-beck.git/blobdiff - drivers/net/ethernet/cisco/enic/enic_clsf.h
enic: remove #ifdef CONFIG_RFS_ACCEL around filter structures
[linux-beck.git] / drivers / net / ethernet / cisco / enic / enic_clsf.h
index d572704cd117270d94c46509c0f56841f11d961e..221f364cd8114642a0945b6480311d6647db2d61 100644 (file)
@@ -8,15 +8,29 @@
 
 int enic_addfltr_5t(struct enic *enic, struct flow_keys *keys, u16 rq);
 int enic_delfltr(struct enic *enic, u16 filter_id);
-
-#ifdef CONFIG_RFS_ACCEL
 void enic_rfs_flw_tbl_init(struct enic *enic);
 void enic_rfs_flw_tbl_free(struct enic *enic);
+
+#ifdef CONFIG_RFS_ACCEL
 int enic_rx_flow_steer(struct net_device *dev, const struct sk_buff *skb,
                       u16 rxq_index, u32 flow_id);
+void enic_flow_may_expire(unsigned long data);
+
+static inline void enic_rfs_timer_start(struct enic *enic)
+{
+       init_timer(&enic->rfs_h.rfs_may_expire);
+       enic->rfs_h.rfs_may_expire.function = enic_flow_may_expire;
+       enic->rfs_h.rfs_may_expire.data = (unsigned long)enic;
+       mod_timer(&enic->rfs_h.rfs_may_expire, jiffies + HZ/4);
+}
+
+static inline void enic_rfs_timer_stop(struct enic *enic)
+{
+       del_timer_sync(&enic->rfs_h.rfs_may_expire);
+}
 #else
-static inline void enic_rfs_flw_tbl_init(struct enic *enic) {}
-static inline void enic_rfs_flw_tbl_free(struct enic *enic) {}
+static inline void enic_rfs_timer_start(struct enic *enic) {}
+static inline void enic_rfs_timer_stop(struct enic *enic) {}
 #endif /* CONFIG_RFS_ACCEL */
 
 #endif /* _ENIC_CLSF_H_ */