DPDK patches and discussions
 help / color / mirror / Atom feed
From: Chaoyong He <chaoyong.he@corigine.com>
To: dev@dpdk.org
Cc: oss-drivers@corigine.com, Chaoyong He <chaoyong.he@corigine.com>,
	Long Wu <long.wu@corigine.com>,
	Peng Zhang <peng.zhang@corigine.com>
Subject: [PATCH v2 11/11] net/nfp: support QUEUE flow action
Date: Tue,  5 Dec 2023 10:54:57 +0800	[thread overview]
Message-ID: <20231205025457.1067372-12-chaoyong.he@corigine.com> (raw)
In-Reply-To: <20231205025457.1067372-1-chaoyong.he@corigine.com>

Add the corresponding logics to support the offload of QUEUE action.

Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
 doc/guides/nics/features/nfp.ini |  1 +
 drivers/net/nfp/nfp_net_flow.c   | 18 ++++++++++++++++++
 2 files changed, 19 insertions(+)

diff --git a/doc/guides/nics/features/nfp.ini b/doc/guides/nics/features/nfp.ini
index 248fd34a39..df1d403c6e 100644
--- a/doc/guides/nics/features/nfp.ini
+++ b/doc/guides/nics/features/nfp.ini
@@ -54,6 +54,7 @@ of_pop_vlan          = Y
 of_push_vlan         = Y
 of_set_vlan_pcp      = Y
 of_set_vlan_vid      = Y
+queue                = Y
 raw_decap            = Y
 raw_encap            = Y
 represented_port     = Y
diff --git a/drivers/net/nfp/nfp_net_flow.c b/drivers/net/nfp/nfp_net_flow.c
index 71f126156e..98e8499756 100644
--- a/drivers/net/nfp/nfp_net_flow.c
+++ b/drivers/net/nfp/nfp_net_flow.c
@@ -562,6 +562,20 @@ nfp_net_flow_action_mark(struct rte_flow *nfp_flow,
 	action_data->mark_id = mark->id;
 }
 
+static void
+nfp_net_flow_action_queue(struct rte_flow *nfp_flow,
+		const struct rte_flow_action *action)
+{
+	struct nfp_net_cmsg_action *action_data;
+	const struct rte_flow_action_queue *queue;
+
+	action_data = (struct nfp_net_cmsg_action *)nfp_flow->payload.action_data;
+	queue = action->conf;
+
+	action_data->action |= NFP_NET_CMSG_ACTION_QUEUE;
+	action_data->queue = queue->index;
+}
+
 static int
 nfp_net_flow_compile_actions(const struct rte_flow_action actions[],
 		struct rte_flow *nfp_flow)
@@ -578,6 +592,10 @@ nfp_net_flow_compile_actions(const struct rte_flow_action actions[],
 			PMD_DRV_LOG(DEBUG, "Process RTE_FLOW_ACTION_TYPE_MARK");
 			nfp_net_flow_action_mark(nfp_flow, action);
 			break;
+		case RTE_FLOW_ACTION_TYPE_QUEUE:
+			PMD_DRV_LOG(DEBUG, "Process RTE_FLOW_ACTION_TYPE_QUEUE");
+			nfp_net_flow_action_queue(nfp_flow, action);
+			break;
 		default:
 			PMD_DRV_LOG(ERR, "Unsupported action type: %d", action->type);
 			return -ENOTSUP;
-- 
2.39.1


  parent reply	other threads:[~2023-12-05  2:56 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-03  6:25 [PATCH 00/11] Add basic flow support for corenic firmware Chaoyong He
2023-11-03  6:25 ` [PATCH 01/11] net/nfp: move some source files Chaoyong He
2023-11-03  6:25 ` [PATCH 02/11] drivers: add the structures and functions for flow offload Chaoyong He
2023-11-03  6:25 ` [PATCH 03/11] net/nfp: add the control message channel Chaoyong He
2023-11-03  6:25 ` [PATCH 04/11] net/nfp: support flow API for CoreNIC firmware Chaoyong He
2023-11-03  6:26 ` [PATCH 05/11] net/nfp: support Ethernet flow item Chaoyong He
2023-11-03  6:26 ` [PATCH 06/11] net/nfp: support drop flow action Chaoyong He
2023-11-03  6:26 ` [PATCH 07/11] net/nfp: support IPv4 flow item Chaoyong He
2023-11-03  6:26 ` [PATCH 08/11] net/nfp: support IPv6 " Chaoyong He
2023-11-03  6:26 ` [PATCH 09/11] net/nfp: support TCP/UDP/SCTP flow items Chaoyong He
2023-11-03  6:26 ` [PATCH 10/11] drivers: support MARK flow action Chaoyong He
2023-11-03  6:26 ` [PATCH 11/11] net/nfp: support QUEUE " Chaoyong He
2023-11-03 16:12 ` [PATCH 00/11] Add basic flow support for corenic firmware Ferruh Yigit
2023-11-07  1:42   ` Chaoyong He
2023-11-07  9:18     ` Ferruh Yigit
2023-11-07  9:23       ` Chaoyong He
2023-11-07 16:50         ` Patrick Robb
2023-11-07 17:04           ` Patrick Robb
2023-11-07 20:19             ` Ferruh Yigit
2023-11-07 21:59               ` Patrick Robb
2023-11-03 17:01 ` Ferruh Yigit
2023-12-05  2:54 ` [PATCH v2 " Chaoyong He
2023-12-05  2:54   ` [PATCH v2 01/11] net/nfp: move some source files Chaoyong He
2023-12-05  2:54   ` [PATCH v2 02/11] net/nfp: add the structures and functions for flow offload Chaoyong He
2023-12-05  2:54   ` [PATCH v2 03/11] net/nfp: add the control message channel Chaoyong He
2023-12-08 19:15     ` Ferruh Yigit
2023-12-05  2:54   ` [PATCH v2 04/11] net/nfp: support flow API for CoreNIC firmware Chaoyong He
2023-12-05  2:54   ` [PATCH v2 05/11] net/nfp: support Ethernet flow item Chaoyong He
2023-12-05  2:54   ` [PATCH v2 06/11] net/nfp: support drop flow action Chaoyong He
2023-12-05  2:54   ` [PATCH v2 07/11] net/nfp: support IPv4 flow item Chaoyong He
2023-12-05  2:54   ` [PATCH v2 08/11] net/nfp: support IPv6 " Chaoyong He
2023-12-05  2:54   ` [PATCH v2 09/11] net/nfp: support TCP/UDP/SCTP flow items Chaoyong He
2023-12-05  2:54   ` [PATCH v2 10/11] net/nfp: support MARK flow action Chaoyong He
2023-12-05  2:54   ` Chaoyong He [this message]
2023-12-08 16:39   ` [PATCH v2 00/11] Add basic flow support for corenic firmware Ferruh Yigit
2023-12-11  1:42     ` Chaoyong He
2023-12-11 14:06       ` Ferruh Yigit

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=20231205025457.1067372-12-chaoyong.he@corigine.com \
    --to=chaoyong.he@corigine.com \
    --cc=dev@dpdk.org \
    --cc=long.wu@corigine.com \
    --cc=oss-drivers@corigine.com \
    --cc=peng.zhang@corigine.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).