Patches for linux virtio_net driver

eclectic 923 eclectic923 at yahoo.com
Fri Nov 21 22:06:21 UTC 2014


I know this is the Freebsd mailing list, but

http://info.iet.unipi.it/~luigi/netmap/#85cb indicates that discussion
should be sent to this list.

I recently added netmap to a 3.10 LINUX kernel for use in a KVM guest.

The virtio driver didn't work. There were two problems.

On the 3.10.60 kernel from kernel.org, the patch to virtio_net.c didn't
work, one part of the patch was rejected. This is easily fixed.

More serious, was that the virtio initialization code didn't work, nor
did the packet receive code. The basic problem was failure to initialize
the indices properly and failure to maintain a 1 slot separation between
head/tail indices. (Same problem 2 locations in the code.)

This problem is easily seen by creating a KVM guest with a
netmap/virtio_net driver, and simply pinging the guest from the host.
The receive traffic can easily be monitored using the pkt-gen tool on
the guest.

The first 255 pings will work fine, when the index hits 255, then the
packet receive will fail, and will continue to fail every time on slot 255.

I've included patches for both problems in the hopes that the source code
will be updated and others won't have to find these problems.

If the source code won't be updated, then I'd appreciate suggestions
on the best place to post these patches so others can find them.

--  

Joe Garvey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: virtio_net_3.10.60.patch
Type: text/x-patch
Size: 2529 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-net/attachments/20141121/6167b55e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: virtio_netmap.patch
Type: text/x-patch
Size: 1784 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-net/attachments/20141121/6167b55e/attachment-0001.bin>


More information about the freebsd-net mailing list