Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Jan 2011 17:02:21 -0600
From:      bv <deboomerang@gmail.com>
To:        freebsd-current@freebsd.org
Subject:   [Call for testers] FreeBSD VirtIO Network Driver
Message-ID:  <AANLkTi=OB%2B1A-zQYupU5w1AoY-EodndexcwEC4kg27x3@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
--20cf30549f434fb2120498e508cb
Content-Type: text/plain; charset=ISO-8859-1

Hi.

I'd like to present the network VirtIO driver I've been working on for
the last few months in my spare time. It is not based on the NetBSD code
that is floating around. The attached patch should apply to both recent
-current and -stable. Early development was done on VirtualBox,
but most has been done on KVM/QEMU.

While still a work in progress, the network is mostly feature complete
with checksum offloading, TSO, etc, with a couple of caveats:

 - The VirtIO checksum offload interface doesn't map well to FreeBSD's
offloading interface. The network driver is forced to peek inside the
incoming/outgoing frames to set the appropriate flags. This could be
make more robust with regards to IPv6.

 - Per Rx/Tx locking needs to be implemented before LRO can happen.

 - Tx completion interrupts could be basically eliminated when the
host supports a certain virtqueue feature. I have a patch that does
just that, but haven't had a chance to really test it.

I haven't done any real performance testing yet, but here's some
informal iperf results between the emulated e1000 device and the
VirtIO device on FreeBSD. The host is Fedora 14 running
2.6.35.10-72.fc14.x86_64/qemu-kvm-0.13.0-1.fc14.x86_64. The Linux
guest is debain-testing (2.6.32-5-amd64) with a VirtIO network device.
The FreeBSD guest is amd64 8-STABLE with both an e1000 and VirtIO
network interfaces. Both guests are running on the same host, and the
MTU of all interfaces was 1500. Measurements are in Mbits/sec.

FreeBSD --> Linux
x e1000
+ vtnet
   N           Min           Max        Median           Avg        Stddev
