From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xueming Li Subject: [PATCH v2 10/15] net/mlx5: allow flow tunnel ID 0 with outer pattern Date: Tue, 10 Apr 2018 21:34:10 +0800 Message-ID: <20180410133415.189905-11-xuemingl@mellanox.com> References: <20180410133415.189905-1-xuemingl@mellanox.com> Cc: Xueming Li , dev@dpdk.org To: Nelio Laranjeiro , Shahaf Shuler Return-path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id A47761BA9D for ; Tue, 10 Apr 2018 15:34:41 +0200 (CEST) In-Reply-To: <20180410133415.189905-1-xuemingl@mellanox.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Tunnel w/o tunnel id pattern could match any non-tunneled packet, this patch allowed tunnel w/o tunnel id pattern after proper outer spec. Signed-off-by: Xueming Li --- drivers/net/mlx5/mlx5_flow.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 857b8b716..58d437308 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -1803,7 +1803,8 @@ mlx5_flow_create_vxlan(const struct rte_flow_item *item, * before will also match this rule. * To avoid such situation, VNI 0 is currently refused. */ - if (!vxlan.val.tunnel_id) + /* Only allow tunnel w/o tunnel id pattern after proper outer spec. */ + if (parser->out_layer == HASH_RXQ_ETH && !vxlan.val.tunnel_id) return rte_flow_error_set(data->error, EINVAL, RTE_FLOW_ERROR_TYPE_ITEM, item, -- 2.13.3