netmap over virtio giving packets with extra 12 bytes
Avinash Sridharan
avinash.sridharan at gmail.com
Mon Jan 5 17:24:40 UTC 2015
I used virsh to start the VM over qemu-kvm. Here is a dump of the network
XML that was fed to libvirt, while creating the domain:
<interface type='bridge'>
<mac address='52:54:00:0f:8f:af'/>
<source bridge='br0'/>
<target dev='vnet3'/>
<model type='virtio'/>
<alias name='net0'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x03'
function='0x0'/>
</interface>
<interface type='bridge'>
<mac address='52:54:00:0f:8f:bf'/>
<source bridge='br0'/>
<target dev='vnet4'/>
<model type='virtio'/>
<alias name='net1'/>
<address type='pci' domain='0x0000' bus='0x00' slot='0x05'
function='0x0'/>
</interface>
The network backend is a bridge interface running over gentoo. The bridge
has a single port, which is a realtek r8169 NIC.
I didn't quite understand the question about using "virtio in native or
emulated netmap mode "?
While running the above experiment I just replaced the virtio-net drivers
with the netmap enabled virtio-net drivers.
*asridharan at stitch-dp-1** ~/stitch-click/kernel $* lsmod
Module Size Used by
virtio_net 24612 0
netmap 95166 1 virtio_net
mii 3875 0
*asridharan at stitch-dp-1** ~/stitch-click/kernel $* modinfo ./virtio_net.ko
filename: /home/asridharan/stitch-click/kernel/./virtio_net.ko
license: GPL
description: Virtio network driver
alias: virtio:d00000001v*
depends: netmap
vermagic: 3.14.14-gentoo SMP mod_unload
parm: napi_weight:int
parm: csum:bool
parm: gso:bool
*asridharan at stitch-dp-1** ~/stitch-click/kernel $* modinfo ./netmap.ko
filename: /home/asridharan/stitch-click/kernel/./netmap.ko
license: Dual BSD/GPL
description: The netmap packet I/O framework
author: http://info.iet.unipi.it/~luigi/netmap/
depends:
vermagic: 3.14.14-gentoo SMP mod_unload
parm: verbose:int
parm: no_timestamp:int
parm: mitigate:int
parm: no_pendintr:int
parm: txsync_retry:int
parm: adaptive_io:int
parm: flags:int
parm: fwd:int
parm: mmap_unreg:int
parm: admode:int
parm: generic_mit:int
parm: generic_ringsize:int
parm: generic_rings:int
parm: default_pipes:int
parm: bridge_batch:int
parm: if_size:int
parm: if_curr_size:int
parm: if_num:int
parm: if_curr_num:int
parm: priv_if_size:int
parm: priv_if_num:int
parm: ring_size:int
parm: ring_curr_size:int
parm: ring_num:int
parm: ring_curr_num:int
parm: priv_ring_size:int
parm: priv_ring_num:int
parm: buf_size:int
parm: buf_curr_size:int
parm: buf_num:int
parm: buf_curr_num:int
parm: priv_buf_size:int
parm: priv_buf_num:int
Please ping me if I haven't given enough data.
Thanks,
Avinash
On Mon, Jan 5, 2015 at 9:05 AM, Luigi Rizzo <rizzo at iet.unipi.it> wrote:
> On Mon, Jan 05, 2015 at 08:33:17AM -0800, Adrian Chadd wrote:
> > ... surely virtio should be skipping over those bytes in the netmap rx
> > side before handing them up?
> >
> > (It won't be the only hardware that puts the RX descriptor status in
> > the RX frame itself..)
>
> it is not the rx descriptor, those 12 bytes are also present on the tx
> side.
> Think of them as an encapsulation whose presence is negotiated when KVM
> connects
> to the TAP port, and after that is present on all packets bidirectionally.
>
> Now, surely we could add/remove those bytes in the virtio-netmap code
> (at the price of an additional data copy).
>
> I need to investigate further.
> Avinash, could you tell us exactly your configuration -- what is the
> network backend for QEMU/KVM, and whether you are using virtio in
> native or emulated netmap mode ?
>
> cheers
> luigi
>
More information about the freebsd-net
mailing list