enic_clsf.h 1.1 KB

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