All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alexander Kozyrev <akozyrev@nvidia.com>
To: <dev@dpdk.org>
Cc: <orika@nvidia.com>, <thomas@monjalon.net>,
	<ivan.malov@oktetlabs.ru>, <andrew.rybchenko@oktetlabs.ru>,
	<ferruh.yigit@intel.com>, <mohammad.abdul.awal@intel.com>,
	<qi.z.zhang@intel.com>, <jerinj@marvell.com>,
	<ajit.khaparde@broadcom.com>, <bruce.richardson@intel.com>
Subject: [PATCH v5 07/10] app/testpmd: add async flow create/destroy operations
Date: Fri, 11 Feb 2022 04:26:50 +0200	[thread overview]
Message-ID: <20220211022653.1372318-8-akozyrev@nvidia.com> (raw)
In-Reply-To: <20220211022653.1372318-1-akozyrev@nvidia.com>

Add testpmd support for the rte_flow_q_create/rte_flow_q_destroy API.
Provide the command line interface for enqueueing flow
creation/destruction operations. Usage example:
  testpmd> flow queue 0 create 0 postpone no
           template_table 6 pattern_template 0 actions_template 0
           pattern eth dst is 00:16:3e:31:15:c3 / end actions drop / end
  testpmd> flow queue 0 destroy 0 postpone yes rule 0

Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 app/test-pmd/cmdline_flow.c                 | 267 +++++++++++++++++++-
 app/test-pmd/config.c                       | 166 ++++++++++++
 app/test-pmd/testpmd.h                      |   7 +
 doc/guides/testpmd_app_ug/testpmd_funcs.rst |  57 +++++
 4 files changed, 496 insertions(+), 1 deletion(-)

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 3e89525445..f794a83a07 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -59,6 +59,7 @@ enum index {
 	COMMON_PATTERN_TEMPLATE_ID,
 	COMMON_ACTIONS_TEMPLATE_ID,
 	COMMON_TABLE_ID,
+	COMMON_QUEUE_ID,
 
 	/* TOP-level command. */
 	ADD,
@@ -92,6 +93,7 @@ enum index {
 	ISOLATE,
 	TUNNEL,
 	FLEX,
+	QUEUE,
 
 	/* Flex arguments */
 	FLEX_ITEM_INIT,
@@ -114,6 +116,22 @@ enum index {
 	ACTIONS_TEMPLATE_SPEC,
 	ACTIONS_TEMPLATE_MASK,
 
+	/* Queue arguments. */
+	QUEUE_CREATE,
+	QUEUE_DESTROY,
+
+	/* Queue create arguments. */
+	QUEUE_CREATE_ID,
+	QUEUE_CREATE_POSTPONE,
+	QUEUE_TEMPLATE_TABLE,
+	QUEUE_PATTERN_TEMPLATE,
+	QUEUE_ACTIONS_TEMPLATE,
+	QUEUE_SPEC,
+
+	/* Queue destroy arguments. */
+	QUEUE_DESTROY_ID,
+	QUEUE_DESTROY_POSTPONE,
+
 	/* Table arguments. */
 	TABLE_CREATE,
 	TABLE_DESTROY,
@@ -891,6 +909,8 @@ struct token {
 struct buffer {
 	enum index command; /**< Flow command. */
 	portid_t port; /**< Affected port ID. */
+	queueid_t queue; /** Async queue ID. */
+	bool postpone; /** Postpone async operation */
 	union {
 		struct {
 			struct rte_flow_port_attr port_attr;
@@ -921,6 +941,7 @@ struct buffer {
 			uint32_t action_id;
 		} ia; /* Indirect action query arguments */
 		struct {
+			uint32_t table_id;
 			uint32_t pat_templ_id;
 			uint32_t act_templ_id;
 			struct rte_flow_attr attr;
@@ -1070,6 +1091,18 @@ static const enum index next_table_destroy_attr[] = {
 	ZERO,
 };
 
+static const enum index next_queue_subcmd[] = {
+	QUEUE_CREATE,
+	QUEUE_DESTROY,
+	ZERO,
+};
+
+static const enum index next_queue_destroy_attr[] = {
+	QUEUE_DESTROY_ID,
+	END,
+	ZERO,
+};
+
 static const enum index next_ia_create_attr[] = {
 	INDIRECT_ACTION_CREATE_ID,
 	INDIRECT_ACTION_INGRESS,
@@ -2120,6 +2153,12 @@ static int parse_table(struct context *, const struct token *,
 static int parse_table_destroy(struct context *, const struct token *,
 			       const char *, unsigned int,
 			       void *, unsigned int);
+static int parse_qo(struct context *, const struct token *,
+		    const char *, unsigned int,
+		    void *, unsigned int);
+static int parse_qo_destroy(struct context *, const struct token *,
+			    const char *, unsigned int,
+			    void *, unsigned int);
 static int parse_tunnel(struct context *, const struct token *,
 			const char *, unsigned int,
 			void *, unsigned int);
@@ -2195,6 +2234,8 @@ static int comp_actions_template_id(struct context *, const struct token *,
 				    unsigned int, char *, unsigned int);
 static int comp_table_id(struct context *, const struct token *,
 			 unsigned int, char *, unsigned int);
+static int comp_queue_id(struct context *, const struct token *,
+			 unsigned int, char *, unsigned int);
 
 /** Token definitions. */
 static const struct token token_list[] = {
@@ -2366,6 +2407,13 @@ static const struct token token_list[] = {
 		.call = parse_int,
 		.comp = comp_table_id,
 	},
+	[COMMON_QUEUE_ID] = {
+		.name = "{queue_id}",
+		.type = "QUEUE_ID",
+		.help = "queue id",
+		.call = parse_int,
+		.comp = comp_queue_id,
+	},
 	/* Top-level command. */
 	[FLOW] = {
 		.name = "flow",
@@ -2388,7 +2436,8 @@ static const struct token token_list[] = {
 			      QUERY,
 			      ISOLATE,
 			      TUNNEL,
-			      FLEX)),
+			      FLEX,
+			      QUEUE)),
 		.call = parse_init,
 	},
 	/* Top-level command. */
@@ -2655,6 +2704,84 @@ static const struct token token_list[] = {
 		.call = parse_table,
 	},
 	/* Top-level command. */
+	[QUEUE] = {
+		.name = "queue",
+		.help = "queue a flow rule operation",
+		.next = NEXT(next_queue_subcmd, NEXT_ENTRY(COMMON_PORT_ID)),
+		.args = ARGS(ARGS_ENTRY(struct buffer, port)),
+		.call = parse_qo,
+	},
+	/* Sub-level commands. */
+	[QUEUE_CREATE] = {
+		.name = "create",
+		.help = "create a flow rule",
+		.next = NEXT(NEXT_ENTRY(QUEUE_TEMPLATE_TABLE),
+			     NEXT_ENTRY(COMMON_QUEUE_ID)),
+		.args = ARGS(ARGS_ENTRY(struct buffer, queue)),
+		.call = parse_qo,
+	},
+	[QUEUE_DESTROY] = {
+		.name = "destroy",
+		.help = "destroy a flow rule",
+		.next = NEXT(NEXT_ENTRY(QUEUE_DESTROY_ID),
+			     NEXT_ENTRY(COMMON_QUEUE_ID)),
+		.args = ARGS(ARGS_ENTRY(struct buffer, queue)),
+		.call = parse_qo_destroy,
+	},
+	/* Queue  arguments. */
+	[QUEUE_TEMPLATE_TABLE] = {
+		.name = "template table",
+		.help = "specify table id",
+		.next = NEXT(NEXT_ENTRY(QUEUE_PATTERN_TEMPLATE),
+			     NEXT_ENTRY(COMMON_TABLE_ID)),
+		.args = ARGS(ARGS_ENTRY(struct buffer,
+					args.vc.table_id)),
+		.call = parse_qo,
+	},
+	[QUEUE_PATTERN_TEMPLATE] = {
+		.name = "pattern_template",
+		.help = "specify pattern template index",
+		.next = NEXT(NEXT_ENTRY(QUEUE_ACTIONS_TEMPLATE),
+			     NEXT_ENTRY(COMMON_UNSIGNED)),
+		.args = ARGS(ARGS_ENTRY(struct buffer,
+					args.vc.pat_templ_id)),
+		.call = parse_qo,
+	},
+	[QUEUE_ACTIONS_TEMPLATE] = {
+		.name = "actions_template",
+		.help = "specify actions template index",
+		.next = NEXT(NEXT_ENTRY(QUEUE_CREATE_POSTPONE),
+			     NEXT_ENTRY(COMMON_UNSIGNED)),
+		.args = ARGS(ARGS_ENTRY(struct buffer,
+					args.vc.act_templ_id)),
+		.call = parse_qo,
+	},
+	[QUEUE_CREATE_POSTPONE] = {
+		.name = "postpone",
+		.help = "postpone create operation",
+		.next = NEXT(NEXT_ENTRY(ITEM_PATTERN),
+			     NEXT_ENTRY(COMMON_BOOLEAN)),
+		.args = ARGS(ARGS_ENTRY(struct buffer, postpone)),
+		.call = parse_qo,
+	},
+	[QUEUE_DESTROY_POSTPONE] = {
+		.name = "postpone",
+		.help = "postpone destroy operation",
+		.next = NEXT(NEXT_ENTRY(QUEUE_DESTROY_ID),
+			     NEXT_ENTRY(COMMON_BOOLEAN)),
+		.args = ARGS(ARGS_ENTRY(struct buffer, postpone)),
+		.call = parse_qo_destroy,
+	},
+	[QUEUE_DESTROY_ID] = {
+		.name = "rule",
+		.help = "specify rule id to destroy",
+		.next = NEXT(next_queue_destroy_attr,
+			NEXT_ENTRY(COMMON_UNSIGNED)),
+		.args = ARGS(ARGS_ENTRY_PTR(struct buffer,
+					    args.destroy.rule)),
+		.call = parse_qo_destroy,
+	},
+	/* Top-level command. */
 	[INDIRECT_ACTION] = {
 		.name = "indirect_action",
 		.type = "{command} {port_id} [{arg} [...]]",
@@ -8181,6 +8308,111 @@ parse_table_destroy(struct context *ctx, const struct token *token,
 	return len;
 }
 
+/** Parse tokens for queue create commands. */
+static int
+parse_qo(struct context *ctx, const struct token *token,
+	 const char *str, unsigned int len,
+	 void *buf, unsigned int size)
+{
+	struct buffer *out = buf;
+
+	/* Token name must match. */
+	if (parse_default(ctx, token, str, len, NULL, 0) < 0)
+		return -1;
+	/* Nothing else to do if there is no buffer. */
+	if (!out)
+		return len;
+	if (!out->command) {
+		if (ctx->curr != QUEUE)
+			return -1;
+		if (sizeof(*out) > size)
+			return -1;
+		out->command = ctx->curr;
+		ctx->objdata = 0;
+		ctx->object = out;
+		ctx->objmask = NULL;
+		out->args.vc.data = (uint8_t *)out + size;
+		return len;
+	}
+	switch (ctx->curr) {
+	case QUEUE_CREATE:
+		out->command = ctx->curr;
+		ctx->objdata = 0;
+		ctx->object = out;
+		ctx->objmask = NULL;
+		return len;
+	case QUEUE_TEMPLATE_TABLE:
+	case QUEUE_PATTERN_TEMPLATE:
+	case QUEUE_ACTIONS_TEMPLATE:
+	case QUEUE_CREATE_POSTPONE:
+		return len;
+	case ITEM_PATTERN:
+		out->args.vc.pattern =
+			(void *)RTE_ALIGN_CEIL((uintptr_t)(out + 1),
+					       sizeof(double));
+		ctx->object = out->args.vc.pattern;
+		ctx->objmask = NULL;
+		return len;
+	case ACTIONS:
+		out->args.vc.actions =
+			(void *)RTE_ALIGN_CEIL((uintptr_t)
+					       (out->args.vc.pattern +
+						out->args.vc.pattern_n),
+					       sizeof(double));
+		ctx->object = out->args.vc.actions;
+		ctx->objmask = NULL;
+		return len;
+	default:
+		return -1;
+	}
+}
+
+/** Parse tokens for queue destroy command. */
+static int
+parse_qo_destroy(struct context *ctx, const struct token *token,
+		 const char *str, unsigned int len,
+		 void *buf, unsigned int size)
+{
+	struct buffer *out = buf;
+	uint32_t *flow_id;
+
+	/* Token name must match. */
+	if (parse_default(ctx, token, str, len, NULL, 0) < 0)
+		return -1;
+	/* Nothing else to do if there is no buffer. */
+	if (!out)
+		return len;
+	if (!out->command || out->command == QUEUE) {
+		if (ctx->curr != QUEUE_DESTROY)
+			return -1;
+		if (sizeof(*out) > size)
+			return -1;
+		out->command = ctx->curr;
+		ctx->objdata = 0;
+		ctx->object = out;
+		ctx->objmask = NULL;
+		out->args.destroy.rule =
+			(void *)RTE_ALIGN_CEIL((uintptr_t)(out + 1),
+					       sizeof(double));
+		return len;
+	}
+	switch (ctx->curr) {
+	case QUEUE_DESTROY_ID:
+		flow_id = out->args.destroy.rule
+				+ out->args.destroy.rule_n++;
+		if ((uint8_t *)flow_id > (uint8_t *)out + size)
+			return -1;
+		ctx->objdata = 0;
+		ctx->object = flow_id;
+		ctx->objmask = NULL;
+		return len;
+	case QUEUE_DESTROY_POSTPONE:
+		return len;
+	default:
+		return -1;
+	}
+}
+
 static int
 parse_flex(struct context *ctx, const struct token *token,
 	     const char *str, unsigned int len,
@@ -9222,6 +9454,28 @@ comp_table_id(struct context *ctx, const struct token *token,
 	return i;
 }
 
+/** Complete available queue IDs. */
+static int
+comp_queue_id(struct context *ctx, const struct token *token,
+	      unsigned int ent, char *buf, unsigned int size)
+{
+	unsigned int i = 0;
+	struct rte_port *port;
+
+	(void)token;
+	if (port_id_is_invalid(ctx->port, DISABLED_WARN) ||
+	    ctx->port == (portid_t)RTE_PORT_ALL)
+		return -1;
+	port = &ports[ctx->port];
+	for (i = 0; i < port->queue_nb; i++) {
+		if (buf && i == ent)
+			return snprintf(buf, size, "%u", i);
+	}
+	if (buf)
+		return -1;
+	return i;
+}
+
 /** Internal context. */
 static struct context cmd_flow_context;
 
@@ -9519,6 +9773,17 @@ cmd_flow_parsed(const struct buffer *in)
 					in->args.table_destroy.table_id_n,
 					in->args.table_destroy.table_id);
 		break;
+	case QUEUE_CREATE:
+		port_queue_flow_create(in->port, in->queue, in->postpone,
+				       in->args.vc.table_id, in->args.vc.pat_templ_id,
+				       in->args.vc.act_templ_id, in->args.vc.pattern,
+				       in->args.vc.actions);
+		break;
+	case QUEUE_DESTROY:
+		port_queue_flow_destroy(in->port, in->queue, in->postpone,
+					in->args.destroy.rule_n,
+					in->args.destroy.rule);
+		break;
 	case INDIRECT_ACTION_CREATE:
 		port_action_handle_create(
 				in->port, in->args.vc.attr.group,
diff --git a/app/test-pmd/config.c b/app/test-pmd/config.c
index 5f6da3944e..50781b2b84 100644
--- a/app/test-pmd/config.c
+++ b/app/test-pmd/config.c
@@ -2453,6 +2453,172 @@ port_flow_template_table_destroy(portid_t port_id,
 	return ret;
 }
 
+/** Enqueue create flow rule operation. */
+int
+port_queue_flow_create(portid_t port_id, queueid_t queue_id,
+		       bool postpone, uint32_t table_id,
+		       uint32_t pattern_idx, uint32_t actions_idx,
+		       const struct rte_flow_item *pattern,
+		       const struct rte_flow_action *actions)
+{
+	struct rte_flow_q_ops_attr ops_attr = { .postpone = postpone };
+	struct rte_flow_q_op_res comp = { 0 };
+	struct rte_flow *flow;
+	struct rte_port *port;
+	struct port_flow *pf;
+	struct port_table *pt;
+	uint32_t id = 0;
+	bool found;
+	int ret = 0;
+	struct rte_flow_error error = { RTE_FLOW_ERROR_TYPE_NONE, NULL, NULL };
+	struct rte_flow_action_age *age = age_action_get(actions);
+
+	port = &ports[port_id];
+	if (port->flow_list) {
+		if (port->flow_list->id == UINT32_MAX) {
+			printf("Highest rule ID is already assigned,"
+			       " delete it first");
+			return -ENOMEM;
+		}
+		id = port->flow_list->id + 1;
+	}
+
+	if (queue_id >= port->queue_nb) {
+		printf("Queue #%u is invalid\n", queue_id);
+		return -EINVAL;
+	}
+
+	found = false;
+	pt = port->table_list;
+	while (pt) {
+		if (table_id == pt->id) {
+			found = true;
+			break;
+		}
+		pt = pt->next;
+	}
+	if (!found) {
+		printf("Table #%u is invalid\n", table_id);
+		return -EINVAL;
+	}
+
+	if (pattern_idx >= pt->nb_pattern_templates) {
+		printf("Pattern template index #%u is invalid,"
+		       " %u templates present in the table\n",
+		       pattern_idx, pt->nb_pattern_templates);
+		return -EINVAL;
+	}
+	if (actions_idx >= pt->nb_actions_templates) {
+		printf("Actions template index #%u is invalid,"
+		       " %u templates present in the table\n",
+		       actions_idx, pt->nb_actions_templates);
+		return -EINVAL;
+	}
+
+	pf = port_flow_new(NULL, pattern, actions, &error);
+	if (!pf)
+		return port_flow_complain(&error);
+	if (age) {
+		pf->age_type = ACTION_AGE_CONTEXT_TYPE_FLOW;
+		age->context = &pf->age_type;
+	}
+	/* Poisoning to make sure PMDs update it in case of error. */
+	memset(&error, 0x11, sizeof(error));
+	flow = rte_flow_q_flow_create(port_id, queue_id, &ops_attr,
+		pt->table, pattern, pattern_idx, actions, actions_idx, &error);
+	if (!flow) {
+		uint32_t flow_id = pf->id;
+		port_queue_flow_destroy(port_id, queue_id, true, 1, &flow_id);
+		return port_flow_complain(&error);
+	}
+
+	while (ret == 0) {
+		/* Poisoning to make sure PMDs update it in case of error. */
+		memset(&error, 0x22, sizeof(error));
+		ret = rte_flow_q_pull(port_id, queue_id, &comp, 1, &error);
+		if (ret < 0) {
+			printf("Failed to pull queue\n");
+			return -EINVAL;
+		}
+	}
+
+	pf->next = port->flow_list;
+	pf->id = id;
+	pf->flow = flow;
+	port->flow_list = pf;
+	printf("Flow rule #%u creation enqueued\n", pf->id);
+	return 0;
+}
+
+/** Enqueue number of destroy flow rules operations. */
+int
+port_queue_flow_destroy(portid_t port_id, queueid_t queue_id,
+			bool postpone, uint32_t n, const uint32_t *rule)
+{
+	struct rte_flow_q_ops_attr op_attr = { .postpone = postpone };
+	struct rte_flow_q_op_res comp = { 0 };
+	struct rte_port *port;
+	struct port_flow **tmp;
+	uint32_t c = 0;
+	int ret = 0;
+
+	if (port_id_is_invalid(port_id, ENABLED_WARN) ||
+	    port_id == (portid_t)RTE_PORT_ALL)
+		return -EINVAL;
+	port = &ports[port_id];
+
+	if (queue_id >= port->queue_nb) {
+		printf("Queue #%u is invalid\n", queue_id);
+		return -EINVAL;
+	}
+
+	tmp = &port->flow_list;
+	while (*tmp) {
+		uint32_t i;
+
+		for (i = 0; i != n; ++i) {
+			struct rte_flow_error error;
+			struct port_flow *pf = *tmp;
+
+			if (rule[i] != pf->id)
+				continue;
+			/*
+			 * Poisoning to make sure PMD
+			 * update it in case of error.
+			 */
+			memset(&error, 0x33, sizeof(error));
+			if (rte_flow_q_flow_destroy(port_id, queue_id, &op_attr,
+						    pf->flow, &error)) {
+				ret = port_flow_complain(&error);
+				continue;
+			}
+
+			while (ret == 0) {
+				/*
+				 * Poisoning to make sure PMD
+				 * update it in case of error.
+				 */
+				memset(&error, 0x44, sizeof(error));
+				ret = rte_flow_q_pull(port_id, queue_id,
+							 &comp, 1, &error);
+				if (ret < 0) {
+					printf("Failed to pull queue\n");
+					return -EINVAL;
+				}
+			}
+
+			printf("Flow rule #%u destruction enqueued\n", pf->id);
+			*tmp = pf->next;
+			free(pf);
+			break;
+		}
+		if (i == n)
+			tmp = &(*tmp)->next;
+		++c;
+	}
+	return ret;
+}
+
 /** Create flow rule. */
 int
 port_flow_create(portid_t port_id,
diff --git a/app/test-pmd/testpmd.h b/app/test-pmd/testpmd.h
index 4c6e775bad..d0e1e3eeec 100644
--- a/app/test-pmd/testpmd.h
+++ b/app/test-pmd/testpmd.h
@@ -932,6 +932,13 @@ int port_flow_template_table_create(portid_t port_id, uint32_t id,
 		   uint32_t nb_actions_templates, uint32_t *actions_templates);
 int port_flow_template_table_destroy(portid_t port_id,
 			    uint32_t n, const uint32_t *table);
+int port_queue_flow_create(portid_t port_id, queueid_t queue_id,
+			   bool postpone, uint32_t table_id,
+			   uint32_t pattern_idx, uint32_t actions_idx,
+			   const struct rte_flow_item *pattern,
+			   const struct rte_flow_action *actions);
+int port_queue_flow_destroy(portid_t port_id, queueid_t queue_id,
+			    bool postpone, uint32_t n, const uint32_t *rule);
 int port_flow_validate(portid_t port_id,
 		       const struct rte_flow_attr *attr,
 		       const struct rte_flow_item *pattern,
diff --git a/doc/guides/testpmd_app_ug/testpmd_funcs.rst b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
index 16b874250c..b802288c66 100644
--- a/doc/guides/testpmd_app_ug/testpmd_funcs.rst
+++ b/doc/guides/testpmd_app_ug/testpmd_funcs.rst
@@ -3382,6 +3382,20 @@ following sections.
        pattern {item} [/ {item} [...]] / end
        actions {action} [/ {action} [...]] / end
 
+- Enqueue creation of a flow rule::
+
+   flow queue {port_id} create {queue_id}
+       [postpone {boolean}] template_table {table_id}
+       pattern_template {pattern_template_index}
+       actions_template {actions_template_index}
+       pattern {item} [/ {item} [...]] / end
+       actions {action} [/ {action} [...]] / end
+
+- Enqueue destruction of specific flow rules::
+
+   flow queue {port_id} destroy {queue_id}
+       [postpone {boolean}] rule {rule_id} [...]
+
 - Create a flow rule::
 
    flow create {port_id}
@@ -3703,6 +3717,30 @@ one.
 
 **All unspecified object values are automatically initialized to 0.**
 
+Enqueueing creation of flow rules
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+``flow queue create`` adds creation operation of a flow rule to a queue.
+It is bound to ``rte_flow_q_flow_create()``::
+
+   flow queue {port_id} create {queue_id}
+       [postpone {boolean}] template_table {table_id}
+       pattern_template {pattern_template_index}
+       actions_template {actions_template_index}
+       pattern {item} [/ {item} [...]] / end
+       actions {action} [/ {action} [...]] / end
+
+If successful, it will return a flow rule ID usable with other commands::
+
+   Flow rule #[...] creaion enqueued
+
+Otherwise it will show an error message of the form::
+
+   Caught error type [...] ([...]): [...]
+
+This command uses the same pattern items and actions as ``flow create``,
+their format is described in `Creating flow rules`_.
+
 Attributes
 ^^^^^^^^^^
 
@@ -4418,6 +4456,25 @@ Non-existent rule IDs are ignored::
    Flow rule #0 destroyed
    testpmd>
 
+Enqueueing destruction of flow rules
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+``flow queue destroy`` adds destruction operations to destroy one or more rules
+from their rule ID (as returned by ``flow queue create``) to a queue,
+this command calls ``rte_flow_q_flow_destroy()`` as many times as necessary::
+
+   flow queue {port_id} destroy {queue_id}
+        [postpone {boolean}] rule {rule_id} [...]
+
+If successful, it will show::
+
+   Flow rule #[...] destruction enqueued
+
+It does not report anything for rule IDs that do not exist. The usual error
+message is shown when a rule cannot be destroyed::
+
+   Caught error type [...] ([...]): [...]
+
 Querying flow rules
 ~~~~~~~~~~~~~~~~~~~
 
-- 
2.18.2


  parent reply	other threads:[~2022-02-11  2:28 UTC|newest]

Thread overview: 218+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20220206032526.816079-1-akozyrev@nvidia.com >
2022-02-09 21:37 ` [PATCH v4 00/10] ethdev: datapath-focused flow rules management Alexander Kozyrev
2022-02-09 21:38   ` [PATCH v4 01/10] ethdev: introduce flow pre-configuration hints Alexander Kozyrev
2022-02-09 21:38   ` [PATCH v4 02/10] ethdev: add flow item/action templates Alexander Kozyrev
2022-02-09 21:38   ` [PATCH v4 03/10] ethdev: bring in async queue-based flow rules operations Alexander Kozyrev
2022-02-09 21:38   ` [PATCH v4 04/10] app/testpmd: implement rte flow configuration Alexander Kozyrev
2022-02-10  9:32     ` Thomas Monjalon
2022-02-09 21:38   ` [PATCH v4 05/10] app/testpmd: implement rte flow template management Alexander Kozyrev
2022-02-09 21:38   ` [PATCH v4 06/10] app/testpmd: implement rte flow table management Alexander Kozyrev
2022-02-09 21:38   ` [PATCH v4 07/10] app/testpmd: implement rte flow queue flow operations Alexander Kozyrev
2022-02-09 21:53     ` Ori Kam
2022-02-09 21:38   ` [PATCH v4 08/10] app/testpmd: implement rte flow push operations Alexander Kozyrev
2022-02-09 21:38   ` [PATCH v4 09/10] app/testpmd: implement rte flow pull operations Alexander Kozyrev
2022-02-09 21:38   ` [PATCH v4 10/10] app/testpmd: implement rte flow queue indirect actions Alexander Kozyrev
2022-02-10 16:00   ` [PATCH v4 00/10] ethdev: datapath-focused flow rules management Ferruh Yigit
2022-02-10 16:12     ` Asaf Penso
2022-02-10 16:33       ` Suanming Mou
2022-02-10 18:04     ` Ajit Khaparde
2022-02-11 10:22     ` Ivan Malov
2022-02-11 10:48     ` Jerin Jacob
2022-02-11  2:26   ` [PATCH v5 " Alexander Kozyrev
2022-02-11  2:26     ` [PATCH v5 01/10] ethdev: introduce flow pre-configuration hints Alexander Kozyrev
2022-02-11 10:16       ` Andrew Rybchenko
2022-02-11 18:47         ` Alexander Kozyrev
2022-02-16 13:03           ` Andrew Rybchenko
2022-02-16 22:17             ` Alexander Kozyrev
2022-02-17 10:35               ` Andrew Rybchenko
2022-02-17 10:57                 ` Ori Kam
2022-02-17 11:04                   ` Andrew Rybchenko
2022-02-11  2:26     ` [PATCH v5 02/10] ethdev: add flow item/action templates Alexander Kozyrev
2022-02-11 11:27       ` Andrew Rybchenko
2022-02-11 22:25         ` Alexander Kozyrev
2022-02-16 13:14           ` Andrew Rybchenko
2022-02-16 14:18             ` Ori Kam
2022-02-17 10:44               ` Andrew Rybchenko
2022-02-17 11:11                 ` Ori Kam
2022-02-11  2:26     ` [PATCH v5 03/10] ethdev: bring in async queue-based flow rules operations Alexander Kozyrev
2022-02-11 12:42       ` Andrew Rybchenko
2022-02-12  2:19         ` Alexander Kozyrev
2022-02-12  9:25           ` Thomas Monjalon
2022-02-16 22:49             ` Alexander Kozyrev
2022-02-17  8:18               ` Thomas Monjalon
2022-02-17 11:02                 ` Andrew Rybchenko
2022-02-16 13:34           ` Andrew Rybchenko
2022-02-16 14:53             ` Ori Kam
2022-02-17 10:52               ` Andrew Rybchenko
2022-02-17 11:08                 ` Ori Kam
2022-02-17 14:16                   ` Ori Kam
2022-02-17 14:34                     ` Thomas Monjalon
2022-02-16 15:15             ` Ori Kam
2022-02-17 11:10               ` Andrew Rybchenko
2022-02-17 11:19                 ` Ori Kam
2022-02-11  2:26     ` [PATCH v5 04/10] app/testpmd: add flow engine configuration Alexander Kozyrev
2022-02-11  2:26     ` [PATCH v5 05/10] app/testpmd: add flow template management Alexander Kozyrev
2022-02-11  2:26     ` [PATCH v5 06/10] app/testpmd: add flow table management Alexander Kozyrev
2022-02-11  2:26     ` Alexander Kozyrev [this message]
2022-02-11  2:26     ` [PATCH v5 08/10] app/testpmd: add flow queue push operation Alexander Kozyrev
2022-02-11  2:26     ` [PATCH v5 09/10] app/testpmd: add flow queue pull operation Alexander Kozyrev
2022-02-11  2:26     ` [PATCH v5 10/10] app/testpmd: add async indirect actions creation/destruction Alexander Kozyrev
2022-02-12  4:19     ` [PATCH v6 00/10] ethdev: datapath-focused flow rules management Alexander Kozyrev
2022-02-12  4:19       ` [PATCH v6 01/10] ethdev: introduce flow pre-configuration hints Alexander Kozyrev
2022-02-12  4:19       ` [PATCH v6 02/10] ethdev: add flow item/action templates Alexander Kozyrev
2022-02-12  4:19       ` [PATCH v6 03/10] ethdev: bring in async queue-based flow rules operations Alexander Kozyrev
2022-02-12  4:19       ` [PATCH v6 04/10] app/testpmd: add flow engine configuration Alexander Kozyrev
2022-02-12  4:19       ` [PATCH v6 05/10] app/testpmd: add flow template management Alexander Kozyrev
2022-02-12  4:19       ` [PATCH v6 06/10] app/testpmd: add flow table management Alexander Kozyrev
2022-02-12  4:19       ` [PATCH v6 07/10] app/testpmd: add async flow create/destroy operations Alexander Kozyrev
2022-02-12  4:19       ` [PATCH v6 08/10] app/testpmd: add flow queue push operation Alexander Kozyrev
2022-02-12  4:19       ` [PATCH v6 09/10] app/testpmd: add flow queue pull operation Alexander Kozyrev
2022-02-12  4:19       ` [PATCH v6 10/10] app/testpmd: add async indirect actions creation/destruction Alexander Kozyrev
2022-02-19  4:11       ` [PATCH v7 00/10] ethdev: datapath-focused flow rules management Alexander Kozyrev
2022-02-19  4:11         ` [PATCH v7 01/11] ethdev: introduce flow engine configuration Alexander Kozyrev
2022-02-19  4:11         ` [PATCH v7 02/11] ethdev: add flow item/action templates Alexander Kozyrev
2022-02-19  4:11         ` [PATCH v7 03/11] ethdev: bring in async queue-based flow rules operations Alexander Kozyrev
2022-02-19  4:11         ` [PATCH v7 04/11] ethdev: bring in async indirect actions operations Alexander Kozyrev
2022-02-19  4:11         ` [PATCH v7 05/11] app/testpmd: add flow engine configuration Alexander Kozyrev
2022-02-19  4:11         ` [PATCH v7 06/11] app/testpmd: add flow template management Alexander Kozyrev
2022-02-19  4:11         ` [PATCH v7 07/11] app/testpmd: add flow table management Alexander Kozyrev
2022-02-19  4:11         ` [PATCH v7 08/11] app/testpmd: add async flow create/destroy operations Alexander Kozyrev
2022-02-19  4:11         ` [PATCH v7 09/11] app/testpmd: add flow queue push operation Alexander Kozyrev
2022-02-19  4:11         ` [PATCH v7 10/11] app/testpmd: add flow queue pull operation Alexander Kozyrev
2022-02-19  4:11         ` [PATCH v7 11/11] app/testpmd: add async indirect actions operations Alexander Kozyrev
2022-02-20  3:43         ` [PATCH v8 00/10] ethdev: datapath-focused flow rules management Alexander Kozyrev
2022-02-20  3:43           ` [PATCH v8 01/11] ethdev: introduce flow engine configuration Alexander Kozyrev
2022-02-21  9:47             ` Andrew Rybchenko
2022-02-21  9:52               ` Andrew Rybchenko
2022-02-21 12:53                 ` Ori Kam
2022-02-21 14:33                   ` Alexander Kozyrev
2022-02-21 14:53                   ` Andrew Rybchenko
2022-02-21 15:49                     ` Thomas Monjalon
2022-02-20  3:44           ` [PATCH v8 02/11] ethdev: add flow item/action templates Alexander Kozyrev
2022-02-21 10:57             ` Andrew Rybchenko
2022-02-21 13:12               ` Ori Kam
2022-02-21 15:05                 ` Andrew Rybchenko
2022-02-21 15:43                   ` Ori Kam
2022-02-21 15:14                 ` Alexander Kozyrev
2022-02-20  3:44           ` [PATCH v8 03/11] ethdev: bring in async queue-based flow rules operations Alexander Kozyrev
2022-02-21 14:49             ` Andrew Rybchenko
2022-02-21 15:35               ` Alexander Kozyrev
2022-02-20  3:44           ` [PATCH v8 04/11] ethdev: bring in async indirect actions operations Alexander Kozyrev
2022-02-20  3:44           ` [PATCH v8 05/11] app/testpmd: add flow engine configuration Alexander Kozyrev
2022-02-20  3:44           ` [PATCH v8 06/11] app/testpmd: add flow template management Alexander Kozyrev
2022-02-20  3:44           ` [PATCH v8 07/11] app/testpmd: add flow table management Alexander Kozyrev
2022-02-20  3:44           ` [PATCH v8 08/11] app/testpmd: add async flow create/destroy operations Alexander Kozyrev
2022-02-20  3:44           ` [PATCH v8 09/11] app/testpmd: add flow queue push operation Alexander Kozyrev
2022-02-20  3:44           ` [PATCH v8 10/11] app/testpmd: add flow queue pull operation Alexander Kozyrev
2022-02-20  3:44           ` [PATCH v8 11/11] app/testpmd: add async indirect actions operations Alexander Kozyrev
2022-02-21 23:02           ` [PATCH v9 00/11] ethdev: datapath-focused flow rules management Alexander Kozyrev
2022-02-21 23:02             ` [PATCH v9 01/11] ethdev: introduce flow engine configuration Alexander Kozyrev
2022-02-21 23:02             ` [PATCH v9 02/11] ethdev: add flow item/action templates Alexander Kozyrev
2022-02-21 23:02             ` [PATCH v9 03/11] ethdev: bring in async queue-based flow rules operations Alexander Kozyrev
2022-02-21 23:02             ` [PATCH v9 04/11] ethdev: bring in async indirect actions operations Alexander Kozyrev
2022-02-21 23:02             ` [PATCH v9 05/11] app/testpmd: add flow engine configuration Alexander Kozyrev
2022-02-21 23:02             ` [PATCH v9 06/11] app/testpmd: add flow template management Alexander Kozyrev
2022-02-21 23:02             ` [PATCH v9 07/11] app/testpmd: add flow table management Alexander Kozyrev
2022-02-21 23:02             ` [PATCH v9 08/11] app/testpmd: add async flow create/destroy operations Alexander Kozyrev
2022-02-21 23:02             ` [PATCH v9 09/11] app/testpmd: add flow queue push operation Alexander Kozyrev
2022-02-21 23:02             ` [PATCH v9 10/11] app/testpmd: add flow queue pull operation Alexander Kozyrev
2022-02-21 23:02             ` [PATCH v9 11/11] app/testpmd: add async indirect actions operations Alexander Kozyrev
2022-02-23  3:02             ` [PATCH v10 00/11] ethdev: datapath-focused flow rules management Alexander Kozyrev
2022-02-23  3:02               ` [PATCH v10 01/11] ethdev: introduce flow engine configuration Alexander Kozyrev
2022-02-24  8:22                 ` Andrew Rybchenko
2022-02-23  3:02               ` [PATCH v10 02/11] ethdev: add flow item/action templates Alexander Kozyrev
2022-02-24  8:34                 ` Andrew Rybchenko
2022-02-23  3:02               ` [PATCH v10 03/11] ethdev: bring in async queue-based flow rules operations Alexander Kozyrev
2022-02-24  8:35                 ` Andrew Rybchenko
2022-02-23  3:02               ` [PATCH v10 04/11] ethdev: bring in async indirect actions operations Alexander Kozyrev
2022-02-24  8:37                 ` Andrew Rybchenko
2022-02-23  3:02               ` [PATCH v10 05/11] app/testpmd: add flow engine configuration Alexander Kozyrev
2022-02-23  3:02               ` [PATCH v10 06/11] app/testpmd: add flow template management Alexander Kozyrev
2022-02-23  3:02               ` [PATCH v10 07/11] app/testpmd: add flow table management Alexander Kozyrev
2022-02-23  3:02               ` [PATCH v10 08/11] app/testpmd: add async flow create/destroy operations Alexander Kozyrev
2022-02-23  3:02               ` [PATCH v10 09/11] app/testpmd: add flow queue push operation Alexander Kozyrev
2022-02-23  3:02               ` [PATCH v10 10/11] app/testpmd: add flow queue pull operation Alexander Kozyrev
2022-02-23  3:02               ` [PATCH v10 11/11] app/testpmd: add async indirect actions operations Alexander Kozyrev
2022-02-24 13:07               ` [PATCH v10 00/11] ethdev: datapath-focused flow rules management Ferruh Yigit
2022-02-24 13:13                 ` Ferruh Yigit
2022-02-24 13:14                   ` Raslan Darawsheh
2022-02-22 16:41           ` [PATCH v8 00/10] " Ferruh Yigit
2022-02-22 16:49             ` Ferruh Yigit
2021-10-06  4:48 [dpdk-dev] [RFC 0/3] " Alexander Kozyrev
2021-10-06  4:48 ` [dpdk-dev] [PATCH 1/3] ethdev: introduce flow pre-configuration hints Alexander Kozyrev
2021-10-13  4:11   ` Ajit Khaparde
2021-10-13 13:15     ` Ori Kam
2021-10-31 17:27       ` Ajit Khaparde
2021-11-01 10:40         ` Ori Kam
2021-10-06  4:48 ` [dpdk-dev] [PATCH 2/3] ethdev: add flow item/action templates Alexander Kozyrev
2021-10-06 17:24   ` Ivan Malov
2021-10-13  1:25     ` Alexander Kozyrev
2021-10-13  2:26       ` Ajit Khaparde
2021-10-13  2:38         ` Alexander Kozyrev
2021-10-13 11:25       ` Ivan Malov
2021-10-06  4:48 ` [dpdk-dev] [PATCH 3/3] ethdev: add async queue-based flow rules operations Alexander Kozyrev
2021-10-06 16:24   ` Ivan Malov
2021-10-13  1:10     ` Alexander Kozyrev
2021-10-13  4:57   ` Ajit Khaparde
2021-10-13 13:17     ` Ori Kam
2022-01-18 15:30 ` [PATCH v2 00/10] ethdev: datapath-focused flow rules management Alexander Kozyrev
2022-01-18 15:30   ` [PATCH v2 01/10] ethdev: introduce flow pre-configuration hints Alexander Kozyrev
2022-01-24 14:36     ` Jerin Jacob
2022-01-24 17:35       ` Thomas Monjalon
2022-01-24 17:46         ` Jerin Jacob
2022-01-24 18:08           ` Bruce Richardson
2022-01-25  1:14             ` Alexander Kozyrev
2022-01-25 15:58             ` Ori Kam
2022-01-25 18:09               ` Bruce Richardson
2022-01-25 18:14                 ` Bruce Richardson
2022-01-26  9:45                   ` Ori Kam
2022-01-26 10:52                     ` Bruce Richardson
2022-01-26 11:21                       ` Thomas Monjalon
2022-01-26 12:19                         ` Ori Kam
2022-01-26 13:41                           ` Bruce Richardson
2022-01-26 15:12                             ` Ori Kam
2022-01-24 17:40       ` Ajit Khaparde
2022-01-25  1:28         ` Alexander Kozyrev
2022-01-25 18:44           ` Jerin Jacob
2022-01-26 22:02             ` Alexander Kozyrev
2022-01-27  9:34               ` Jerin Jacob
2022-01-18 15:30   ` [PATCH v2 02/10] ethdev: add flow item/action templates Alexander Kozyrev
2022-01-18 15:30   ` [PATCH v2 03/10] ethdev: bring in async queue-based flow rules operations Alexander Kozyrev
2022-01-18 15:30   ` [PATCH v2 04/10] app/testpmd: implement rte flow configure Alexander Kozyrev
2022-01-18 15:33   ` [v2,05/10] app/testpmd: implement rte flow item/action template Alexander Kozyrev
2022-01-18 15:34   ` [v2,06/10] app/testpmd: implement rte flow table Alexander Kozyrev
2022-01-18 15:35   ` [v2,07/10] app/testpmd: implement rte flow queue create flow Alexander Kozyrev
2022-01-18 15:35   ` [v2,08/10] app/testpmd: implement rte flow queue drain Alexander Kozyrev
2022-01-18 15:36   ` [v2,09/10] app/testpmd: implement rte flow queue dequeue Alexander Kozyrev
2022-01-18 15:37   ` [v2,10/10] app/testpmd: implement rte flow queue indirect action Alexander Kozyrev
2022-01-19  7:16   ` [PATCH v2 00/10] ethdev: datapath-focused flow rules management Suanming Mou
2022-01-24 15:10     ` Ori Kam
2022-02-06  3:25   ` [PATCH v3 " Alexander Kozyrev
2022-02-06  3:25     ` [PATCH v3 01/10] ethdev: introduce flow pre-configuration hints Alexander Kozyrev
2022-02-07 13:15       ` Ori Kam
2022-02-07 14:52       ` Jerin Jacob
2022-02-07 17:59         ` Alexander Kozyrev
2022-02-07 18:24           ` Jerin Jacob
2022-02-06  3:25     ` [PATCH v3 02/10] ethdev: add flow item/action templates Alexander Kozyrev
2022-02-07 13:16       ` Ori Kam
2022-02-06  3:25     ` [PATCH v3 03/10] ethdev: bring in async queue-based flow rules operations Alexander Kozyrev
2022-02-07 13:18       ` Ori Kam
2022-02-08 10:56       ` Jerin Jacob
2022-02-08 14:11         ` Alexander Kozyrev
2022-02-08 15:23           ` Ivan Malov
2022-02-09  5:40             ` Alexander Kozyrev
2022-02-08 17:36           ` Jerin Jacob
2022-02-09  5:50           ` Jerin Jacob
2022-02-06  3:25     ` [PATCH v3 04/10] app/testpmd: implement rte flow configuration Alexander Kozyrev
2022-02-07 13:19       ` Ori Kam
2022-02-06  3:25     ` [PATCH v3 05/10] app/testpmd: implement rte flow template management Alexander Kozyrev
2022-02-07 13:20       ` Ori Kam
2022-02-06  3:25     ` [PATCH v3 06/10] app/testpmd: implement rte flow table management Alexander Kozyrev
2022-02-07 13:22       ` Ori Kam
2022-02-06  3:25     ` [PATCH v3 07/10] app/testpmd: implement rte flow queue flow operations Alexander Kozyrev
2022-02-07 13:21       ` Ori Kam
2022-02-06  3:25     ` [PATCH v3 08/10] app/testpmd: implement rte flow push operations Alexander Kozyrev
2022-02-07 13:22       ` Ori Kam
2022-02-06  3:25     ` [PATCH v3 09/10] app/testpmd: implement rte flow pull operations Alexander Kozyrev
2022-02-07 13:23       ` Ori Kam
2022-02-06  3:25     ` [PATCH v3 10/10] app/testpmd: implement rte flow queue indirect actions Alexander Kozyrev
2022-02-07 13:23       ` Ori Kam

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=20220211022653.1372318-8-akozyrev@nvidia.com \
    --to=akozyrev@nvidia.com \
    --cc=ajit.khaparde@broadcom.com \
    --cc=andrew.rybchenko@oktetlabs.ru \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=ivan.malov@oktetlabs.ru \
    --cc=jerinj@marvell.com \
    --cc=mohammad.abdul.awal@intel.com \
    --cc=orika@nvidia.com \
    --cc=qi.z.zhang@intel.com \
    --cc=thomas@monjalon.net \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.