1 #ifndef _ENIC_CLSF_H_ 2 #define _ENIC_CLSF_H_ 3 4 #include "vnic_dev.h" 5 #include "enic.h" 6 7 #define ENIC_CLSF_EXPIRE_COUNT 128 8 9 int enic_addfltr_5t(struct enic *enic, struct flow_keys *keys, u16 rq); 10 int enic_delfltr(struct enic *enic, u16 filter_id); 11 void enic_rfs_flw_tbl_init(struct enic *enic); 12 void enic_rfs_flw_tbl_free(struct enic *enic); 13 14 #ifdef CONFIG_RFS_ACCEL 15 int enic_rx_flow_steer(struct net_device *dev, const struct sk_buff *skb, 16 u16 rxq_index, u32 flow_id); 17 void enic_flow_may_expire(unsigned long data); 18 19 static inline void enic_rfs_timer_start(struct enic *enic) 20 { 21 init_timer(&enic->rfs_h.rfs_may_expire); 22 enic->rfs_h.rfs_may_expire.function = enic_flow_may_expire; 23 enic->rfs_h.rfs_may_expire.data = (unsigned long)enic; 24 mod_timer(&enic->rfs_h.rfs_may_expire, jiffies + HZ/4); 25 } 26 27 static inline void enic_rfs_timer_stop(struct enic *enic) 28 { 29 del_timer_sync(&enic->rfs_h.rfs_may_expire); 30 } 31 #else 32 static inline void enic_rfs_timer_start(struct enic *enic) {} 33 static inline void enic_rfs_timer_stop(struct enic *enic) {} 34 #endif /* CONFIG_RFS_ACCEL */ 35 36 #endif /* _ENIC_CLSF_H_ */ 37