summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h
diff options
context:
space:
mode:
authorKumar Sanghvi <kumaras@chelsio.com>2017-09-21 23:41:14 +0530
committerDavid S. Miller <davem@davemloft.net>2017-09-22 21:28:01 -0700
commit62488e4b53ae02d82ac000f91ec82b5cfb41d6f2 (patch)
tree591ae311ee37cf438b3b64301a412f8c5f59027a /drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h
parent6a345b3dbd1ed83a7877993c6e23c977a84bb483 (diff)
cxgb4: add basic tc flower offload support
Add support to add/remove flows for offload. Following match and action are supported for offloading a flow: Match: ether-protocol, IPv4/IPv6 addresses, L4 ports (TCP/UDP) Action: drop, redirect to another port on the device. The qualifying flows can have accompanying mask information. Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com> Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com> Signed-off-by: Ganesh Goudar <ganeshgr@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h')
-rw-r--r--drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h
index b321fc205b5a..6145a9e056eb 100644
--- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h
+++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_tc_flower.h
@@ -37,10 +37,27 @@
#include <net/pkt_cls.h>
+struct ch_tc_flower_stats {
+ u64 packet_count;
+ u64 byte_count;
+ u64 last_used;
+};
+
+struct ch_tc_flower_entry {
+ struct ch_filter_specification fs;
+ struct ch_tc_flower_stats stats;
+ unsigned long tc_flower_cookie;
+ struct hlist_node link;
+ struct rcu_head rcu;
+ u32 filter_id;
+};
+
int cxgb4_tc_flower_replace(struct net_device *dev,
struct tc_cls_flower_offload *cls);
int cxgb4_tc_flower_destroy(struct net_device *dev,
struct tc_cls_flower_offload *cls);
int cxgb4_tc_flower_stats(struct net_device *dev,
struct tc_cls_flower_offload *cls);
+
+void cxgb4_init_tc_flower(struct adapter *adap);
#endif /* __CXGB4_TC_FLOWER_H */