Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef _ENIC_CLSF_H_
0003 #define _ENIC_CLSF_H_
0004 
0005 #include "vnic_dev.h"
0006 #include "enic.h"
0007 
0008 #define ENIC_CLSF_EXPIRE_COUNT 128
0009 
0010 int enic_addfltr_5t(struct enic *enic, struct flow_keys *keys, u16 rq);
0011 int enic_delfltr(struct enic *enic, u16 filter_id);
0012 void enic_rfs_flw_tbl_init(struct enic *enic);
0013 void enic_rfs_flw_tbl_free(struct enic *enic);
0014 struct enic_rfs_fltr_node *htbl_fltr_search(struct enic *enic, u16 fltr_id);
0015 
0016 #ifdef CONFIG_RFS_ACCEL
0017 int enic_rx_flow_steer(struct net_device *dev, const struct sk_buff *skb,
0018                u16 rxq_index, u32 flow_id);
0019 void enic_flow_may_expire(struct timer_list *t);
0020 
0021 static inline void enic_rfs_timer_start(struct enic *enic)
0022 {
0023     timer_setup(&enic->rfs_h.rfs_may_expire, enic_flow_may_expire, 0);
0024     mod_timer(&enic->rfs_h.rfs_may_expire, jiffies + HZ/4);
0025 }
0026 
0027 static inline void enic_rfs_timer_stop(struct enic *enic)
0028 {
0029     del_timer_sync(&enic->rfs_h.rfs_may_expire);
0030 }
0031 #else
0032 static inline void enic_rfs_timer_start(struct enic *enic) {}
0033 static inline void enic_rfs_timer_stop(struct enic *enic) {}
0034 #endif /* CONFIG_RFS_ACCEL */
0035 
0036 #endif /* _ENIC_CLSF_H_ */