aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/cisco/enic/enic_clsf.h
diff options
context:
space:
mode:
authorGovindarajulu Varadarajan <_govind@gmx.com>2014-07-21 17:22:17 +0530
committerDavid S. Miller <davem@davemloft.net>2014-07-21 20:22:46 -0700
commite3e5af33e6d64a36bce1dfd9f599649f539801de (patch)
tree7c3c462982a83816159bc50007b8a5c803bde135 /drivers/net/ethernet/cisco/enic/enic_clsf.h
parentaf_iucv: avoid path quiesce of severed path in shutdown() (diff)
downloadlinux-dev-e3e5af33e6d64a36bce1dfd9f599649f539801de.tar.xz
linux-dev-e3e5af33e6d64a36bce1dfd9f599649f539801de.zip
enic: remove #ifdef CONFIG_RFS_ACCEL around filter structures
This patch removes the #ifdef CONFIG_RFS_ACCEL around the classifier filter structures. This makes the filter structures available when CONFIG_RFS_ACCEL = n. Introduce enic_rfs_timer_start() & enic_rfs_timer_stop() to start/stop the timer. These two functions are nop when CONFIG_RFS_ACCEL = n. Signed-off-by: Govindarajulu Varadarajan <_govind@gmx.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to '')
-rw-r--r--drivers/net/ethernet/cisco/enic/enic_clsf.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/drivers/net/ethernet/cisco/enic/enic_clsf.h b/drivers/net/ethernet/cisco/enic/enic_clsf.h
index d572704cd117..221f364cd811 100644
--- a/drivers/net/ethernet/cisco/enic/enic_clsf.h
+++ b/drivers/net/ethernet/cisco/enic/enic_clsf.h
@@ -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_ */