x   6           340           358           348     347.66667     6.2822501
+   6          1529          1540          1538     1535.3333     4.3665394
Difference at 95.0% confidence
       1187.67 +/- 6.95891
       341.611% +/- 2.0016%
       (Student's t, pooled s = 5.40987)

Linux --> FreeBSD
x e1000
+ vtnet
   N           Min           Max        Median           Avg        Stddev
x  11           437           456           449     447.36364     6.4385204
+  11           669           679           671     673.27273     3.5802488
Difference at 95.0% confidence
       225.909 +/- 4.6335
       50.4979% +/- 1.03573%
       (Student's t, pooled s = 5.20926)

I imagine the lack of LRO makes the FreeBSD receiving results less
impressive. Performance is not up to where Linux <--> Linux is at.

To use, after applying the patch and compiling, you'll need to load
the virtio, virtio_pci, and if_vtnet kernel modules. The virtio module
contains the virtqueue transport and a bit of glue code. The
virtio_pci module implements the VirtIO PCI interface for device
probing and communication with the host. The if_vtnet module
contains the network driver.

I have a partially complete VirtIO block driver. Hopefully it will be
ready for wider testing in a couple of weeks.

I'm going to be away from my computer for the next couple of days,
I'll get to any email after then.

--20cf30549f434fb2120498e508cb
Content-Type: application/octet-stream; name="FreeBSD-VirtIO.patch"
Content-Disposition: attachment; filename="FreeBSD-VirtIO.patch"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_gigirf2l0

ZGlmZiAtLWdpdCBhL3N5cy9jb25mL2ZpbGVzLmFtZDY0IGIvc3lzL2NvbmYvZmlsZXMuYW1kNjQK
LS0tIGEvc3lzL2NvbmYvZmlsZXMuYW1kNjQKKysrIGIvc3lzL2NvbmYvZmlsZXMuYW1kNjQKQEAg
LTIyNSw2ICsyMjUsMTIgQEAKIGRldi90cG0vdHBtX2FjcGkuYwkJb3B0aW9uYWwJdHBtIGFjcGkK
IGRldi90cG0vdHBtX2lzYS5jCQlvcHRpb25hbAl0cG0gaXNhCiBkZXYvdWFydC91YXJ0X2NwdV9h
bWQ2NC5jCW9wdGlvbmFsCXVhcnQKK2Rldi92aXJ0aW8vdmlydGlvLmMgICAgICAgICAgICAgb3B0
aW9uYWwJdmlydGlvCitkZXYvdmlydGlvL3ZpcnRpb19pZi5tICAgICAgICAgIG9wdGlvbmFsIAl2
aXJ0aW8KK2Rldi92aXJ0aW8vdmlydGlvX2J1c19pZi5tICAgICAgb3B0aW9uYWwJdmlydGlvCitk
ZXYvdmlydGlvL3ZpcnRxdWV1ZS5jICAgICAgICAgIG9wdGlvbmFsCXZpcnRpbworZGV2L3ZpcnR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ICAgICAgX191MTYgYXZhaWxhYmxl
W251bV07CisgKgorICogICAgICAvLyBQYWRkaW5nIHRvIHRoZSBuZXh0IGFsaWduIGJvdW5kYXJ5
LgorICogICAgICBjaGFyIHBhZFtdOworICoKKyAqICAgICAgLy8gQSByaW5nIG9mIHVzZWQgZGVz
Y3JpcHRvciBoZWFkcyB3aXRoIGZyZWUtcnVubmluZyBpbmRleC4KKyAqICAgICAgX191MTYgdXNl
ZF9mbGFnczsKKyAqICAgICAgX191MTYgdXNlZF9pZHg7CisgKiAgICAgIHN0cnVjdCB2cmluZ191
c2VkX2VsZW0gdXNlZFtudW1dOworICogfTsKKyAqCisgKiBOT1RFOiBmb3IgVmlydElPIFBDSSwg
YWxpZ24gaXMgNDA5Ni4KKyAqLworCitzdGF0aWMgaW5saW5lIGludAordnJpbmdfc2l6ZSh1bnNp
Z25lZCBpbnQgbnVtLCB1bnNpZ25lZCBsb25nIGFsaWduKQoreworCWludCBzaXplOworCisJc2l6
ZSA9IG51bSAqIHNpemVvZihzdHJ1Y3QgdnJpbmdfZGVzYyk7CisJc2l6ZSArPSBzaXplb2Yoc3Ry
dWN0IHZyaW5nX2F2YWlsKSArIChudW0gKiBzaXplb2YodWludDE2X3QpKTsKKwlzaXplID0gKHNp
emUgKyBhbGlnbiAtIDEpICYgfihhbGlnbiAtIDEpOworCXNpemUgKz0gc2l6ZW9mKHN0cnVjdCB2
cmluZ191c2VkKSArCisJICAgIChudW0gKiBzaXplb2Yoc3RydWN0IHZyaW5nX3VzZWRfZWxlbSkp
OworCXJldHVybiAoc2l6ZSk7Cit9CisKK3N0YXRpYyBpbmxpbmUgdm9pZAordnJpbmdfaW5pdChz
dHJ1Y3QgdnJpbmcgKnZyLCB1bnNpZ25lZCBpbnQgbnVtLCB1aW50OF90ICpwLAorICAgIHVuc2ln
bmVkIGxvbmcgYWxpZ24pCit7CisgICAgICAgIHZyLT5udW0gPSBudW07CisgICAgICAgIHZyLT5k
ZXNjID0gKHN0cnVjdCB2cm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SUxJVFkgT0YKKyMgU1VD
SCBEQU1BR0UuCisjCisKKy5QQVRIOiAkey5DVVJESVJ9Ly4uLy4uLy4uL2Rldi92aXJ0aW8KKwor
S01PRD0JdmlydGlvCisKK1NSQ1M9CXZpcnRpby5jIHZpcnRxdWV1ZS5jCitTUkNTKz0JdmlydGlv
X2J1c19pZi5jIHZpcnRpb19idXNfaWYuaAorU1JDUys9CXZpcnRpb19pZi5jIHZpcnRpb19pZi5o
CitTUkNTKz0JYnVzX2lmLmggZGV2aWNlX2lmLmggCisKKy5pbmNsdWRlIDxic2Qua21vZC5taz4K
--20cf30549f434fb2120498e508cb--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=OB%2B1A-zQYupU5w1AoY-EodndexcwEC4kg27x3>