* [dpdk-dev] Question about using virtio_user in OVS-DPDK
@ 2019-12-31 22:19 ` William Tu
[not found] ` <e91d25eaa10b4228824f1d7c3cb949e5@inspur.com>
0 siblings, 1 reply; 2+ messages in thread
From: William Tu @ 2019-12-31 22:19 UTC (permalink / raw)
To: <dev@openvswitch.org>, dev; +Cc: Jianfeng Tan
Hi,
I'm trying to find a faster way to communicate from userspace OVS to
kernel. So I create a virtio_user port at OVS-DPDK, and send packets
to kernel's tap device.
packets in OVS userspace -> virtio-user port -> vhost-net (kernel) ->
tap device (kernel)
As described in paper[1], figure 1 for legacy applications.
But there is no documentation about it. I tried:
1) load vhost-net
# lsmod | grep vhost
vhost_net 32768 0
vhost 57344 1 vhost_net
tap 28672 1 vhost_net
tun 57344 8 vhost_net
2) start OVS
3) create tap and attach to OVS
ip tuntap add mode tap tap0
ip link set dev tap0 up
ovs-vsctl add-port br0 tap0 -- set interface tap0 type=dpdk \
options:dpdk-devargs=vdev:net_virtio_user1,iface=tap0,path=/dev/vhost-net
So I thought this is a faster channel using virtio ring than
readv/writev to the tap fd.
But it doesn't work.
2019-12-31T22:06:39.956Z|00033|netdev|WARN|could not create netdev
tap0 of unknown type dpdk
2019-12-31T22:06:39.956Z|00034|bridge|WARN|could not open network
device tap0 (Address family not supported by protocol)
Any suggestions? Or do I understand the concept of virtio_user correctly?
[1] VIRTIO-USER: A New Versatile Channel for Kernel-Bypass Networks
Thanks
William
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dpdk-dev] [dpdk.org代发] Question about using virtio_user in OVS-DPDK
[not found] ` <e91d25eaa10b4228824f1d7c3cb949e5@inspur.com>
@ 2020-01-02 20:01 ` William Tu
0 siblings, 0 replies; 2+ messages in thread
From: William Tu @ 2020-01-02 20:01 UTC (permalink / raw)
To: Yi Yang (杨燚)-云服务集团
Cc: dev, dev, jianfeng.tan
On Wed, Jan 1, 2020 at 5:05 PM Yi Yang (杨燚)-云服务集团 <yangyi01@inspur.com> wrote:
>
> William, use the below option for your tap0
>
> sudo ovs-vsctl add-port br-int virtio_user0 -- set Interface virtio_user0 type=dpdk options:dpdk-devargs=net_virtio_user0,iface=tap0,path=/dev/vhost-net,queue_size=1024
>
> vistio_user also can create tap0 if it doesn't exist, you remove "iface=tap0" from option for that case.
>
> Maybe ovs port name can't be same as tap interface names, it is just my guess.
>
Hi Yi,
Thanks for your reply. I'm using this ovs command
ovs-vsctl add-port br0 virtio_user0 -- set Interface virtio_user0 type=dpdk \
options:n_rxq=1 options:n_txq=1 \
options:dpdk-devargs=net_virtio_user0,iface=tap0,path=/dev/vhost-net,queues=1
I hit an error showing
00051|netdev_dpdk|INFO|Device
'net_virtio_user0,iface=tap0,path=/dev/vhost-net, queues=1' attached
to DPDK
|00058|netdev_dpdk|DBG|Port virtio_user0: Requesting a mempool of
262144 mbufs of size 2176 on socket 0 for 1 Rx and 2 Tx queues, cache
line size of 64
00060|netdev_dpdk|WARN|Rx checksum offload is not supported on port 0
00061|dpdk|ERR|virtio_dev_configure(): Unsupported Rx multi queue mode 1
00062|dpdk|ERR|Port0 dev_configure = -22
00063|netdev_dpdk|WARN|Interface virtio_user0 eth_dev setup error
Invalid argument
00064|netdev_dpdk|ERR|Interface virtio_user0(rxq:1 txq:1 lsc interrupt
mode:false) configure error: Invalid argument
The
"Unsupported Rx multi queue mode 1" at virtio_dev_configure()
if (rxmode->mq_mode != ETH_MQ_RX_NONE) {
PMD_DRV_LOG(ERR,
"Unsupported Rx multi queue mode %d",
rxmode->mq_mode);
// return -EINVAL;
}
Based on DPDK master
commit 2e088e6f94b773233c06440763c1be43d0d705b3
Skipping it seems to work, but I don't understand how to set virtio_user
to disable mq_mode in virtio_dev. For virtio user, there are these parameters:
RTE_PMD_REGISTER_PARAM_STRING(net_virtio_user,
"path=<path> "
"mac=<mac addr> "
"cq=<int> "
"queue_size=<int> "
"queues=<int> "
"iface=<string> "
"server=<0|1> "
"mrg_rxbuf=<0|1> "
"in_order=<0|1> "
"packed_vq=<0|1>");
Thanks
William
> -----邮件原件-----
> 发件人: dev [mailto:dev-bounces@dpdk.org] 代表 William Tu
> 发送时间: 2020年1月1日 6:19
> 收件人: <dev@openvswitch.org> <dev@openvswitch.org>; dev@dpdk.org
> 抄送: Jianfeng Tan <jianfeng.tan@linux.alibaba.com>
> 主题: [dpdk.org代发][dpdk-dev] Question about using virtio_user in OVS-DPDK
>
> Hi,
>
> I'm trying to find a faster way to communicate from userspace OVS to kernel. So I create a virtio_user port at OVS-DPDK, and send packets to kernel's tap device.
>
> packets in OVS userspace -> virtio-user port -> vhost-net (kernel) -> tap device (kernel) As described in paper[1], figure 1 for legacy applications.
>
> But there is no documentation about it. I tried:
> 1) load vhost-net
> # lsmod | grep vhost
> vhost_net 32768 0
> vhost 57344 1 vhost_net
> tap 28672 1 vhost_net
> tun 57344 8 vhost_net
>
> 2) start OVS
> 3) create tap and attach to OVS
> ip tuntap add mode tap tap0
> ip link set dev tap0 up
> ovs-vsctl add-port br0 tap0 -- set interface tap0 type=dpdk \
> options:dpdk-devargs=vdev:net_virtio_user1,iface=tap0,path=/dev/vhost-net
>
> So I thought this is a faster channel using virtio ring than readv/writev to the tap fd.
> But it doesn't work.
> 2019-12-31T22:06:39.956Z|00033|netdev|WARN|could not create netdev
> tap0 of unknown type dpdk
> 2019-12-31T22:06:39.956Z|00034|bridge|WARN|could not open network device tap0 (Address family not supported by protocol)
>
> Any suggestions? Or do I understand the concept of virtio_user correctly?
>
> [1] VIRTIO-USER: A New Versatile Channel for Kernel-Bypass Networks Thanks William
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-01-02 20:02 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <dd0cbd6a6fe97b43349226ba91b2e616@sslemail.net>
2019-12-31 22:19 ` [dpdk-dev] Question about using virtio_user in OVS-DPDK William Tu
[not found] ` <e91d25eaa10b4228824f1d7c3cb949e5@inspur.com>
2020-01-02 20:01 ` [dpdk-dev] [dpdk.org代发] " William Tu
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).