net/flower: Introduce hardware offload support
This patch is based on a patch made by John Fastabend. It adds support for offloading cls_flower. when NETIF_F_HW_TC is on: flags = 0 => Rule will be processed twice - by hardware, and if still relevant, by software. flags = SKIP_HW => Rull will be processed by software only If hardware fail/not capabale to apply the rule, operation will NOT fail. Filter will be processed by SW only. Acked-by: Jiri Pirko <jiri@mellanox.com> Suggested-by: John Fastabend <john.r.fastabend@intel.com> Signed-off-by: Amir Vadai <amir@vadai.me> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
10f79037b4
commit
5b33f48842
@@ -786,6 +786,7 @@ typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
|
||||
enum {
|
||||
TC_SETUP_MQPRIO,
|
||||
TC_SETUP_CLSU32,
|
||||
TC_SETUP_CLSFLOWER,
|
||||
};
|
||||
|
||||
struct tc_cls_u32_offload;
|
||||
@@ -795,6 +796,7 @@ struct tc_to_netdev {
|
||||
union {
|
||||
u8 tc;
|
||||
struct tc_cls_u32_offload *cls_u32;
|
||||
struct tc_cls_flower_offload *cls_flower;
|
||||
};
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user