From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mellanox.co.il (mail-il-dmz.mellanox.com [193.47.165.129]) by dpdk.org (Postfix) with ESMTP id 36B561B71B for ; Wed, 9 May 2018 17:29:16 +0200 (CEST) Received: from Internal Mail-Server by MTLPINE1 (envelope-from shahafs@mellanox.com) with ESMTPS (AES256-SHA encrypted); 9 May 2018 18:06:12 +0300 Received: from unicorn01.mtl.labs.mlnx. (unicorn01.mtl.labs.mlnx [10.7.12.62]) by labmailer.mlnx (8.13.8/8.13.8) with ESMTP id w49F4SrZ008373; Wed, 9 May 2018 18:04:30 +0300 From: Shahaf Shuler To: bluca@debian.org Cc: stable@dpdk.org, nelio.laranjeiro@6wind.com, adrien.mazarguil@6wind.com, yskoh@mellanox.com Date: Wed, 9 May 2018 18:04:10 +0300 Message-Id: <36d239e72af7c2f7944e3f5539cefc89285d8c8b.1525878119.git.shahafs@mellanox.com> X-Mailer: git-send-email 2.12.0 In-Reply-To: References: Subject: [dpdk-stable] [PATCH v2 18/20] net/mlx5: fix socket connection return value 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: , X-List-Received-Date: Wed, 09 May 2018 15:29:16 -0000 [ upstream commit 26cc18c3603789fb2030e2c108c5c6be2989b38f ] Upon success, mlx5_socket_connect should return the fd descriptor of the primary process Fixes: a6d83b6a9209 ("net/mlx5: standardize on negative errno values") Signed-off-by: Yongseok Koh Signed-off-by: Shahaf Shuler Acked-by: Nelio Laranjeiro --- drivers/net/mlx5/mlx5.c | 2 +- drivers/net/mlx5/mlx5_socket.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index fad367e850..8d27c0ceba 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -735,7 +735,7 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv __rte_unused, goto error; /* Receive command fd from primary process */ err = mlx5_socket_connect(eth_dev); - if (err) + if (err < 0) goto error; /* Remap UAR for Tx queues. */ err = mlx5_tx_uar_remap(eth_dev, err); diff --git a/drivers/net/mlx5/mlx5_socket.c b/drivers/net/mlx5/mlx5_socket.c index 1c85f1ec95..d46028f970 100644 --- a/drivers/net/mlx5/mlx5_socket.c +++ b/drivers/net/mlx5/mlx5_socket.c @@ -275,7 +275,7 @@ mlx5_socket_connect(struct rte_eth_dev *dev) } ret = *fd; close(socket_fd); - return 0; + return ret; error: if (socket_fd != -1) close(socket_fd); -- 2.12.0