DPDK patches and discussions
 help / color / mirror / Atom feed
From: Zhirun Yan <zhirun.yan@intel.com>
To: dev@dpdk.org, qi.z.zhang@intel.com
Cc: Zhirun Yan <zhirun.yan@intel.com>
Subject: [PATCH 2/2] net/ice: support mark action in switch
Date: Tue, 14 Feb 2023 13:23:56 +0800	[thread overview]
Message-ID: <20230214052356.365630-2-zhirun.yan@intel.com> (raw)
In-Reply-To: <20230214052356.365630-1-zhirun.yan@intel.com>

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(+)

diff --git a/drivers/net/ice/ice_switch_filter.c b/drivers/net/ice/ice_switch_filter.c
index 110d8895fe..1ff4b1afda 100644
--- a/drivers/net/ice/ice_switch_filter.c
+++ b/drivers/net/ice/ice_switch_filter.c
@@ -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++;
-- 
2.25.1


  reply	other threads:[~2023-02-14  5:32 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-02-14  5:23 [PATCH 1/2] net/ice/base: add ability to set markid via switch filter Zhirun Yan
2023-02-14  5:23 ` Zhirun Yan [this message]
2023-02-19  8:38   ` [PATCH 2/2] net/ice: support mark action in switch Zhang, Qi Z
2023-02-19  8:36 ` [PATCH 1/2] net/ice/base: add ability to set markid via switch filter Zhang, Qi Z

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230214052356.365630-2-zhirun.yan@intel.com \
    --to=zhirun.yan@intel.com \
    --cc=dev@dpdk.org \
    --cc=qi.z.zhang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).