From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C6C28A0530 for ; Wed, 22 Jan 2020 15:30:21 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 38A241BC25; Wed, 22 Jan 2020 15:30:18 +0100 (CET) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id EC06944C3 for ; Wed, 22 Jan 2020 15:30:03 +0100 (CET) Received: from Internal Mail-Server by MTLPINE1 (envelope-from dekelp@mellanox.com) with ESMTPS (AES256-SHA encrypted); 22 Jan 2020 16:30:01 +0200 Received: from mtl-vdi-280.wap.labs.mlnx. (mtl-vdi-280.wap.labs.mlnx [10.128.130.87]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id 00METnL6010555; Wed, 22 Jan 2020 16:30:01 +0200 From: Dekel Peled To: matan@mellanox.com, viacheslavo@mellanox.com Cc: rasland@mellanox.com, orika@mellanox.com, dev@dpdk.org, stable@dpdk.org Date: Wed, 22 Jan 2020 16:27:20 +0200 Message-Id: X-Mailer: git-send-email 1.7.1 In-Reply-To: References: Subject: [dpdk-stable] [PATCH 08/11] net/mlx5: fix pop VLAN action validation function X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Validation function of 'POP VLAN' action includes check for other 'POP VLAN' actions present in flow. It doesn't check for 'PUSH VLAN' actions present in flow. This patch adds check for 'PUSH VLAN' actions present in flow. Fixes: b41e47da2592 ("net/mlx5: support pop flow action on VLAN header") Cc: stable@dpdk.org Signed-off-by: Dekel Peled Acked-by: Ori Kam --- drivers/net/mlx5/mlx5_flow_dv.c | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow_dv.c b/drivers/net/mlx5/mlx5_flow_dv.c index 9dc08ce..de4b765 100644 --- a/drivers/net/mlx5/mlx5_flow_dv.c +++ b/drivers/net/mlx5/mlx5_flow_dv.c @@ -1640,17 +1640,10 @@ struct field_modify_info modify_tcp[] = { NULL, "pop vlan action not supported for " "egress"); - /* - * Check for inconsistencies: - * fail strip_vlan in a flow that matches packets without VLAN tags. - * fail strip_vlan in a flow that matches packets without explicitly a - * matching on VLAN tag ? - */ - if (action_flags & MLX5_FLOW_ACTION_OF_POP_VLAN) + if (action_flags & MLX5_FLOW_VLAN_ACTIONS) return rte_flow_error_set(error, ENOTSUP, - RTE_FLOW_ERROR_TYPE_UNSPECIFIED, - NULL, - "no support for multiple vlan pop " + RTE_FLOW_ERROR_TYPE_ACTION, action, + "no support for multiple VLAN " "actions"); if (!(item_flags & MLX5_FLOW_LAYER_OUTER_VLAN)) return rte_flow_error_set(error, ENOTSUP, -- 1.8.3.1