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 34FB2A00C5 for ; Wed, 29 Apr 2020 16:27:25 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9F00E1DACB; Wed, 29 Apr 2020 16:27:24 +0200 (CEST) Received: from smtp-4.sys.kth.se (smtp-4.sys.kth.se [130.237.48.193]) by dpdk.org (Postfix) with ESMTP id 8CD7D1DAB1 for ; Wed, 29 Apr 2020 16:27:23 +0200 (CEST) Received: from smtp-4.sys.kth.se (localhost.localdomain [127.0.0.1]) by smtp-4.sys.kth.se (Postfix) with ESMTP id 48FC86B0C; Wed, 29 Apr 2020 16:27:23 +0200 (CEST) X-Virus-Scanned: by amavisd-new at kth.se Received: from smtp-4.sys.kth.se ([127.0.0.1]) by smtp-4.sys.kth.se (smtp-4.sys.kth.se [127.0.0.1]) (amavisd-new, port 10024) with LMTP id JXRKT9lahLpC; Wed, 29 Apr 2020 16:27:22 +0200 (CEST) X-KTH-Auth: barbette [2a02:a03f:4070:7c00:7478:db83:16e6:78bb] DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kth.se; s=default; t=1588170442; bh=BYfSUXqxhkM+ZJYtQXqJBxs7XDGFGmHc4ZUClIBtaAY=; h=From:Subject:Cc:Date; b=fOJopxOQ43ixwnuidXawyA6+S1TQCN1HBPZMoLX3wAWO/S+qG0BPVDYjFTQkDwTyU 99YCVbiUrYqlu5gYgB+IGyGD/6ljGb4f55PDW9q5OS0PtRfa+BastHddmk4761rbxx Nz/290XinHcYtxfes4zUN0eTyeSm6HL8yMNr72Wk= X-KTH-mail-from: barbette@kth.se Received: from [IPv6:2a02:a03f:4070:7c00:7478:db83:16e6:78bb] (unknown [IPv6:2a02:a03f:4070:7c00:7478:db83:16e6:78bb]) by smtp-4.sys.kth.se (Postfix) with ESMTPSA id 640666B00; Wed, 29 Apr 2020 16:27:21 +0200 (CEST) From: Tom Barbette Cc: jasvinder.singh@intel.com, cristian.dumitrescu@intel.com, "users@dpdk.org" Message-ID: <616b8561-52b1-c781-0d24-d717d8387f24@kth.se> Date: Wed, 29 Apr 2020 16:27:19 +0200 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: fr Content-Transfer-Encoding: 7bit Subject: [dpdk-users] SoftNIC usage / segfault? X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org Sender: "users" Hi all, I'm a little bit puzzled by the SoftNIC driver, and cannot make it work (with DPDK 20.02). I modified the firmware "LINK" line to use my Mellanox ConnectX 5 (0000:11:00.0). No other changes (also tried in KVM with a virtio-pci device, no more luck). According to how I launch testpmd, either I receive nothing, or I segfault. Note that DPDK is able to use 2 ports on my system (the two ConnectX 5 ports). 1) It seems SoftNIC does not work with whitelist --- sudo ./x86_64-native-linuxapp-gcc/app/testpmd -c 0x3 -w 11:00.0 --vdev 'net_softnic0,firmware=./drivers/net/softnic/firmware.cli,cpu_id=0,conn_port=8086' -- -i --forward-mode=softnic --portmask=0x1 EAL: Detected 16 lcore(s) EAL: Detected 1 NUMA nodes EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Selected IOVA mode 'PA' EAL: Probing VFIO support... EAL: VFIO support initialized EAL: PCI device 0000:11:00.0 on NUMA socket 0 EAL: probe driver: 15b3:1017 net_mlx5 Interactive-mode selected Set softnic packet forwarding mode previous number of forwarding ports 2 - changed to number of configured ports 1 testpmd: create a new mbuf pool : n=155456, size=2176, socket=0 testpmd: preferred mempool ops selected: ring_mp_mc Configuring Port 0 (socket 0) Port 0: B8:83:03:6F:43:40 Configuring Port 1 (socket 0) ; SPDX-License-Identifier: BSD-3-Clause ; Copyright(c) 2018 Intel Corporation link LINK dev 0000:11:00.0 Command "link" failed. [...] --- 2) If I don't whitelist, I assume the softnic port will be the third. So I have to use the mask 0x4, right? Everything seems right, but start/stop shows I received no packet, while a ping is definitely going on with a back-to-back cable (and when the DPDK app is killed, I can see counters raising). Did I miss something? --- testpmd> stop Telling cores to stop... Waiting for lcores to finish... ---------------------- Forward statistics for port 2 ---------------------- RX-packets: 0 RX-dropped: 0 RX-total: 0 TX-packets: 0 TX-dropped: 0 TX-total: 0 ---------------------------------------------------------------------------- +++++++++++++++ Accumulated forward statistics for all ports+++++++++++++++ RX-packets: 0 RX-dropped: 0 RX-total: 0 TX-packets: 0 TX-dropped: 0 TX-total: 0 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Done. --- 3) With portmask 0x1 or 0x2, it segfaults: --- sudo ./x86_64-native-linuxapp-gcc/app/testpmd -c 0x3 --vdev 'net_softnic0,firmware=./drivers/net/softnic/firmware.cli,cpu_id=0,conn_port=8086' -- -i --forward-mode=softnic --portmask=0x1 EAL: Detected 16 lcore(s) EAL: Detected 1 NUMA nodes EAL: Multi-process socket /var/run/dpdk/rte/mp_socket EAL: Selected IOVA mode 'PA' EAL: Probing VFIO support... EAL: VFIO support initialized EAL: PCI device 0000:00:04.0 on NUMA socket 0 EAL: probe driver: 8086:2021 rawdev_ioat EAL: PCI device 0000:00:04.1 on NUMA socket 0 EAL: probe driver: 8086:2021 rawdev_ioat EAL: PCI device 0000:00:04.2 on NUMA socket 0 EAL: probe driver: 8086:2021 rawdev_ioat EAL: PCI device 0000:00:04.3 on NUMA socket 0 EAL: probe driver: 8086:2021 rawdev_ioat EAL: PCI device 0000:00:04.4 on NUMA socket 0 EAL: probe driver: 8086:2021 rawdev_ioat EAL: PCI device 0000:00:04.5 on NUMA socket 0 EAL: probe driver: 8086:2021 rawdev_ioat EAL: PCI device 0000:00:04.6 on NUMA socket 0 EAL: probe driver: 8086:2021 rawdev_ioat EAL: PCI device 0000:00:04.7 on NUMA socket 0 EAL: probe driver: 8086:2021 rawdev_ioat EAL: PCI device 0000:11:00.0 on NUMA socket 0 EAL: probe driver: 15b3:1017 net_mlx5 EAL: PCI device 0000:11:00.1 on NUMA socket 0 EAL: probe driver: 15b3:1017 net_mlx5 Interactive-mode selected Set softnic packet forwarding mode previous number of forwarding ports 3 - changed to number of configured ports 1 testpmd: create a new mbuf pool : n=155456, size=2176, socket=0 testpmd: preferred mempool ops selected: ring_mp_mc Configuring Port 0 (socket 0) Port 0: B8:83:03:6F:43:40 Configuring Port 1 (socket 0) Port 1: B8:83:03:6F:43:41 Configuring Port 2 (socket 0) ; SPDX-License-Identifier: BSD-3-Clause ; Copyright(c) 2018 Intel Corporation link LINK dev 0000:11:00.0 pipeline RX period 10 offset_port_id 0 pipeline RX port in bsz 32 link LINK rxq 0 pipeline RX port out bsz 32 swq RXQ0 pipeline RX table match stub pipeline RX port in 0 table 0 pipeline RX table 0 rule add match default action fwd port 0 pipeline TX period 10 offset_port_id 0 pipeline TX port in bsz 32 swq TXQ0 pipeline TX port out bsz 32 link LINK txq 0 pipeline TX table match stub pipeline TX port in 0 table 0 pipeline TX table 0 rule add match default action fwd port 0 thread 1 pipeline RX enable Command "thread pipeline enable" failed. thread 1 pipeline TX enable Command "thread pipeline enable" failed. Port 2: 00:00:00:00:00:00 Checking link statuses... Done testpmd> start softnic packet forwarding - ports=1 - cores=1 - streams=1 - NUMA support enabled, MP allocation mode: native Logical Core 1 (socket 0) forwards packets on 1 streams: RX P=2/Q=0 (socket 0) -> TX P=2/Q=0 (socket 0) peer=02:00:00:00:00:02 softnic packet forwarding packets/burst=32 nb forwarding cores=1 - nb forwarding ports=1 port 0: RX queue number: 1 Tx queue number: 1 Rx offloads=0x0 Tx offloads=0x0 RX queue: 0 RX desc=256 - RX free threshold=0 RX threshold registers: pthresh=0 hthresh=0 wthresh=0 RX Offloads=0x0 TX queue: 0 TX desc=256 - TX free threshold=0 TX threshold registers: pthresh=0 hthresh=0 wthresh=0 TX offloads=0x0 - TX RS bit threshold=0 port 1: RX queue number: 1 Tx queue number: 1 Rx offloads=0x0 Tx offloads=0x0 RX queue: 0 RX desc=256 - RX free threshold=0 RX threshold registers: pthresh=0 hthresh=0 wthresh=0 RX Offloads=0x0 TX queue: 0 TX desc=256 - TX free threshold=0 TX threshold registers: pthresh=0 hthresh=0 wthresh=0 TX offloads=0x0 - TX RS bit threshold=0 port 2: RX queue number: 1 Tx queue number: 1 Rx offloads=0x0 Tx offloads=0x0 RX queue: 0 RX desc=0 - RX free threshold=0 RX threshold registers: pthresh=0 hthresh=0 wthresh=0 RX Offloads=0x0 TX queue: 0 TX desc=0 - TX free threshold=0 TX threshold registers: pthresh=0 hthresh=0 wthresh=0 TX offloads=0x0 - TX RS bit threshold=0 zsh: segmentation fault sudo ./x86_64-native-linuxapp-gcc/app/testpmd -c 0x3 --vdev -- -i --- 4) Also, the telnet command shows me no softnic> prompt, and does not seem to react to anything, except when I quit DPDK the telnet dies (quite expected): telnet 127.0.0.1 8086 Trying 127.0.0.1... Connected to 127.0.0.1. Escape character is '^]'. [I can type anything here without reactions] 5) Am I correct to assume that SoftNIC can emulate RSS? I'm looking to implement RSS-based functional tests for a project. Thanks! Tom