]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blame - drivers/net/ethernet/cisco/enic/enic_clsf.h
License cleanup: add SPDX GPL-2.0 license identifier to files with no license
[mirror_ubuntu-bionic-kernel.git] / drivers / net / ethernet / cisco / enic / enic_clsf.h
CommitLineData
b2441318 1/* SPDX-License-Identifier: GPL-2.0 */
63118527
GV
2#ifndef _ENIC_CLSF_H_
3#define _ENIC_CLSF_H_
4
5#include "vnic_dev.h"
6#include "enic.h"
7
a145df23
GV
8#define ENIC_CLSF_EXPIRE_COUNT 128
9
63118527
GV
10int enic_addfltr_5t(struct enic *enic, struct flow_keys *keys, u16 rq);
11int enic_delfltr(struct enic *enic, u16 filter_id);
a145df23
GV
12void enic_rfs_flw_tbl_init(struct enic *enic);
13void enic_rfs_flw_tbl_free(struct enic *enic);
3762ff8f 14struct enic_rfs_fltr_node *htbl_fltr_search(struct enic *enic, u16 fltr_id);
e3e5af33
GV
15
16#ifdef CONFIG_RFS_ACCEL
a145df23
GV
17int enic_rx_flow_steer(struct net_device *dev, const struct sk_buff *skb,
18 u16 rxq_index, u32 flow_id);
e3e5af33
GV
19void enic_flow_may_expire(unsigned long data);
20
21static inline void enic_rfs_timer_start(struct enic *enic)
22{
23 init_timer(&enic->rfs_h.rfs_may_expire);
24 enic->rfs_h.rfs_may_expire.function = enic_flow_may_expire;
25 enic->rfs_h.rfs_may_expire.data = (unsigned long)enic;
26 mod_timer(&enic->rfs_h.rfs_may_expire, jiffies + HZ/4);
27}
28
29static inline void enic_rfs_timer_stop(struct enic *enic)
30{
31 del_timer_sync(&enic->rfs_h.rfs_may_expire);
32}
644a918d 33#else
e3e5af33
GV
34static inline void enic_rfs_timer_start(struct enic *enic) {}
35static inline void enic_rfs_timer_stop(struct enic *enic) {}
a145df23
GV
36#endif /* CONFIG_RFS_ACCEL */
37
63118527 38#endif /* _ENIC_CLSF_H_ */