enic_clsf.h 1.1 KB

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