From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f196.google.com (mail-wr0-f196.google.com [209.85.128.196]) by dpdk.org (Postfix) with ESMTP id 280531B7A6 for ; Tue, 15 May 2018 11:38:02 +0200 (CEST) Received: by mail-wr0-f196.google.com with SMTP id g21-v6so15226605wrb.8 for ; Tue, 15 May 2018 02:38:02 -0700 (PDT) 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=gRLcFYEtuOePEPXNy5/GiXbh8lcL2K8pouwonV21Rz4=; b=ZomcLbvkjFQNIVSiF6OXVgWQdTfGjWAfZ/9A9l9rBIME+uHao8fT5cTASj0qINavQy seJQ2YDV+sOqFpOLyHmed283KZigsRlr60azJBXCl8kPP6eYexMgWvevwB9pSBUfqM9w fgFxAijbBEdN1RuUrX4zt6Fx65RbM+RtV/+eTu8OQF/Iu6pKpwzFSSUVbIaIQ+Q5Xzji K6T3XHviHYCzLTvjkXnaT3dycouVkFRht7VFbALGniovPNzyGwmHpcs1dYzODtUiriN7 Z5STW9XGIy0oiAJH0CpNfX/YLOrjYZz60zWoLEasQr+Yy0sdk8Ea/oV0mWOB40dwYApL OPCQ== 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=gRLcFYEtuOePEPXNy5/GiXbh8lcL2K8pouwonV21Rz4=; b=KwGBQuitSadrTDvV4nYNIcq2wftWo3MkLCaeYJhmRML8YYNRekV4w4rrrQ3ILUHmoN p4agZ29coLQAqcRuU/f1HQJ8WFo28FpE4Xi8R8zpKZ9gSNur7kmpYDUxI+0EH7pSnad9 cenZRArU/z2rYOKCOs71ReqMaEX2nhaTUnfQZgbzZLC79Nz1fnNGXTuTi9Xxw8mDU0Jq 08CDj0j0yDJE/T+V9evjzmHF8g+laG62MDvIt27Z8CvD53o0OyuvlXKCXQBwqEtAomq+ zys1Yzm6oFSukA7VqujlOXAJsAhjPsXdXRRwsSZAL6h/4x3k3EQr4jo5DsmhQYPoqTog ML4g== X-Gm-Message-State: ALKqPwff9Vsu89foQyVKQ1d3JkqPB3+MvBDOtk8XHOlKMEF5+HeElhKx GRCwLjywWLZCvMSJ8ZnPxSBH X-Google-Smtp-Source: AB8JxZpWXVWRk852mBteqvNDdAy16+2HuSGQ9wpkdYYX9znP0cZy5NxfBOrwXjDcbflJclo/g0ah6A== X-Received: by 2002:adf:9893:: with SMTP id w19-v6mr10505953wrb.34.1526377081913; Tue, 15 May 2018 02:38:01 -0700 (PDT) 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 m35-v6sm13372016wrm.51.2018.05.15.02.38.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 May 2018 02:38:01 -0700 (PDT) Date: Tue, 15 May 2018 11:37:47 +0200 From: =?iso-8859-1?Q?N=E9lio?= Laranjeiro To: Matan Azrad Cc: Shahaf Shuler , dev@dpdk.org Message-ID: <20180515093747.33pcjpl25y5klibk@laranjeiro-vm.dev.6wind.com> References: <1526305280-23078-1-git-send-email-matan@mellanox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1526305280-23078-1-git-send-email-matan@mellanox.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH] net/mlx5: support MPLS-in-GRE and MPLS-in-UDP 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: Tue, 15 May 2018 09:38:02 -0000 Hi Matan, I have a single comment, please see bellow, On Mon, May 14, 2018 at 01:41:20PM +0000, Matan Azrad wrote: > Add support for MPLS over GRE and MPLS over UDP tunnel types as > described in the next RFCs: > 1. https://tools.ietf.org/html/rfc4023 > 2. https://tools.ietf.org/html/rfc7510 > 3. https://tools.ietf.org/html/rfc4385 > > Signed-off-by: Matan Azrad > --- > doc/guides/nics/mlx5.rst | 4 +- > drivers/net/mlx5/Makefile | 5 ++ > drivers/net/mlx5/mlx5.c | 13 ++++ > drivers/net/mlx5/mlx5.h | 1 + > drivers/net/mlx5/mlx5_flow.c | 154 +++++++++++++++++++++++++++++++++++++++++-- > 5 files changed, 170 insertions(+), 7 deletions(-) >[...] > @@ -896,7 +928,9 @@ struct ibv_spec_header { > if (ret) > goto exit_item_not_supported; > if (IS_TUNNEL(items->type)) { > - if (parser->tunnel) { > + if (parser->tunnel && > + !((items - 1)->type == RTE_FLOW_ITEM_TYPE_GRE && > + items->type == RTE_FLOW_ITEM_TYPE_MPLS)) { > rte_flow_error_set(error, ENOTSUP, > RTE_FLOW_ERROR_TYPE_ITEM, > items, > @@ -904,6 +938,16 @@ struct ibv_spec_header { > " tunnel encapsulations."); > return -rte_errno; > } > + if (items->type == RTE_FLOW_ITEM_TYPE_MPLS && > + !priv->config.mpls_en) { > + rte_flow_error_set(error, ENOTSUP, > + RTE_FLOW_ERROR_TYPE_ITEM, > + items, > + "MPLS not supported or" > + " disabled in firmware" > + " configuration."); > + return -rte_errno; > + } > if (!priv->config.tunnel_en && > parser->rss_conf.level > 1) { > rte_flow_error_set(error, ENOTSUP, Doing such comparison will not work in all cases like GRE / VOID / MPLS which is totally valid from rte_flow perspective. Regards, -- Nélio Laranjeiro 6WIND