DPDK patches and discussions
 help / color / mirror / Atom feed
From: Dmitry Kozlyuk <dmitry.kozliuk@gmail.com>
To: Ranjit Menon <ranjit.menon@intel.com>
Cc: Pallavi Kadam <pallavi.kadam@intel.com>,
	Harini Ramakrishnan <harini.ramakrishnan@microsoft.com>,
	dev@dpdk.org,
	Narcisa Ana Maria Vasile <narcisa.vasile@microsoft.com>
Subject: Re: [dpdk-dev] Windows Draft Build
Date: Thu, 27 Feb 2020 07:11:26 +0300	[thread overview]
Message-ID: <20200227071126.75162e92@Sovereign> (raw)
In-Reply-To: <20200226092220.4352deee@Sovereign>

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

  reply	other threads:[~2020-02-27  4:11 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-08  8:45 Dmitry Kozlyuk
2020-02-10  5:03 ` Ranjit Menon
2020-02-10  6:14   ` Dmitry Kozlyuk
2020-02-17  1:14     ` Dmitry Kozlyuk
2020-02-18 21:44       ` Ranjit Menon
2020-02-25  2:37         ` Dmitry Kozlyuk
2020-02-25  9:06           ` Ranjit Menon
2020-02-26  6:22             ` Dmitry Kozlyuk
2020-02-27  4:11               ` Dmitry Kozlyuk [this message]
2020-02-27 15:25                 ` William Tu
2020-02-27 15:42                   ` David Marchand
2020-02-28  6:07                 ` [dpdk-dev] [RFC PATCH 0/5] virtio-net support for Windows draft Dmitry Kozlyuk
2020-02-28  6:07                   ` [dpdk-dev] [RFC PATCH 1/5] pci/windows: add stubs for port IO Dmitry Kozlyuk
2020-02-28  6:07                   ` [dpdk-dev] [RFC PATCH 2/5] net: add stub for RARP packet generation on Windows Dmitry Kozlyuk
2020-02-28  6:07                   ` [dpdk-dev] [RFC PATCH 3/5] pci/windows: split config I/O into series of fixed-size operations Dmitry Kozlyuk
2020-02-28  6:07                   ` [dpdk-dev] [RFC PATCH 4/5] netuio: change class for Net to custom Dmitry Kozlyuk
2020-02-28  6:07                   ` [dpdk-dev] [RFC PATCH 5/5] mk/windows: add virtio-net PMD Dmitry Kozlyuk
2021-08-14 15:55                     ` William Tu
2021-08-14 17:00                       ` Dmitry Kozlyuk
2021-08-15 14:28                         ` William Tu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200227071126.75162e92@Sovereign \
    --to=dmitry.kozliuk@gmail.com \
    --cc=dev@dpdk.org \
    --cc=harini.ramakrishnan@microsoft.com \
    --cc=narcisa.vasile@microsoft.com \
    --cc=pallavi.kadam@intel.com \
    --cc=ranjit.menon@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).