From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id 0153C2A62 for ; Thu, 30 Nov 2017 11:13:33 +0100 (CET) Received: by mail-wm0-f65.google.com with SMTP id i11so11307041wmf.4 for ; Thu, 30 Nov 2017 02:13:33 -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=VS/QrSwT9Crnon+hFXnCQ49m4BNKV4NJZ6NuseCyM7Y=; b=gByNbB66u/+0fzfzw8c3rA6HjdZOYbBhXgrfMROaBRSocDamfoHw+6zriuDnX5jXw9 6KjDJ3SSjHLeBQePnbZejOP/zWWVkizKn4gooJapY3rbZ5oCbs8m3w2Y/VVL4VHy5ia+ udN+ky/jRNWJkfzxxu0a+dmTrup+yzy7jzWqL0XzDyoLMgPl6rm6ncffBUcQLLuR+DIV nnBEZhJ/Z42vGKAuyyFM9cAWSRgn/IsGWh/lAH3H8+LhkO4PE08aNFSqaFJ3YrVQJhlw t81jrmn0ae0o8TttbtgWQPKloohdbigs1Xt3qcpZoVl0xUTZG0NbkGhmYT7CoOZNoTQq Zlgw== 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=VS/QrSwT9Crnon+hFXnCQ49m4BNKV4NJZ6NuseCyM7Y=; b=aocHd/G2cHPB/mxk3Qq4fzAW262HQgOjJ4SQjdT343a2IK1vew1oixps7UQmS8tYWQ ROuko48+WFXOaymMpgUdcZdUxtfBRJw4wgpghtVHq7udEurFr+xgPD8F6ozpfIvpixm1 ZWBCYVTA6OosKEdginMiGks35IWMRX4lP1Pmbp65znrRY6VEalbxdI/a5/tot2mF1P3I IolcQiOinT/tMET+47rYSaTp36glF/Zmd6U3xgMtWO7BKM6K52ge2CI1FZae30FFhKUT ZMPMpJ+Pm8Wcn1Sjf0bHGNuL3fPxOGbDAKLQPXtED+j2qcLLranTDuVKjBeebZf4BPbX W0Kw== X-Gm-Message-State: AJaThX7vxMDAkN/uSeETsX6wyt83OZLFQQoAvskqczvwR6631VkiqrBI sg6qmOiN03T0apTm7E0XW1IaH/ve0A== X-Google-Smtp-Source: AGs4zMbnkJtoc246igDzDe2SBzw1AfqUDHNB7wEZm1ximkLavRTbGAMBQsbUitfidHHU+v2ssf/oeA== X-Received: by 10.80.139.65 with SMTP id l59mr12190813edl.187.1512036813516; Thu, 30 Nov 2017 02:13:33 -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 y1sm2791577edl.39.2017.11.30.02.13.32 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 30 Nov 2017 02:13:32 -0800 (PST) Date: Thu, 30 Nov 2017 11:13:35 +0100 From: Nelio Laranjeiro To: "Xueming(Steven) Li" Cc: Adrien Mazarguil , Thomas Monjalon , "dev@dpdk.org" Message-ID: <20171130101335.mau3tykqrfn535ix@laranjeiro-vm.dev.6wind.com> References: <20171129173106.120828-1-xuemingl@mellanox.com> <20171129173106.120828-3-xuemingl@mellanox.com> <20171130081828.acwftejwwlbuybsd@laranjeiro-vm.dev.6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: 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 10:13:34 -0000 On Thu, Nov 30, 2017 at 08:50:13AM +0000, Xueming(Steven) Li wrote: > > > > -----Original Message----- > > From: Nelio Laranjeiro [mailto:nelio.laranjeiro@6wind.com] > > Sent: Thursday, November 30, 2017 4:18 PM > > To: Xueming(Steven) Li > > Cc: Adrien Mazarguil ; Thomas Monjalon > > ; dev@dpdk.org > > Subject: Re: [RFC 2/4] app/testpmd: support rte_flow rss level parsing > > > > 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. > Default to outer rss? Would be glad to hear more suggestion on this. The point is, not a single NIC will react the same way with testpmd with such value as default. NIC with RSS inner capability will start spreading tunnel packets differently than the other who don't have it. Default value should be set to have the same default on all NIC. > > > *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