From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 01B8AA04F3; Thu, 2 Jan 2020 21:02:34 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 4700A1C1DE; Thu, 2 Jan 2020 21:02:34 +0100 (CET) Received: from mail-qt1-f195.google.com (mail-qt1-f195.google.com [209.85.160.195]) by dpdk.org (Postfix) with ESMTP id 9DC881C1D9 for ; Thu, 2 Jan 2020 21:02:32 +0100 (CET) Received: by mail-qt1-f195.google.com with SMTP id q20so35435010qtp.3 for ; Thu, 02 Jan 2020 12:02:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=MYhDXYD6K9n3iVGOYmPtKq0mlXBC8qE4Adua5s06Gqw=; b=d2bby4uNCPFOrl3swXUJdmRAgRvSX2zDvG2oTkmPGRHciH+NwkFn5PCS8o7ogmGehC DhV5kyi9h7lYY6NAaxNQBIYNU4jtAnh4Ly6tSCpQVlzBOUQT0iEOE2AtDSgpi4umqh1e DGhXtFC0kEzs+E37ZEpcKdc+okiw3iTqYR5iAmg5m6nTM736uQjwGr60W8xJvyUeVxuV A0iXqYOO6m/EUldEhg94LGQy2B7Tctp1sSce83USBtzG1QAqpKh512A/TzdRMypzNAOE zWab4UEUq+HXoGHJXe7wjWbVzXhU5pwq5KLTKVxcJWCYQR6a+R7JDA/QLpsAGd59K39b TGkQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=MYhDXYD6K9n3iVGOYmPtKq0mlXBC8qE4Adua5s06Gqw=; b=JSeiE2Rgy8B0Yd26l67zZQqhGujrIbr94ZEKtIwH5BRcff6ewj6QyLGMdeGPMnB2hX Afyhd5YidZpnPxLewfOZbC2W8+c1bxEoG/QIZphrrTDgUPVI+P9YmcVIcTRG4g4AS1Vn lCbIVKX4OpEZ1X22M3TiVwtwGHOXGM8jvG1fdtBdG7qk3S6W2jhTUzfXrn+GLWahFKsP swruiwm3IW7vyOs2twkFCJA1MjIcm9p9f+6G2kBJxbFZwqPd0FyfosrKDSeHcLPCiPha uGbi+KnyvlDHNDFG8XgdjVCtm4wFf1L0ycGcPsKaR0nL1Ksrgp9UaL/sJJQgJ26QttsD lr/A== X-Gm-Message-State: APjAAAV9JXTUd9ig/O9HgZY5mw20KGzz277ndci/CJwhPCv9hoZ2mOJo 6WrqUm4pp7JDrPUQkjifzX8Z6fxFjjFaXTGriQ4= X-Google-Smtp-Source: APXvYqzrZZujkEcW/XDN7o/WbN/kCOkb+nsiZ/CAs8d7Xesz2vPq2qJvX8nhBe2FI1WH07MzPeIblSUe7At/61TRels= X-Received: by 2002:ac8:7586:: with SMTP id s6mr60095750qtq.309.1577995351825; Thu, 02 Jan 2020 12:02:31 -0800 (PST) MIME-Version: 1.0 References: In-Reply-To: From: William Tu Date: Thu, 2 Jan 2020 12:01:55 -0800 Message-ID: To: =?UTF-8?B?WWkgWWFuZyAo5p2o54eaKS3kupHmnI3liqHpm4blm6I=?= Cc: "dev@openvswitch.org" , "dev@dpdk.org" , "jianfeng.tan@linux.alibaba.com" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] =?utf-8?b?W2RwZGsub3Jn5Luj5Y+RXSBRdWVzdGlvbiBhYm91dCB1?= =?utf-8?q?sing_virtio=5Fuser_in_OVS-DPDK?= X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Wed, Jan 1, 2020 at 5:05 PM Yi Yang (=E6=9D=A8=E7=87=9A)-=E4=BA=91=E6=9C= =8D=E5=8A=A1=E9=9B=86=E5=9B=A2 wrote: > > William, use the below option for your tap0 > > sudo ovs-vsctl add-port br-int virtio_user0 -- set Interface virtio_user0= type=3Ddpdk options:dpdk-devargs=3Dnet_virtio_user0,iface=3Dtap0,path=3D/d= ev/vhost-net,queue_size=3D1024 > > vistio_user also can create tap0 if it doesn't exist, you remove "iface= =3Dtap0" from option for that case. > > Maybe ovs port name can't be same as tap interface names, it is just my g= uess. > Hi Yi, Thanks for your reply. I'm using this ovs command ovs-vsctl add-port br0 virtio_user0 -- set Interface virtio_user0 type=3Ddp= dk \ options:n_rxq=3D1 options:n_txq=3D1 \ options:dpdk-devargs=3Dnet_virtio_user0,iface=3Dtap0,path=3D/dev/vhost-= net,queues=3D1 I hit an error showing 00051|netdev_dpdk|INFO|Device 'net_virtio_user0,iface=3Dtap0,path=3D/dev/vhost-net, queues=3D1' 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 =3D -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 !=3D 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 paramet= ers: RTE_PMD_REGISTER_PARAM_STRING(net_virtio_user, "path=3D " "mac=3D " "cq=3D " "queue_size=3D " "queues=3D " "iface=3D " "server=3D<0|1> " "mrg_rxbuf=3D<0|1> " "in_order=3D<0|1> " "packed_vq=3D<0|1>"); Thanks William > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > =E5=8F=91=E4=BB=B6=E4=BA=BA: dev [mailto:dev-bounces@dpdk.org] =E4=BB=A3= =E8=A1=A8 William Tu > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2020=E5=B9=B41=E6=9C=881=E6=97=A5 6= :19 > =E6=94=B6=E4=BB=B6=E4=BA=BA: ;= dev@dpdk.org > =E6=8A=84=E9=80=81: Jianfeng Tan > =E4=B8=BB=E9=A2=98: [dpdk.org=E4=BB=A3=E5=8F=91][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 kern= el. 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=3Ddpdk \ > options:dpdk-devargs=3Dvdev:net_virtio_user1,iface=3Dtap0,path=3D/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 Thank= s William