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 7DA53A0487 for ; Mon, 29 Jul 2019 17:15:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 70EF11BF94; Mon, 29 Jul 2019 17:15:25 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id C1A7F1BF94 for ; Mon, 29 Jul 2019 17:15:23 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE2 (envelope-from dekelp@mellanox.com) with ESMTPS (AES256-SHA encrypted); 29 Jul 2019 18:15:22 +0300 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 x6TFFL7I027042; Mon, 29 Jul 2019 18:15:21 +0300 From: Dekel Peled To: yskoh@mellanox.com, viacheslavo@mellanox.com, shahafs@mellanox.com Cc: orika@mellanox.com, dev@dpdk.org, stable@dpdk.org Date: Mon, 29 Jul 2019 18:14:45 +0300 Message-Id: <8a12820a10a6d485a24fa224601ba0a487363ca6.1564413233.git.dekelp@mellanox.com> X-Mailer: git-send-email 1.7.1 Subject: [dpdk-stable] [PATCH] net/mlx5: fix validation of VLAN pcp item 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" Function mlx5_flow_validate_item_vlan() validates the user setting is supported by NIC, using a mask with TCI mask 0x0fff. This check will reject a flow rule specifying a vlan pcp item. This patch updates mlx5_flow_validate_item_vlan() to use mask 0xffff, so flow rules with vlan pcp item are accepted. Fixes: 23c1d42c7138 ("net/mlx5: split flow validation to dedicated function") Cc: stable@dpdk.org Signed-off-by: Dekel Peled --- drivers/net/mlx5/mlx5_flow.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 3d2d5fc..ec25fde 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -1218,8 +1218,8 @@ uint32_t mlx5_flow_adjust_priority(struct rte_eth_dev *dev, int32_t priority, const struct rte_flow_item_vlan *spec = item->spec; const struct rte_flow_item_vlan *mask = item->mask; const struct rte_flow_item_vlan nic_mask = { - .tci = RTE_BE16(0x0fff), - .inner_type = RTE_BE16(0xffff), + .tci = RTE_BE16(UINT16_MAX), + .inner_type = RTE_BE16(UINT16_MAX), }; uint16_t vlan_tag = 0; const int tunnel = !!(item_flags & MLX5_FLOW_LAYER_TUNNEL); -- 1.8.3.1