lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4b2d7f91-7d1d-f3ec-bee3-1da7a98d5860@redhat.com>
Date:   Fri, 12 Apr 2019 12:26:18 +0800
From:   Jason Wang <jasowang@...hat.com>
To:     David Woodhouse <dwmw2@...radead.org>,
        Toke Høiland-Jørgensen <toke@...hat.com>,
        netdev@...r.kernel.org
Subject: Re: Tun congestion/BQL


On 2019/4/11 下午5:25, David Woodhouse wrote:
> On Thu, 2019-04-11 at 15:22 +0800, Jason Wang wrote:
>> If you care about userspace performance, you may want to try vhost + TAP
>> instead. I admit the API is not user friendly which needs to be improved
>> but then there will be no syscall overhead on packet transmission and
>> receiving, and eventfd will be used for notification.
> That would be very useful. Is there any example code I can follow?
>

Yes, you can refer:

1) Qemu hw/virtio/vhost.c or hw/net/vhost_net.c

2) dpdk drivers/net/virtio/virtio_user/vhost_kernel_tap.c

DPDK code seems more compact.

Basically, the setup of TUN/TAP should be the same, then userspace need 
to allocate virtio rings and pass them and tap fd to vhost through 
vhost_net ioctls.

Thanks

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