| 
									
										
										
										
											2014-06-23 16:08:00 +05:30
										 |  |  | #ifndef _ENIC_CLSF_H_
 | 
					
						
							|  |  |  | #define _ENIC_CLSF_H_
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #include "vnic_dev.h"
 | 
					
						
							|  |  |  | #include "enic.h"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-06-23 16:08:02 +05:30
										 |  |  | #define ENIC_CLSF_EXPIRE_COUNT 128
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-06-23 16:08:00 +05:30
										 |  |  | int enic_addfltr_5t(struct enic *enic, struct flow_keys *keys, u16 rq); | 
					
						
							|  |  |  | int enic_delfltr(struct enic *enic, u16 filter_id); | 
					
						
							| 
									
										
										
										
											2014-06-23 16:08:02 +05:30
										 |  |  | void enic_rfs_flw_tbl_init(struct enic *enic); | 
					
						
							|  |  |  | void enic_rfs_flw_tbl_free(struct enic *enic); | 
					
						
							| 
									
										
										
										
											2014-07-21 17:22:18 +05:30
										 |  |  | struct enic_rfs_fltr_node *htbl_fltr_search(struct enic *enic, u16 fltr_id); | 
					
						
							| 
									
										
										
										
											2014-07-21 17:22:17 +05:30
										 |  |  | 
 | 
					
						
							|  |  |  | #ifdef CONFIG_RFS_ACCEL
 | 
					
						
							| 
									
										
										
										
											2014-06-23 16:08:02 +05:30
										 |  |  | int enic_rx_flow_steer(struct net_device *dev, const struct sk_buff *skb, | 
					
						
							|  |  |  | 		       u16 rxq_index, u32 flow_id); | 
					
						
							| 
									
										
										
										
											2014-07-21 17:22:17 +05:30
										 |  |  | 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); | 
					
						
							|  |  |  | } | 
					
						
							| 
									
										
										
										
											2014-06-25 10:31:09 +02:00
										 |  |  | #else
 | 
					
						
							| 
									
										
										
										
											2014-07-21 17:22:17 +05:30
										 |  |  | static inline void enic_rfs_timer_start(struct enic *enic) {} | 
					
						
							|  |  |  | static inline void enic_rfs_timer_stop(struct enic *enic) {} | 
					
						
							| 
									
										
										
										
											2014-06-23 16:08:02 +05:30
										 |  |  | #endif /* CONFIG_RFS_ACCEL */
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2014-06-23 16:08:00 +05:30
										 |  |  | #endif /* _ENIC_CLSF_H_ */
 |