DPDK patches and discussions
 help / color / mirror / Atom feed
* Re: [dpdk-dev] [PATCH 1/2] net/tap: fix indentation in flow file
       [not found] <1507042327-9501-1-git-send-email-root@pegasus12.mtr.labs.mlnx>
@ 2017-10-03 15:07 ` Matan Azrad
       [not found] ` <1507042327-9501-2-git-send-email-root@pegasus12.mtr.labs.mlnx>
  1 sibling, 0 replies; 6+ messages in thread
From: Matan Azrad @ 2017-10-03 15:07 UTC (permalink / raw)
  To: root, Pascal Mazon; +Cc: dev

I sent it from root user by mistake, sorry!
I Sent it again with my user.

> -----Original Message-----
> From: root [mailto:root@pegasus12.mtr.labs.mlnx]
> Sent: Tuesday, October 3, 2017 5:52 PM
> To: Pascal Mazon <pascal.mazon@6wind.com>
> Cc: dev@dpdk.org; Matan Azrad <matan@mellanox.com>
> Subject: [PATCH 1/2] net/tap: fix indentation in flow file
> 
> From: Matan Azrad <matan@mellanox.com>
> 
> Missed 4 spaces were added after break if line.
> 
> Fixes: 7a6811d78ed6 ("net/tap: fix flow and port commands")
> 
> Signed-off-by: Matan Azrad <matan@mellanox.com>
> ---
>  drivers/net/tap/tap_flow.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c index
> eefa868..aa33960 100644
> --- a/drivers/net/tap/tap_flow.c
> +++ b/drivers/net/tap/tap_flow.c
> @@ -1093,7 +1093,7 @@ struct tap_flow_items {
>  				goto exit_action_not_supported;
>  			action = 1;
>  			if (!queue ||
> -			(queue->index > pmd->dev->data->nb_rx_queues -
> 1))
> +			    (queue->index > pmd->dev->data->nb_rx_queues
> - 1))
>  				goto exit_action_not_supported;
>  			if (flow)
>  				err = add_action_skbedit(flow, queue-
> >index);
> --
> 1.8.3.1

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

* Re: [dpdk-dev] [PATCH 2/2] net/tap: allow RSS flow action
       [not found] ` <1507042327-9501-2-git-send-email-root@pegasus12.mtr.labs.mlnx>
@ 2017-10-03 15:07   ` Matan Azrad
  0 siblings, 0 replies; 6+ messages in thread
From: Matan Azrad @ 2017-10-03 15:07 UTC (permalink / raw)
  To: root, Pascal Mazon; +Cc: dev

I sent it from root user by mistake, sorry!
I Sent it again with my user.

