0001
0002
0003
0004 #ifndef __CXGB4_TC_MATCHALL_H__
0005 #define __CXGB4_TC_MATCHALL_H__
0006
0007 #include <net/pkt_cls.h>
0008
0009 enum cxgb4_matchall_state {
0010 CXGB4_MATCHALL_STATE_DISABLED = 0,
0011 CXGB4_MATCHALL_STATE_ENABLED,
0012 };
0013
0014 struct cxgb4_matchall_egress_entry {
0015 enum cxgb4_matchall_state state;
0016 u8 hwtc;
0017 u64 cookie;
0018 };
0019
0020 struct cxgb4_matchall_ingress_entry {
0021 enum cxgb4_matchall_state state;
0022 u32 tid[CXGB4_FILTER_TYPE_MAX];
0023
0024 struct ch_filter_specification fs[CXGB4_FILTER_TYPE_MAX];
0025 u16 viid_mirror;
0026 u64 bytes;
0027 u64 packets;
0028 u64 last_used;
0029 };
0030
0031 struct cxgb4_tc_port_matchall {
0032 struct cxgb4_matchall_egress_entry egress;
0033 struct cxgb4_matchall_ingress_entry ingress;
0034 };
0035
0036 struct cxgb4_tc_matchall {
0037 struct cxgb4_tc_port_matchall *port_matchall;
0038 };
0039
0040 int cxgb4_tc_matchall_replace(struct net_device *dev,
0041 struct tc_cls_matchall_offload *cls_matchall,
0042 bool ingress);
0043 int cxgb4_tc_matchall_destroy(struct net_device *dev,
0044 struct tc_cls_matchall_offload *cls_matchall,
0045 bool ingress);
0046 int cxgb4_tc_matchall_stats(struct net_device *dev,
0047 struct tc_cls_matchall_offload *cls_matchall);
0048
0049 int cxgb4_init_tc_matchall(struct adapter *adap);
0050 void cxgb4_cleanup_tc_matchall(struct adapter *adap);
0051 #endif