v2: - Move the ctrl queue handler and multi queue logic into device emulation. - Rebase on newest code.
This patch set depends on below patch sets: - http://dpdk.org/ml/archives/dev/2016-June/040979.html - http://dpdk.org/ml/archives/dev/2016-June/040954.html Add multi queue support for virtio-user virtual port. Patch 1 adds vhost user adapter communications for enable/disable queues. Patch 2 adds features check for multi queue and provides a method for virtio-user driver to enable/disable queues. Patch 3 partially implements ctrl-q to handle VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET command from PMD. Test case: 1. start testpmd with a vhost-user port: $ TESTPMD -c 0x7 -n 4 --socket-mem 1024,0 --no-pci \ --vdev 'eth_vhost0,iface=/tmp/sock0,queues=2' \ -- -i --rxq=2 --txq=2 --nb-cores=2 2. start testpmd with a virtio-user port: $ TESTPMD -c 0x70 -n 4 --socket-mem 1024,0 --no-pci --file-prefix=testpmd \ --vdev=virtio-user0,mac=00:01:02:03:04:05,path=/tmp/sock0,queues=2 \ -- -i --rxq=2 --txq=2 --nb-cores=2 --txqflags=0xf01 --disable-hw-vlan 3. use below commands to see if all queues are working: testpmd> show port xstats all Jianfeng Tan (4): virtio-user: use virtual address in cq virtio-user: add mq in vhost user adapter virtio-user: add ctrl-q and mq in device emulation virtio-user: handle ctrl-q in driver drivers/net/virtio/virtio_ethdev.c | 6 +- drivers/net/virtio/virtio_user/vhost.h | 5 + drivers/net/virtio/virtio_user/vhost_user.c | 21 ++++ drivers/net/virtio/virtio_user/virtio_user_dev.c | 124 +++++++++++++++++++++-- drivers/net/virtio/virtio_user/virtio_user_dev.h | 2 +- drivers/net/virtio/virtio_user_ethdev.c | 13 +++ 6 files changed, 158 insertions(+), 13 deletions(-) -- 2.1.4