From: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
To: Xueming Li <xuemingl@mellanox.com>
Cc: Adrien Mazarguil <adrien.mazarguil@6wind.com>,
Thomas Monjalon <thomas@monjalon.net>,
dev@dpdk.org
Subject: Re: [dpdk-dev] [RFC 2/4] app/testpmd: support rte_flow rss level parsing
Date: Thu, 30 Nov 2017 09:18:28 +0100 [thread overview]
Message-ID: <20171130081828.acwftejwwlbuybsd@laranjeiro-vm.dev.6wind.com> (raw)
In-Reply-To: <20171129173106.120828-3-xuemingl@mellanox.com>
Hi Xueming,
On Thu, Nov 30, 2017 at 01:31:04AM +0800, Xueming Li wrote:
> Signed-off-by: Xueming Li <xuemingl@mellanox.com>
> ---
> app/test-pmd/cmdline_flow.c | 14 +++++++++++++-
> 1 file changed, 13 insertions(+), 1 deletion(-)
>
> diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
> index df16d2a..9402eb7 100644
> --- a/app/test-pmd/cmdline_flow.c
> +++ b/app/test-pmd/cmdline_flow.c
> @@ -194,6 +194,7 @@ enum index {
> ACTION_RSS,
> ACTION_RSS_QUEUES,
> ACTION_RSS_QUEUE,
> + ACTION_RSS_LEVEL,
> ACTION_PF,
> ACTION_VF,
> ACTION_VF_ORIGINAL,
> @@ -640,6 +641,7 @@ struct parse_action_priv {
>
> static const enum index action_rss[] = {
> ACTION_RSS_QUEUES,
> + ACTION_RSS_LEVEL,
> ACTION_NEXT,
> ZERO,
> };
> @@ -1586,6 +1588,13 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
> .call = parse_vc_action_rss_queue,
> .comp = comp_vc_action_rss_queue,
> },
> + [ACTION_RSS_LEVEL] = {
> + .name = "level",
> + .help = "rss on tunnel level",
> + .next = NEXT(action_rss, NEXT_ENTRY(UNSIGNED)),
> + .args = ARGS(ARGS_ENTRY(struct rte_flow_action_rss, level)),
> + .call = parse_vc_conf,
> + },
> [ACTION_PF] = {
> .name = "pf",
> .help = "redirect packets to physical device function",
> @@ -1887,6 +1896,7 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
> sizeof(double));
> if ((uint8_t *)item + sizeof(*item) > data)
> return -1;
> + memset(data, 0, data_size);
> *item = (struct rte_flow_item){
> .type = priv->type,
> };
> @@ -1904,6 +1914,9 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
> sizeof(double));
> if ((uint8_t *)action + sizeof(*action) > data)
> return -1;
> + memset(data, 0, data_size);
> + if (priv->type == RTE_FLOW_ACTION_TYPE_RSS)
> + ((struct rte_flow_action_rss *)data)->level = -1;
I strongly suggest to let the level set to outer, otherwise most of the
PMD will have to refuse such rule.
> *action = (struct rte_flow_action){
> .type = priv->type,
> };
> @@ -1911,7 +1924,6 @@ static int comp_vc_action_rss_queue(struct context *, const struct token *,
> ctx->object = action;
> ctx->objmask = NULL;
> }
> - memset(data, 0, data_size);
> out->args.vc.data = data;
> ctx->objdata = data_size;
> return len;
> --
> 1.8.3.1
>
--
Nélio Laranjeiro
6WIND
next prev parent reply other threads:[~2017-11-30 8:18 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-29 17:31 [dpdk-dev] [RFC 0/4] tunnel enhancements Xueming Li
2017-11-29 17:31 ` [dpdk-dev] [RFC 1/4] ethdev: support rss level on tunnel Xueming Li
2017-11-30 8:16 ` Nelio Laranjeiro
2017-11-30 8:46 ` Xueming(Steven) Li
2017-11-30 10:14 ` Nelio Laranjeiro
2017-12-03 6:08 ` [dpdk-dev] [RFC v1 0/5] tunnel enhancements Xueming Li
2017-12-03 6:08 ` [dpdk-dev] [RFC v1 1/5] ethdev: support rss level on tunnel Xueming Li
2017-12-04 8:10 ` Nelio Laranjeiro
2017-12-04 9:05 ` Xueming(Steven) Li
2017-12-04 10:32 ` Nelio Laranjeiro
2017-12-04 14:24 ` Xueming(Steven) Li
2017-12-04 15:00 ` Nelio Laranjeiro
2017-12-03 6:08 ` [dpdk-dev] [RFC v1 2/5] app/testpmd: support rte_flow rss level parsing Xueming Li
2017-12-03 6:08 ` [dpdk-dev] [RFC v1 3/5] ethdev: support GRE and L3VXLAN tunnel type Xueming Li
2017-12-03 6:08 ` [dpdk-dev] [RFC v1 4/5] app/testpmd: support l3vxlan " Xueming Li
2017-12-03 6:08 ` [dpdk-dev] [RFC v1 5/5] mbuf: add L3 VXLAN packet type Xueming Li
2017-11-29 17:31 ` [dpdk-dev] [RFC 2/4] app/testpmd: support rte_flow rss level parsing Xueming Li
2017-11-30 8:18 ` Nelio Laranjeiro [this message]
2017-11-30 8:50 ` Xueming(Steven) Li
2017-11-30 10:13 ` Nelio Laranjeiro
2017-11-29 17:31 ` [dpdk-dev] [RFC 3/4] ethdev: support GRE and L3VXLAN tunnel type Xueming Li
2017-11-29 17:31 ` [dpdk-dev] [RFC 4/4] app/testpmd: support l3vxlan " Xueming Li
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=20171130081828.acwftejwwlbuybsd@laranjeiro-vm.dev.6wind.com \
--to=nelio.laranjeiro@6wind.com \
--cc=adrien.mazarguil@6wind.com \
--cc=dev@dpdk.org \
--cc=thomas@monjalon.net \
--cc=xuemingl@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).