From: Pascal Mazon <pascal.mazon@6wind.com>
To: Matan Azrad <matan@mellanox.com>
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] [PATCH 2/2] net/tap: allow RSS flow action
Date: Wed, 4 Oct 2017 10:37:15 +0200 [thread overview]
Message-ID: <93510ae3-736c-8a2c-f04b-534f3b545eed@6wind.com> (raw)
In-Reply-To: <bcccd4f4-b717-1d23-5e59-db5fc4d8f47a@6wind.com>
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;
>> }
next prev parent reply other threads:[~2017-10-04 8:37 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2017-10-05 21:34 ` Ferruh Yigit
2017-10-03 22:07 ` [dpdk-dev] [PATCH 1/2] net/tap: fix indentation in flow file Ferruh Yigit
2017-10-04 8:15 ` Pascal Mazon
2017-10-04 17:26 ` Ferruh Yigit
2017-10-05 21:33 ` Ferruh Yigit
2017-10-16 8:04 ` Pascal Mazon
[not found] <1507042327-9501-1-git-send-email-root@pegasus12.mtr.labs.mlnx>
[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
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=93510ae3-736c-8a2c-f04b-534f3b545eed@6wind.com \
--to=pascal.mazon@6wind.com \
--cc=dev@dpdk.org \
--cc=matan@mellanox.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).