DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [RFC PATCH] ethdev: add a new flow action of queue range
@ 2020-07-17  9:32 Wei Hu (Xavier)
  2020-07-19 12:30 ` Andrew Rybchenko
  0 siblings, 1 reply; 4+ messages in thread
From: Wei Hu (Xavier) @ 2020-07-17  9:32 UTC (permalink / raw)
  To: dev; +Cc: huwei87, fengchengwen

From: Chengwen Feng <fengchengwen@huawei.com>

This patch adds a new flow action of queue range, which was used to assign
packets to a continuous queue range.

Current FD (flow director) provide a useful means to assign packets to
a target queue. But it has the following shortage: it can only route
to one queue, and there is an upper limit on one queue rxtx capacity,
which means the FD rule need more accurate else it may exceed the
queue capacity.

With the support of queue range action, user can create FD rule with
action routed to a continuous queues, like:
	FD rule 0 ------|-----> queue 0
			|-----> queue 1

	FD rule 1 ------|-----> queue 8
			|-----> queue 9
			|-----> queue 10
			|-----> queue 11
Note: hardware can use RSS to distribute traffic to the continuous queues
when packets match the above FD rule.

With the support of queue range action, we can further provide QoS
service when DCB disabled.
eg: one NE (network element) is configured with two ip addresses, one for
control plane and the other for data plane, user can create two FD rules,
the first for directing control plane packets to queue 0, the second for
directing data plane packets to queue 1~15.

Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
---
 lib/librte_ethdev/rte_flow.c |  1 +
 lib/librte_ethdev/rte_flow.h | 17 +++++++++++++++++
 2 files changed, 18 insertions(+)

diff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c
index f8fdd68..8d85576 100644
--- a/lib/librte_ethdev/rte_flow.c
+++ b/lib/librte_ethdev/rte_flow.c
@@ -114,6 +114,7 @@ static const struct rte_flow_desc_data rte_flow_desc_action[] = {
 	MK_FLOW_ACTION(MARK, sizeof(struct rte_flow_action_mark)),
 	MK_FLOW_ACTION(FLAG, 0),
 	MK_FLOW_ACTION(QUEUE, sizeof(struct rte_flow_action_queue)),
+	MK_FLOW_ACTION(QUEUE_RANGE, sizeof(struct rte_flow_action_queue_range)),
 	MK_FLOW_ACTION(DROP, 0),
 	MK_FLOW_ACTION(COUNT, sizeof(struct rte_flow_action_count)),
 	MK_FLOW_ACTION(RSS, sizeof(struct rte_flow_action_rss)),
diff --git a/lib/librte_ethdev/rte_flow.h b/lib/librte_ethdev/rte_flow.h
index da8bfa5..9211a2e 100644
--- a/lib/librte_ethdev/rte_flow.h
+++ b/lib/librte_ethdev/rte_flow.h
@@ -1703,6 +1703,13 @@ enum rte_flow_action_type {
 	RTE_FLOW_ACTION_TYPE_QUEUE,
 
 	/**
+	 * Assigns packets to a given queue range.
+	 *
+	 * See struct rte_flow_action_queue_range.
+	 */
+	RTE_FLOW_ACTION_TYPE_QUEUE_RANGE,
+
+	/**
 	 * Drops packets.
 	 *
 	 * PASSTHRU overrides this action if both are specified.
@@ -2149,6 +2156,16 @@ struct rte_flow_action_mark {
 };
 
 /**
+ * RTE_FLOW_ACTION_TYPE_QUEUE_RANGE
+ *
+ * Assign packets to a given queue range.
+ */
+struct rte_flow_action_queue_range {
+	uint16_t start_index; /**< Index of start queue start to use. */
+	uint16_t queue_num;   /**< Num of continuous queues from start_index. */
+};
+
+/**
  * @warning
  * @b EXPERIMENTAL: this structure may change without prior notice
  *
-- 
2.7.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [RFC PATCH] ethdev: add a new flow action of queue range
  2020-07-17  9:32 [dpdk-dev] [RFC PATCH] ethdev: add a new flow action of queue range Wei Hu (Xavier)
@ 2020-07-19 12:30 ` Andrew Rybchenko
  2020-07-19 13:32   ` Ori Kam
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Rybchenko @ 2020-07-19 12:30 UTC (permalink / raw)
  To: Wei Hu (Xavier), dev; +Cc: huwei87, fengchengwen

On 7/17/20 12:32 PM, Wei Hu (Xavier) wrote:
> From: Chengwen Feng <fengchengwen@huawei.com>
> 
> This patch adds a new flow action of queue range, which was used to assign
> packets to a continuous queue range.
> 
> Current FD (flow director) provide a useful means to assign packets to
> a target queue. But it has the following shortage: it can only route
> to one queue, and there is an upper limit on one queue rxtx capacity,
> which means the FD rule need more accurate else it may exceed the
> queue capacity.
> 
> With the support of queue range action, user can create FD rule with
> action routed to a continuous queues, like:
> 	FD rule 0 ------|-----> queue 0
> 			|-----> queue 1
> 
> 	FD rule 1 ------|-----> queue 8
> 			|-----> queue 9
> 			|-----> queue 10
> 			|-----> queue 11
> Note: hardware can use RSS to distribute traffic to the continuous queues
> when packets match the above FD rule.
> 
> With the support of queue range action, we can further provide QoS
> service when DCB disabled.
> eg: one NE (network element) is configured with two ip addresses, one for
> control plane and the other for data plane, user can create two FD rules,
> the first for directing control plane packets to queue 0, the second for
> directing data plane packets to queue 1~15.

I don't understand why it is not covered by RSS action.

> 
> Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
> Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>

[snip]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [RFC PATCH] ethdev: add a new flow action of queue range
  2020-07-19 12:30 ` Andrew Rybchenko
