From patchwork Fri Apr 13 11:20:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xueming Li X-Patchwork-Id: 38014 X-Patchwork-Delegate: shahafs@mellanox.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3FCB01C178; Fri, 13 Apr 2018 13:21:03 +0200 (CEST) Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id F169E1C0E6 for ; Fri, 13 Apr 2018 13:20:47 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from xuemingl@mellanox.com) with ESMTPS (AES256-SHA encrypted); 13 Apr 2018 14:21:57 +0300 Received: from dev-r630-06.mtbc.labs.mlnx (dev-r630-06.mtbc.labs.mlnx [10.12.205.180]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id w3DBKhFr017122; Fri, 13 Apr 2018 14:20:44 +0300 Received: from dev-r630-06.mtbc.labs.mlnx (localhost [127.0.0.1]) by dev-r630-06.mtbc.labs.mlnx (8.14.7/8.14.7) with ESMTP id w3DBKhch106517; Fri, 13 Apr 2018 19:20:43 +0800 Received: (from xuemingl@localhost) by dev-r630-06.mtbc.labs.mlnx (8.14.7/8.14.7/Submit) id w3DBKh2n106516; Fri, 13 Apr 2018 19:20:43 +0800 From: Xueming Li To: Nelio Laranjeiro , Shahaf Shuler Cc: Xueming Li , dev@dpdk.org Date: Fri, 13 Apr 2018 19:20:22 +0800 Message-Id: <20180413112023.106420-14-xuemingl@mellanox.com> X-Mailer: git-send-email 2.13.3 In-Reply-To: <20180413112023.106420-1-xuemingl@mellanox.com> References: <20180413112023.106420-1-xuemingl@mellanox.com> In-Reply-To: <20180410133415.189905-1-xuemingl%40mellanox.com> References: <20180410133415.189905-1-xuemingl%40mellanox.com> Subject: [dpdk-dev] [PATCH v3 13/14] net/mlx5: fix invalid flow item check 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch fixed invalid flow item check. Fixes: 4f1a88e3f9b0 ("net/mlx5: standardize on negative errno values") Cc: nelio.laranjeiro@6wind.com Signed-off-by: Xueming Li Acked-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5_flow.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/mlx5/mlx5_flow.c b/drivers/net/mlx5/mlx5_flow.c index 98edf1882..d36b6ed8a 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -935,8 +935,10 @@ mlx5_flow_convert_items_validate(struct rte_eth_dev *dev, break; } } - if (!token) + if (!token) { + ret = -ENOTSUP; goto exit_item_not_supported; + } cur_item = token; ret = mlx5_flow_item_validate(items, (const uint8_t *)cur_item->mask,