From mboxrd@z Thu Jan 1 00:00:00 1970 From: Xueming Li Subject: [PATCH v2 14/15] net/mlx5: fix invalid flow item check Date: Tue, 10 Apr 2018 21:34:14 +0800 Message-ID: <20180410133415.189905-15-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 876131BAAA for ; Tue, 10 Apr 2018 15:34:47 +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" 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 --- 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 9efe00086..e2ed675c0 100644 --- a/drivers/net/mlx5/mlx5_flow.c +++ b/drivers/net/mlx5/mlx5_flow.c @@ -939,8 +939,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, -- 2.13.3