@ 2020-07-19 13:32   ` Ori Kam
  2020-07-19 13:34     ` Ori Kam
  0 siblings, 1 reply; 4+ messages in thread
From: Ori Kam @ 2020-07-19 13:32 UTC (permalink / raw)
  To: Andrew Rybchenko, Wei Hu (Xavier), dev; +Cc: huwei87, fengchengwen



> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Andrew Rybchenko
> 
> On 7/17/20 12:32 PM, Wei Hu (Xavier) wrote:
> > From: Chengwen Feng <fengchengwen@huawei.com>
> >
> > This patch adds a new flow action of queue range, which was used to assign
> > packets to a continuous queue range.
> >
> > Current FD (flow director) provide a useful means to assign packets to
> > a target queue. But it has the following shortage: it can only route
> > to one queue, and there is an upper limit on one queue rxtx capacity,
> > which means the FD rule need more accurate else it may exceed the
> > queue capacity.
> >
> > With the support of queue range action, user can create FD rule with
> > action routed to a continuous queues, like:
> > 	FD rule 0 ------|-----> queue 0
> > 			|-----> queue 1
> >
> > 	FD rule 1 ------|-----> queue 8
> > 			|-----> queue 9
> > 			|-----> queue 10
> > 			|-----> queue 11
> > Note: hardware can use RSS to distribute traffic to the continuous queues
> > when packets match the above FD rule.
> >
> > With the support of queue range action, we can further provide QoS
> > service when DCB disabled.
> > eg: one NE (network element) is configured with two ip addresses, one for
> > control plane and the other for data plane, user can create two FD rules,
> > the first for directing control plane packets to queue 0, the second for
> > directing data plane packets to queue 1~15.
> 
> I don't understand why it is not covered by RSS action.
> 
+1
This should be covered in RSS action.

> >
> > Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
> > Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
> 
> [snip]

Best,
Ori

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-dev] [RFC PATCH] ethdev: add a new flow action of queue range
  2020-07-19 13:32   ` Ori Kam
@ 2020-07-19 13:34     ` Ori Kam
  0 siblings, 0 replies; 4+ messages in thread
From: Ori Kam @ 2020-07-19 13:34 UTC (permalink / raw)
  To: Ori Kam, Andrew Rybchenko, Wei Hu (Xavier), dev; +Cc: huwei87, fengchengwen

Hi Fengchen,

Please make sure to include maintainers next time.

Thanks,
Ori

> -----Original Message-----
> From: dev <dev-bounces@dpdk.org> On Behalf Of Ori Kam
> 
> 
> 
> > -----Original Message-----
> > From: dev <dev-bounces@dpdk.org> On Behalf Of Andrew Rybchenko
> >
> > On 7/17/20 12:32 PM, Wei Hu (Xavier) wrote:
> > > From: Chengwen Feng <fengchengwen@huawei.com>
> > >
> > > This patch adds a new flow action of queue range, which was used to assign
> > > packets to a continuous queue range.
> > >
> > > Current FD (flow director) provide a useful means to assign packets to
> > > a target queue. But it has the following shortage: it can only route
> > > to one queue, and there is an upper limit on one queue rxtx capacity,
> > > which means the FD rule need more accurate else it may exceed the
> > > queue capacity.
> > >
> > > With the support of queue range action, user can create FD rule with
> > > action routed to a continuous queues, like:
> > > 	FD rule 0 ------|-----> queue 0
> > > 			|-----> queue 1
> > >
> > > 	FD rule 1 ------|-----> queue 8
> > > 			|-----> queue 9
> > > 			|-----> queue 10
> > > 			|-----> queue 11
> > > Note: hardware can use RSS to distribute traffic to the continuous queues
> > > when packets match the above FD rule.
> > >
> > > With the support of queue range action, we can further provide QoS
> > > service when DCB disabled.
> > > eg: one NE (network element) is configured with two ip addresses, one for
> > > control plane and the other for data plane, user can create two FD rules,
> > > the first for directing control plane packets to queue 0, the second for
> > > directing data plane packets to queue 1~15.
> >
> > I don't understand why it is not covered by RSS action.
> >
> +1
> This should be covered in RSS action.
> 
> > >
> > > Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
> > > Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
> >
> > [snip]
> 
> Best,
> Ori

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-19 13:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-17  9:32 [dpdk-dev] [RFC PATCH] ethdev: add a new flow action of queue range Wei Hu (Xavier)
2020-07-19 12:30 ` Andrew Rybchenko
2020-07-19 13:32   ` Ori Kam
2020-07-19 13:34     ` Ori Kam

DPDK patches and discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \
		dev@dpdk.org
	public-inbox-index dev

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.dev


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git