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 217C3A055A; Thu, 27 Feb 2020 05:11:32 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 61EED1BFAB; Thu, 27 Feb 2020 05:11:31 +0100 (CET) Received: from mail-lj1-f195.google.com (mail-lj1-f195.google.com [209.85.208.195]) by dpdk.org (Postfix) with ESMTP id 1D7DE1C01 for ; Thu, 27 Feb 2020 05:11:29 +0100 (CET) Received: by mail-lj1-f195.google.com with SMTP id q8so1730240ljb.2 for ; Wed, 26 Feb 2020 20:11:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version; bh=vy98C5uKFhQTZUrQYOdw5WfEJWeMo1zpDCLzQqM5tUk=; b=KWgHIYOnuo0UpO6lKzZLmsQuiq6NKyegZ5Ifa2DVbHnrovr4CgPJc7C3FhOC04QZ3j SH6py31MvVESK/fceY96ZCL31ZPYZiu5hlVECXMjhMOFuBzZuuiK3/d1TB1xpH/jWFgV ohXDkIIdq1+qyVIIOQBoAfZOlL+U0F8JCu49Xp1RRYlRVOKDfYUyrvaR2u9mXYTdrTQg xYhCCLRJLWG15lvq8lDZUKOQQkhZD9P5n2vak/LeaUBSRXYiX7qyY0aVvraI2eozWE8o vdvmHoBsDy1VMIva6GLeP30ZKbd9UmKU2On/lyq24JnvhhWM49vWCrzViM7n5lk64pt2 wy5A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version; bh=vy98C5uKFhQTZUrQYOdw5WfEJWeMo1zpDCLzQqM5tUk=; b=pBQPf4s9PTKa96tRH97RyJf/3YbmBRNLrJnXt43HcOq79cwpxjBrqoGlIcpyJkNEta 4PZ8TiBg2KVj5E85e7Kj2WotXeNs8voRD1rx6mBhJR4Ikckg/oodCuPWwwgsHP1fN1/U LgW3wX/77l/kuyguzss1iWyFbe+3jjdRiJ9LEUl8DG/VOgLzfGmRpVi6kjRvZ0zVQaFE 2FwLfWq8YOpTv720h6Psz1ItxgR3vh4Dvl8X41CViwZ6mIwWXgRUPVU+PsqaJcWZDeIo NUO0FOdDK29SjaHvQq/TC7dUNy5wwpg2SjNuhV6pza4wNDlQkPRAYPNQcYlDpWg0fn+x qgxg== X-Gm-Message-State: ANhLgQ0xElXP5t5sEAN6W2GTliRT5Z9updI/6eqkJ1cmGDu2xOj7B4r/ n513+RQXx5+3ROMRYucOt1Y= X-Google-Smtp-Source: ADFU+vsHfovjpEyHHGymNgLkWvev91BS3014q8Ed7tHhwKySIsrg2UMLAyRw/iDZXf3ZJLQXKlY8+A== X-Received: by 2002:a05:651c:cc:: with SMTP id 12mr1468256ljr.260.1582776689224; Wed, 26 Feb 2020 20:11:29 -0800 (PST) Received: from Sovereign (broadband-37-110-65-23.ip.moscow.rt.ru. [37.110.65.23]) by smtp.gmail.com with ESMTPSA id b13sm1875908lfi.77.2020.02.26.20.11.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 26 Feb 2020 20:11:27 -0800 (PST) Date: Thu, 27 Feb 2020 07:11:26 +0300 From: Dmitry Kozlyuk To: Ranjit Menon Cc: Pallavi Kadam , Harini Ramakrishnan , dev@dpdk.org, Narcisa Ana Maria Vasile Message-ID: <20200227071126.75162e92@Sovereign> In-Reply-To: <20200226092220.4352deee@Sovereign> References: <20200208114546.546db2d0@Sovereign> <9a3fca13-bebc-cc87-d955-06b41fdbcdfe@intel.com> <20200210091426.17b215db@Sovereign> <20200217041424.22afb6dc@Sovereign> <13c23300-f41f-4e9a-c830-a81ace3593c8@intel.com> <20200225053749.448e0932@Sovereign> <20200226092220.4352deee@Sovereign> X-Mailer: Claws Mail 3.17.4 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] Windows Draft Build 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" Finally managed to run l2fwd with virtio PMD. Providing details as promised. 1. For some reason, when l2fwd is running, virtual screen stops updating. The system itself is NOT frozen: l2fwd forwards packets, processes can be launched using QEMU guest agent, input is received and processed. Since this doesn't happen with different driver and ported upstream DPDK, there is obviously a software bug either in netUIO or in draft DPDK, not in QEMU. 2. Testing setup Schematically: +-------------------+ +-------------------+ +-------------------+ | Linux guest Alice | | Windows guest | | Linux guest Bob | | | | | | | | 172.16.0.1/24 | | __l2fwd__ | | 172.16.0.2/24 | | 02:00:ac:10:00:01 | | / \ | | 02:00:ac:10:00:02 | | ens4 | | 00:04.0 00:05.0 | | ens4 | +-------------------+ +-------------------+ +-------------------+ | QEMU dp | | dp0 QEMU dp1 | | dp QEMU | +-------------------+ +-------------------+ +-------------------+ connect listen listen connect :10000 :10000 :10001 :10001 Linux host \___________/ \_________/ Windows VM (Windows 10 Pro): qemu-system-x86_64 \ -enable-kvm -cpu host -smp 'cores=4,sockets=1,threads=1' -m 6G -drive "file=$disk,format=qcow2" \ -netdev 'socket,listen=:10000,id=dp0' -device 'virtio-net-pci,disable-modern=off,disable-legacy=on,netdev=dp0' \ -netdev 'socket,listen=:10001,id=dp1' -device 'virtio-net-pci,disable-modern=off,disable-legacy=on,netdev=dp1' Linux VM "Alice" (Debian 10): qemu-system-x86_64 \ -enable-kvm -cpu host -smp 'cores=2,sockets=1,threads=1' -m 1G drive "file=$disk,format=qcow2" \ -netdev "socket,connect=:10000,id=dp" -device 'virtio-net-pci,disable-modern=off,disable-legacy=on,netdev=dp' Linux VM "Bob" (Debian 10): qemu-system-x86_64 \ -enable-kvm -cpu host -smp 'cores=2,sockets=1,threads=1' -m 1G drive "file=$disk,format=qcow2" \ -netdev "socket,connect=:10001,id=dp" -device 'virtio-net-pci,disable-modern=off,disable-legacy=on,netdev=dp' (Note: non-essential QEMU options omitted, like management NIC). Driver: netUIO + multi-BAR patches from Narcisa + virtio HW ID patch. DPDK: windpdk-v18.08-clang + PCI patch + patches for virtio. Endpoint setup: root@alice# ip link set ens4 address 02:00:ac:10:00:01 root@alice# ip address add 172.16.0.1/24 dev ens4 root@alice# ip link set ens4 up root@bob# ip link set ens4 address 02:00:ac:10:00:02 root@bob# ip address add 172.16.0.2/24 dev ens4 root@bob# ip link set ens4 up DUT setup: Z:\dpdk\x64\Debug\netuio\netuio> pnputil /add-driver netuio.inf /install Z:\dpdk\x64\Debug\l2fwd> l2fwd.exe -c3 -- -p3 -T1 --no-mac-updating (display stops updating, exit later with Ctrl+C) Validate connectivity: root@alice# ping 172.16.0.2 3. Patch instruction is a bit involved: * Base on windpdk-v18.08-clang. * Import drivers/net/virtio from v18.08 (not attached due to size). * Apply windpdk-virtio-1.patch (attached). * Apply multi-BAR patches (not attached due to not being mine). * Apply windpdk-virtio-2.patch (attached). There is one patch in windpdk-virtio-2.patch that splits PCI config I/O of arbitrary size to a series of 4/2/1 accesses. It is implemented in user-mode because it was easier to debug, but maybe it should be moved to netUIO, so that any region of PCI config space can be read/written in a single syscall. -- Dmitry Kozlyuk