> -----Original Message-----
> From: root [mailto:root@pegasus12.mtr.labs.mlnx]
> Sent: Tuesday, October 3, 2017 5:52 PM
> To: Pascal Mazon <pascal.mazon@6wind.com>
> Cc: dev@dpdk.org; Matan Azrad <matan@mellanox.com>
> Subject: [PATCH 2/2] net/tap: allow RSS flow action
> 
> From: Matan Azrad <matan@mellanox.com>
> 
> One of the main identified use cases for the tap PMD is to be used in
> combination with the fail-safe PMD as a fallback for a physical device.
> 
> Fail-safe is very strict about making sure its current configuration is properly
> applied to all slave devices, they get rejected otherwise in order to maintain
> a consistent state.
> 
> The problem is that tap's RSS support is currently limited to the default (non-
> Toeplitz) balancing performed by the kernel on all Rx queues. While proper
> RSS support emulation in the tap PMD is a work in progress, the lack of
> rte_flow counterpart prevents validation of the above use case in the
> meantime.
> 
> Given that unlike most PMDs, tap is more about convenience than
> performance, support for the RSS action can be temporarily faked with a
> minimum amount of code and mostly correct behavior by treating it like a
> QUEUE action. Traffic is directed to the first queue of the set.
> 
> Signed-off-by: Matan Azrad <matan@mellanox.com>
> ---
>  drivers/net/tap/tap_flow.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c index
> aa33960..28d793f 100644
> --- a/drivers/net/tap/tap_flow.c
> +++ b/drivers/net/tap/tap_flow.c
> @@ -1089,6 +1089,7 @@ struct tap_flow_items {
>  			const struct rte_flow_action_queue *queue =
>  				(const struct rte_flow_action_queue *)
>  				actions->conf;
> +
>  			if (action)
>  				goto exit_action_not_supported;
>  			action = 1;
> @@ -1097,6 +1098,20 @@ struct tap_flow_items {
>  				goto exit_action_not_supported;
>  			if (flow)
>  				err = add_action_skbedit(flow, queue-
> >index);
> +		} else if (actions->type == RTE_FLOW_ACTION_TYPE_RSS) {
> +			/* Fake RSS support. */
> +			const struct rte_flow_action_rss *rss =
> +				(const struct rte_flow_action_rss *)
> +				actions->conf;
> +
> +			if (action)
> +				goto exit_action_not_supported;
> +			action = 1;
> +			if (!rss || rss->num < 1 ||
> +			    (rss->queue[0] > pmd->dev->data->nb_rx_queues
> - 1))
> +				goto exit_action_not_supported;
> +			if (flow)
> +				err = add_action_skbedit(flow, rss-
> >queue[0]);
>  		} else {
>  			goto exit_action_not_supported;
>  		}
> --
> 1.8.3.1

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

* Re: [dpdk-dev] [PATCH 2/2] net/tap: allow RSS flow action
  2017-10-04  8:37     ` Pascal Mazon
@ 2017-10-05 21:34       ` Ferruh Yigit
  0 siblings, 0 replies; 6+ messages in thread
From: Ferruh Yigit @ 2017-10-05 21:34 UTC (permalink / raw)
  To: Pascal Mazon, Matan Azrad; +Cc: dev

<...>

>> On 03/10/2017 16:55, Matan Azrad wrote:
>>> One of the main identified use cases for the tap PMD is to be used in
>>> combination with the fail-safe PMD as a fallback for a physical device.
>>>
>>> Fail-safe is very strict about making sure its current configuration is
>>> properly applied to all slave devices, they get rejected otherwise in
>>> order to maintain a consistent state.
>>>
>>> The problem is that tap's RSS support is currently limited to the
>>> default (non-Toeplitz) balancing performed by the kernel on all Rx
>>> queues. While proper RSS support emulation in the tap PMD is a work in
>>> progress, the lack of rte_flow counterpart prevents validation of the
>>> above use case in the meantime.
>>>
>>> Given that unlike most PMDs, tap is more about convenience than
>>> performance, support for the RSS action can be temporarily faked with
>>> a minimum amount of code and mostly correct behavior by treating it
>>> like a QUEUE action. Traffic is directed to the first queue of the set.
>>>
>>> Signed-off-by: Matan Azrad <matan@mellanox.com>

> Acked-by: Pascal Mazon <pascal.mazon@6wind.com>

Applied to dpdk-next-net/master, thanks.

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

* Re: [dpdk-dev] [PATCH 2/2] net/tap: allow RSS flow action
  2017-10-04  8:19   ` Pascal Mazon
@ 2017-10-04  8:37     ` Pascal Mazon
  2017-10-05 21:34       ` Ferruh Yigit
  0 siblings, 1 reply; 6+ messages in thread
From: Pascal Mazon @ 2017-10-04  8:37 UTC (permalink / raw)
  To: Matan Azrad; +Cc: dev

Hi,

I was a little too quick earlier. The line breaks are justified because
they follow the list of variable declarations.

So I ack the whole patch series.

Acked-by: Pascal Mazon <pascal.mazon@6wind.com>

On 04/10/2017 10:19, Pascal Mazon wrote:
> Hi,
>
> What you say stands to reason, I'm basically ok with your patch, except
> for one remark.
> The rest of the file has no line breaks anywhere, please remove the two
> you added.
>
> Best regards,
> Pascal
>
> On 03/10/2017 16:55, Matan Azrad wrote:
>> One of the main identified use cases for the tap PMD is to be used in
>> combination with the fail-safe PMD as a fallback for a physical device.
>>
>> Fail-safe is very strict about making sure its current configuration is
>> properly applied to all slave devices, they get rejected otherwise in
>> order to maintain a consistent state.
>>
>> The problem is that tap's RSS support is currently limited to the
>> default (non-Toeplitz) balancing performed by the kernel on all Rx
>> queues. While proper RSS support emulation in the tap PMD is a work in
>> progress, the lack of rte_flow counterpart prevents validation of the
>> above use case in the meantime.
>>
>> Given that unlike most PMDs, tap is more about convenience than
>> performance, support for the RSS action can be temporarily faked with
>> a minimum amount of code and mostly correct behavior by treating it
>> like a QUEUE action. Traffic is directed to the first queue of the set.
>>
>> Signed-off-by: Matan Azrad <matan@mellanox.com>
>> ---
>>  drivers/net/tap/tap_flow.c | 15 +++++++++++++++
>>  1 file changed, 15 insertions(+)
>>
>> diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c
>> index aa33960..28d793f 100644
>> --- a/drivers/net/tap/tap_flow.c
>> +++ b/drivers/net/tap/tap_flow.c
>> @@ -1089,6 +1089,7 @@ struct tap_flow_items {
>>  			const struct rte_flow_action_queue *queue =
>>  				(const struct rte_flow_action_queue *)
>>  				actions->conf;
>> +
>>  			if (action)
>>  				goto exit_action_not_supported;
>>  			action = 1;
>> @@ -1097,6 +1098,20 @@ struct tap_flow_items {
>>  				goto exit_action_not_supported;
>>  			if (flow)
>>  				err = add_action_skbedit(flow, queue->index);
>> +		} else if (actions->type == RTE_FLOW_ACTION_TYPE_RSS) {
>> +			/* Fake RSS support. */
>> +			const struct rte_flow_action_rss *rss =
>> +				(const struct rte_flow_action_rss *)
>> +				actions->conf;
>> +
>> +			if (action)
>> +				goto exit_action_not_supported;
>> +			action = 1;
>> +			if (!rss || rss->num < 1 ||
>> +			    (rss->queue[0] > pmd->dev->data->nb_rx_queues - 1))
>> +				goto exit_action_not_supported;
>> +			if (flow)
>> +				err = add_action_skbedit(flow, rss->queue[0]);
>>  		} else {
>>  			goto exit_action_not_supported;
>>  		}

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

* Re: [dpdk-dev] [PATCH 2/2] net/tap: allow RSS flow action
  2017-10-03 14:55 ` [dpdk-dev] [PATCH 2/2] net/tap: allow RSS flow action Matan Azrad
@ 2017-10-04  8:19   ` Pascal Mazon
  2017-10-04  8:37     ` Pascal Mazon
  0 siblings, 1 reply; 6+ messages in thread
From: Pascal Mazon @ 2017-10-04  8:19 UTC (permalink / raw)
  To: Matan Azrad; +Cc: dev

Hi,

What you say stands to reason, I'm basically ok with your patch, except
for one remark.
The rest of the file has no line breaks anywhere, please remove the two
you added.

Best regards,
Pascal

On 03/10/2017 16:55, Matan Azrad wrote:
> One of the main identified use cases for the tap PMD is to be used in
> combination with the fail-safe PMD as a fallback for a physical device.
>
> Fail-safe is very strict about making sure its current configuration is
> properly applied to all slave devices, they get rejected otherwise in
> order to maintain a consistent state.
>
> The problem is that tap's RSS support is currently limited to the
> default (non-Toeplitz) balancing performed by the kernel on all Rx
> queues. While proper RSS support emulation in the tap PMD is a work in
> progress, the lack of rte_flow counterpart prevents validation of the
> above use case in the meantime.
>
> Given that unlike most PMDs, tap is more about convenience than
> performance, support for the RSS action can be temporarily faked with
> a minimum amount of code and mostly correct behavior by treating it
> like a QUEUE action. Traffic is directed to the first queue of the set.
>
> Signed-off-by: Matan Azrad <matan@mellanox.com>
> ---
>  drivers/net/tap/tap_flow.c | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
>
> diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c
> index aa33960..28d793f 100644
> --- a/drivers/net/tap/tap_flow.c
> +++ b/drivers/net/tap/tap_flow.c
> @@ -1089,6 +1089,7 @@ struct tap_flow_items {
>  			const struct rte_flow_action_queue *queue =
>  				(const struct rte_flow_action_queue *)
>  				actions->conf;
> +
>  			if (action)
>  				goto exit_action_not_supported;
>  			action = 1;
> @@ -1097,6 +1098,20 @@ struct tap_flow_items {
>  				goto exit_action_not_supported;
>  			if (flow)
>  				err = add_action_skbedit(flow, queue->index);
> +		} else if (actions->type == RTE_FLOW_ACTION_TYPE_RSS) {
> +			/* Fake RSS support. */
> +			const struct rte_flow_action_rss *rss =
> +				(const struct rte_flow_action_rss *)
> +				actions->conf;
> +
> +			if (action)
> +				goto exit_action_not_supported;
> +			action = 1;
> +			if (!rss || rss->num < 1 ||
> +			    (rss->queue[0] > pmd->dev->data->nb_rx_queues - 1))
> +				goto exit_action_not_supported;
> +			if (flow)
> +				err = add_action_skbedit(flow, rss->queue[0]);
>  		} else {
>  			goto exit_action_not_supported;
>  		}

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

* [dpdk-dev] [PATCH 2/2] net/tap: allow RSS flow action
  2017-10-03 14:55 [dpdk-dev] [PATCH 1/2] net/tap: fix indentation in flow file Matan Azrad
@ 2017-10-03 14:55 ` Matan Azrad
  2017-10-04  8:19   ` Pascal Mazon
  0 siblings, 1 reply; 6+ messages in thread
From: Matan Azrad @ 2017-10-03 14:55 UTC (permalink / raw)
  To: Pascal Mazon; +Cc: dev

One of the main identified use cases for the tap PMD is to be used in
combination with the fail-safe PMD as a fallback for a physical device.

Fail-safe is very strict about making sure its current configuration is
properly applied to all slave devices, they get rejected otherwise in
order to maintain a consistent state.

The problem is that tap's RSS support is currently limited to the
default (non-Toeplitz) balancing performed by the kernel on all Rx
queues. While proper RSS support emulation in the tap PMD is a work in
progress, the lack of rte_flow counterpart prevents validation of the
above use case in the meantime.

Given that unlike most PMDs, tap is more about convenience than
performance, support for the RSS action can be temporarily faked with
a minimum amount of code and mostly correct behavior by treating it
like a QUEUE action. Traffic is directed to the first queue of the set.

Signed-off-by: Matan Azrad <matan@mellanox.com>
---
 drivers/net/tap/tap_flow.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/net/tap/tap_flow.c b/drivers/net/tap/tap_flow.c
index aa33960..28d793f 100644
--- a/drivers/net/tap/tap_flow.c
+++ b/drivers/net/tap/tap_flow.c
@@ -1089,6 +1089,7 @@ struct tap_flow_items {
 			const struct rte_flow_action_queue *queue =
 				(const struct rte_flow_action_queue *)
 				actions->conf;
+
 			if (action)
 				goto exit_action_not_supported;
 			action = 1;
@@ -1097,6 +1098,20 @@ struct tap_flow_items {
 				goto exit_action_not_supported;
 			if (flow)
 				err = add_action_skbedit(flow, queue->index);
+		} else if (actions->type == RTE_FLOW_ACTION_TYPE_RSS) {
+			/* Fake RSS support. */
+			const struct rte_flow_action_rss *rss =
+				(const struct rte_flow_action_rss *)
+				actions->conf;
+
+			if (action)
+				goto exit_action_not_supported;
+			action = 1;
+			if (!rss || rss->num < 1 ||
+			    (rss->queue[0] > pmd->dev->data->nb_rx_queues - 1))
+				goto exit_action_not_supported;
+			if (flow)
+				err = add_action_skbedit(flow, rss->queue[0]);
 		} else {
 			goto exit_action_not_supported;
 		}
-- 
1.8.3.1

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

end of thread, other threads:[~2017-10-05 21:34 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <1507042327-9501-1-git-send-email-root@pegasus12.mtr.labs.mlnx>
2017-10-03 15:07 ` [dpdk-dev] [PATCH 1/2] net/tap: fix indentation in flow file Matan Azrad
     [not found] ` <1507042327-9501-2-git-send-email-root@pegasus12.mtr.labs.mlnx>
2017-10-03 15:07   ` [dpdk-dev] [PATCH 2/2] net/tap: allow RSS flow action Matan Azrad
2017-10-03 14:55 [dpdk-dev] [PATCH 1/2] net/tap: fix indentation in flow file Matan Azrad
2017-10-03 14:55 ` [dpdk-dev] [PATCH 2/2] net/tap: allow RSS flow action Matan Azrad
2017-10-04  8:19   ` Pascal Mazon
2017-10-04  8:37     ` Pascal Mazon
2017-10-05 21:34       ` Ferruh Yigit

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).