From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f66.google.com (mail-wm0-f66.google.com [74.125.82.66]) by dpdk.org (Postfix) with ESMTP id C7A0328EE for ; Thu, 30 Nov 2017 09:18:26 +0100 (CET) Received: by mail-wm0-f66.google.com with SMTP id 9so11237686wme.4 for ; Thu, 30 Nov 2017 00:18:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=8wVd4zjsh2RMJI0Gnv/AtIgH0MdANcvIxnMKqrF02ko=; b=1Dp6u8Ya/05FL2pn8tgIFOI0YDYCUvqjiePSgFgAuAL9G4mvAHORIfeD3+oAt28iZO hZsmG1qYK1sTsSh5I7gOT8t91gSTsyLsi8UHgZO8NFTBxQZc+umNP5w0cQ1iTYLooUOQ 72tXrmMuWfKzRInhcSGyewkDKjLe2ly/lCtndjidvSJPrkFL4m/nSYcrimiOMCbeuEkc QAOFjmw+aBfK5fNkRFnRNPidj8IBZDgkdTVLxvad8aWio1nM3lQ0eoaawK9JbOEK4aWm Wu459SSCjm7pi42cq5rWUAYXDFaCf94KR/KkP6ThQButAVszaT1/osXzpQPDjH0w7H8S jcUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=8wVd4zjsh2RMJI0Gnv/AtIgH0MdANcvIxnMKqrF02ko=; b=InvDcwslX2w5JXctTu2JgSvHPw0RhyYA0xlBaSqvL9iyokvqxbAb1m30Go7A+CPQ4k MD97x0NyIBwclWvcz1jBDDfC8tZWtMh02+PeT5k9sKYS0bHubclVd5EeQAcf9stEX2IH y9sDXHu1xe5H84J3X3jmJxhmbulKGuADKGwWNlU4xmLV+1DGb2/NNKlKBjgtdM4iLXAn k+5iYvkBnaPuSNtDXsuEDYw+oHn2JRexjED6/hk5wLAYhZZxL8KVn/2Zro1m+Zd8gnwR 5ciK3ddoy609IaovhR+ysQaCqztcZj/nRGDgNb4mKHUMwoCvTVLYzR/gSRVmf235YRcF Uyww== X-Gm-Message-State: AJaThX5vo2jTE1yS4mhKic/PWKE2K5DfSq6GHAKcbaXmgDt2iehCGruZ XX8f4ipJNgVHAqb1jknoDYsV X-Google-Smtp-Source: AGs4zMYCOX0cGyqzpcOfxCRrqP+sp+hFjhheGRPMqxNaNhKnb/JQM41WWI5AncbslV62XL6c/ltKnw== X-Received: by 10.28.33.136 with SMTP id h130mr1079061wmh.151.1512029906470; Thu, 30 Nov 2017 00:18:26 -0800 (PST) Received: from laranjeiro-vm.dev.6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id k14sm3924496wrc.90.2017.11.30.00.18.25 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 30 Nov 2017 00:18:25 -0800 (PST) Date: Thu, 30 Nov 2017 09:18:28 +0100 From: Nelio Laranjeiro To: Xueming Li Cc: Adrien Mazarguil , Thomas Monjalon , dev@dpdk.org Message-ID: <20171130081828.acwftejwwlbuybsd@laranjeiro-vm.dev.6wind.com> References: <20171129173106.120828-1-xuemingl@mellanox.com> <20171129173106.120828-3-xuemingl@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20171129173106.120828-3-xuemingl@mellanox.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [RFC 2/4] app/testpmd: support rte_flow rss level parsing X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 30 Nov 2017 08:18:27 -0000 Hi Xueming, On Thu, Nov 30, 2017 at 01:31:04AM +0800, Xueming Li wrote: > Signed-off-by: Xueming Li > --- > 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