[2/2] net/ice: support mark action in switch
Checks
Commit Message
This patch add mark action in switch filter.
Signed-off-by: Zhirun Yan <zhirun.yan@intel.com>
---
drivers/net/ice/ice_switch_filter.c | 9 +++++++++
1 file changed, 9 insertions(+)
Comments
> -----Original Message-----
> From: Yan, Zhirun <zhirun.yan@intel.com>
> Sent: Tuesday, February 14, 2023 1:24 PM
> To: dev@dpdk.org; Zhang, Qi Z <qi.z.zhang@intel.com>
> Cc: Yan, Zhirun <zhirun.yan@intel.com>
> Subject: [PATCH 2/2] net/ice: support mark action in switch
>
> This patch add mark action in switch filter.
>
> Signed-off-by: Zhirun Yan <zhirun.yan@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Applied to dpdk-next-net-intel.
Thanks
Qi
@@ -1715,6 +1715,7 @@ ice_switch_parse_action(struct ice_pf *pf,
struct rte_eth_dev_data *dev_data = pf->adapter->pf.dev_data;
const struct rte_flow_action_queue *act_q;
const struct rte_flow_action_rss *act_qgrop;
+ const struct rte_flow_action_mark *act_mark;
uint16_t base_queue, i;
const struct rte_flow_action *action;
enum rte_flow_action_type action_type;
@@ -1767,6 +1768,13 @@ ice_switch_parse_action(struct ice_pf *pf,
ICE_DROP_PACKET;
break;
+ case RTE_FLOW_ACTION_TYPE_MARK:
+ act_mark = action->conf;
+ rule_info->sw_act.fltr_act =
+ ICE_SET_MARK;
+ rule_info->sw_act.markid = act_mark->id;
+ break;
+
case RTE_FLOW_ACTION_TYPE_VOID:
break;
@@ -1822,6 +1830,7 @@ ice_switch_check_action(const struct rte_flow_action *actions,
case RTE_FLOW_ACTION_TYPE_RSS:
case RTE_FLOW_ACTION_TYPE_QUEUE:
case RTE_FLOW_ACTION_TYPE_DROP:
+ case RTE_FLOW_ACTION_TYPE_MARK:
case RTE_FLOW_ACTION_TYPE_REPRESENTED_PORT:
case RTE_FLOW_ACTION_TYPE_PORT_REPRESENTOR:
actions_num++;