summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/intel/ice/ice_tc_lib.h
diff options
context:
space:
mode:
authorAmritha Nambiar <amritha.nambiar@intel.com>2022-11-08 14:08:12 -0800
committerTony Nguyen <anthony.l.nguyen@intel.com>2023-01-19 08:18:03 -0800
commit390889a4b40ef8fbcaa3a04b71c36b8dba805507 (patch)
tree6d73a543a03f199fe921f0681d57836fc0c811a4 /drivers/net/ethernet/intel/ice/ice_tc_lib.h
parent7d8d7754e6f70eed2ed6c48ce55a4a1168b08276 (diff)
downloadlwn-390889a4b40ef8fbcaa3a04b71c36b8dba805507.tar.gz
lwn-390889a4b40ef8fbcaa3a04b71c36b8dba805507.zip
ice: Support drop action
Currently the drop action is supported only in switchdev mode. Add support for offloading receive filters with action drop in ADQ/non-ADQ modes. This is in addition to other actions such as forwarding to a VSI (ADQ) or a queue (ADQ/non-ADQ). Also renamed 'ch_vsi' to 'dest_vsi' as it is valid for multiple actions such as forward to vsi/queue which may/may not create a channel vsi. Reviewed-by: Sridhar Samudrala <sridhar.samudrala@intel.com> Signed-off-by: Amritha Nambiar <amritha.nambiar@intel.com> Tested-by: Bharathi Sreenivas <bharathi.sreenivas@intel.com> Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Diffstat (limited to 'drivers/net/ethernet/intel/ice/ice_tc_lib.h')
-rw-r--r--drivers/net/ethernet/intel/ice/ice_tc_lib.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/net/ethernet/intel/ice/ice_tc_lib.h b/drivers/net/ethernet/intel/ice/ice_tc_lib.h
index d916d1e92aa3..8d5e22ac7023 100644
--- a/drivers/net/ethernet/intel/ice/ice_tc_lib.h
+++ b/drivers/net/ethernet/intel/ice/ice_tc_lib.h
@@ -211,4 +211,14 @@ ice_del_cls_flower(struct ice_vsi *vsi, struct flow_cls_offload *cls_flower);
void ice_replay_tc_fltrs(struct ice_pf *pf);
bool ice_is_tunnel_supported(struct net_device *dev);
+static inline bool ice_is_forward_action(enum ice_sw_fwd_act_type fltr_act)
+{
+ switch (fltr_act) {
+ case ICE_FWD_TO_VSI:
+ case ICE_FWD_TO_Q:
+ return true;
+ default:
+ return false;
+ }
+}
#endif /* _ICE_TC_LIB_H_ */