Linux Audio

Check our new training course

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