DPDK patches and discussions
 help / color / mirror / Atom feed
From: Matan Azrad <matan@mellanox.com>
To: root <root@pegasus12.mtr.labs.mlnx>,
	Pascal Mazon <pascal.mazon@6wind.com>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 2/2] net/tap: allow RSS flow action
Date: Tue, 3 Oct 2017 15:07:37 +0000	[thread overview]
Message-ID: <DB6PR0502MB304858A8C7DCAC1947E75B23D2720@DB6PR0502MB3048.eurprd05.prod.outlook.com> (raw)
In-Reply-To: <1507042327-9501-2-git-send-email-root@pegasus12.mtr.labs.mlnx>

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

  parent reply	other threads:[~2017-10-03 15:07 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [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   ` Matan Azrad [this message]
2017-10-03 14:55 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

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=DB6PR0502MB304858A8C7DCAC1947E75B23D2720@DB6PR0502MB3048.eurprd05.prod.outlook.com \
    --to=matan@mellanox.com \
    --cc=dev@dpdk.org \
    --cc=pascal.mazon@6wind.com \
    --cc=root@pegasus12.mtr.labs.mlnx \
    /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).