From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail.droids-corp.org (zoll.droids-corp.org [94.23.50.67]) by dpdk.org (Postfix) with ESMTP id 20D3F1B2BE; Fri, 19 Jan 2018 14:42:10 +0100 (CET) Received: from lfbn-lil-1-110-231.w90-45.abo.wanadoo.fr ([90.45.197.231] helo=droids-corp.org) by mail.droids-corp.org with esmtpsa (TLS1.0:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ecWvu-0001Yy-BP; Fri, 19 Jan 2018 14:42:15 +0100 Received: by droids-corp.org (sSMTP sendmail emulation); Fri, 19 Jan 2018 14:42:08 +0100 Date: Fri, 19 Jan 2018 14:42:08 +0100 From: Olivier Matz To: dev@dpdk.org, Adrien Mazarguil , Nelio Laranjeiro , Yongseok Koh Cc: stable@dpdk.org Message-ID: <20180119134208.ztdnqlnv7viptw6w@platinum> References: <20180118130043.31773-1-olivier.matz@6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180118130043.31773-1-olivier.matz@6wind.com> User-Agent: NeoMutt/20170113 (1.7.2) Subject: Re: [dpdk-dev] [PATCH 1/2] net/mlx5: fix return value of start operation 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: , X-List-Received-Date: Fri, 19 Jan 2018 13:42:11 -0000 On Thu, Jan 18, 2018 at 02:00:42PM +0100, Olivier Matz wrote: > On error, mlx5_dev_start() does not return a negative value > as it is supposed to do. The consequence is that the application > (ex: testpmd) does not notice that the port is not started > and begins the rxtx on an uninitialized port, which crashes. > > Fixes: e1016cb73383 ("net/mlx5: fix Rx interrupts management") > Cc: stable@dpdk.org > > Signed-off-by: Olivier Matz For reference, here is how to reproduce the problem. The topology of the target: socket 0 socket 1 +---------------------+ +---------------------+ | c0 c1 | | c0 c1 | | +-------+ +-------+ | | +-------+ +-------+ | | | 0| 16| | 1| 17| | | | 8| 24| | 9| 25| | | +-------+ +-------+ | | +-------+ +-------+ | | c2 c3 | | c2 c3 | | +-------+ +-------+ | | +-------+ +-------+ | | | 2| 18| | 3| 19| | | | 10| 26| | 11| 27| | | +-------+ +-------+ | | +-------+ +-------+ | | c4 c5 | | c4 c5 | | +-------+ +-------+ | | +-------+ +-------+ | | | 4| 20| | 5| 21| | | | 12| 28| | 13| 29| | | +-------+ +-------+ | | +-------+ +-------+ | | c6 c7 | | c6 c7 | | +-------+ +-------+ | | +-------+ +-------+ | | | 6| 22| | 7| 23| | | | 14| 30| | 15| 31| | | +-------+ +-------+ | | +-------+ +-------+ | +---------------------+ +---------------------+ The cx4 devices are on socket 1, but I use cores and memory from socket 0. I know it is not optimal, but it should work. root@dut-cx4:~# cd dpdk.org root@dut-cx4:~/dpdk.org# make config T=x86_64-native-linuxapp-gcc root@dut-cx4:~/dpdk.org# make -j32 root@dut-cx4:~/dpdk.org# mkdir -p /mnt/huge root@dut-cx4:~/dpdk.org# mount -t hugetlbfs nodev /mnt/huge root@dut-cx4:~/dpdk.org# echo 256 > /sys/devices/system/node/node0/hugepages/hugepages-2048kB/nr_hugepages root@dut-cx4:~/dpdk.org# testpmd -l 0,2 -- --total-num-mbufs=16384 -i --port-topology=chained --no-numa EAL: Detected 32 lcore(s) EAL: No free hugepages reported in hugepages-1048576kB EAL: Probing VFIO support... EAL: PCI device 0000:02:00.0 on NUMA socket 0 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:02:00.1 on NUMA socket 0 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:02:00.2 on NUMA socket 0 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:02:00.3 on NUMA socket 0 EAL: probe driver: 8086:1572 net_i40e EAL: PCI device 0000:04:00.0 on NUMA socket 0 EAL: probe driver: 14e4:16d7 net_bnxt EAL: PCI device 0000:04:00.1 on NUMA socket 0 EAL: probe driver: 14e4:16d7 net_bnxt EAL: PCI device 0000:06:00.0 on NUMA socket 0 EAL: probe driver: 8086:1521 net_e1000_igb EAL: PCI device 0000:83:00.0 on NUMA socket 1 EAL: probe driver: 8086:10fb net_ixgbe EAL: PCI device 0000:83:00.1 on NUMA socket 1 EAL: probe driver: 8086:10fb net_ixgbe EAL: PCI device 0000:86:00.0 on NUMA socket 1 EAL: probe driver: 15b3:1013 net_mlx5 PMD: net_mlx5: PCI information matches, using device "mlx5_0" (SR-IOV: false) PMD: net_mlx5: 1 port(s) detected PMD: net_mlx5: MPS is disabled PMD: net_mlx5: port 1 MAC address is e4:1d:2d:e7:0d:06 EAL: PCI device 0000:86:00.1 on NUMA socket 1 EAL: probe driver: 15b3:1013 net_mlx5 PMD: net_mlx5: PCI information matches, using device "mlx5_1" (SR-IOV: false) PMD: net_mlx5: 1 port(s) detected PMD: net_mlx5: MPS is disabled PMD: net_mlx5: port 1 MAC address is e4:1d:2d:e7:0d:07 Interactive-mode selected USER1: create a new mbuf pool : n=16384, size=2176, socket=0 Configuring Port 0 (socket 0) PMD: net_mlx5: 0x1459e40: TX queues number update: 0 -> 1 PMD: net_mlx5: 0x1459e40: RX queues number update: 0 -> 1 PMD: net_mlx5: cannot allocate CQ for drop queue PMD: net_mlx5: 0x1459e40: Drop queue allocation failed: Unknown error -1 Port 0: E4:1D:2D:E7:0D:06 Configuring Port 1 (socket 0) PMD: net_mlx5: 0x145dec0: TX queues number update: 0 -> 1 PMD: net_mlx5: 0x145dec0: RX queues number update: 0 -> 1 PMD: net_mlx5: cannot allocate CQ for drop queue PMD: net_mlx5: 0x145dec0: Drop queue allocation failed: Unknown error -1 Port 1: E4:1D:2D:E7:0D:07 Checking link statuses... Done testpmd> start Segmentation fault (core dumped)