[dpdk-dev] [PATCH] maintainers: claim responsability for xen

2016-11-07 Thread Jianfeng Tan
As some users are still using xen as the hypervisor, I suggest to continue support for xen in DPDK. And from 16.11, I will be the maintainer of all xen-related files. Signed-off-by: Jianfeng Tan --- MAINTAINERS | 1 + 1 file changed, 1 insertion(+) diff --git a/MAINTAINERS b/MAINTAINERS index

[dpdk-dev] [RFC] igb_uio: deprecate iomem and ioport mapping

2016-09-01 Thread Jianfeng Tan
info by pci_uio_ioport_map(). Note: this will affect those applications who are using files under /sys/pci/bus/devices/:xx:xx.x/uio/uioY/maps/ and /sys/pci/bus/devices/:xx:xx.x/uio/uioY/portio/. Signed-off-by: Jianfeng Tan --- lib/librte_eal/linuxapp/eal/eal_pci.c | 4 - lib

[dpdk-dev] [PATCH v3] eal: restrict cores detection

2016-09-01 Thread Jianfeng Tan
restriction as starting the instance. Note: previously, some users are using isolated CPUs, which could be excluded by default. Please add commands like taskset to use those cores. Test example: $ taskset 0xc ./examples/helloworld/build/helloworld -m 1024 Signed-off-by: Jianfeng Tan Acked

[dpdk-dev] [PATCH v2] eal: restrict cores detection

2016-08-31 Thread Jianfeng Tan
restriction as starting the instance. Note: previously, some users are using isolated CPUs, which could be excluded by default. Please add commands like taskset to use those cores. Test example: $ taskset 0xc ./examples/helloworld/build/helloworld -m 1024 Signed-off-by: Jianfeng Tan Acked

[dpdk-dev] [PATCH 3/3] net/virtio_user: fix dev not freed after init error

2016-08-05 Thread Jianfeng Tan
and report error when failing to start virtio_user devices. Fixes: ce2eabdd43ec ("net/virtio-user: add virtual device") Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virtio_user_ethdev.c | 23 +++ 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/drivers/

[dpdk-dev] [PATCH 2/3] net/virtio_user: fix wrong sequence of messages

2016-08-05 Thread Jianfeng Tan
layer") Reported-by: Zhihong Wang Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virtio_user/virtio_user_dev.c | 120 ++- 1 file changed, 72 insertions(+), 48 deletions(-) diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/v

[dpdk-dev] [PATCH 1/3] net/virtio_user: fix queue pair not enabled

2016-08-05 Thread Jianfeng Tan
in the process of initialization. So the fix here is to include similar logic in virtio_user. Fixes: 37a7eb2ae816 ("net/virtio-user: add device emulation layer") Reported-by: Ning Li Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virtio_user/virtio_user_dev.c | 7 +++ 1 file changed, 7

[dpdk-dev] [PATCH 0/3] fix virtio_user issues

2016-08-05 Thread Jianfeng Tan
Patch 1: fix issue when using virtio_user with OVS-DPDK. Patch 2: fix issue when using virtio_user with VPP. Patch 3: fix issue when failing to start virtio_user devices. Signed-off-by: Jianfeng Tan Jianfeng Tan (3): net/virtio_user: fix queue pair not enabled net/virtio_user: fix wrong

[dpdk-dev] [PATCH 2/2] examples/tep_term: fix inner L4 checksum failure

2016-08-04 Thread Jianfeng Tan
get_psd_sum() is called. The fix is straightforward. Move the bit setting before get_psd_sum() is called. Fixes: a50245ede72a ("examples/tep_term: initialize VXLAN sample") Signed-off-by: Jianfeng Tan --- examples/tep_termination/vxlan.c | 9 ++--- 1 file changed, 6 insertions(+), 3

[dpdk-dev] [PATCH 1/2] examples/tep_term: fix offload on VXLAN failure

2016-08-04 Thread Jianfeng Tan
Based on previous fix of offload on VXLAN using i40e, applications need to set proper tunneling type on ol_flags so that i40e driver can pass it to NIC. Fixes: a50245ede72a ("examples/tep_term: initialize VXLAN sample") Signed-off-by: Jianfeng Tan --- examples/tep_termination/vxlan.c

[dpdk-dev] [PATCH 0/2] Two offloading issues of tep_term

2016-08-04 Thread Jianfeng Tan
This patch set depends on: - http://dpdk.org/ml/archives/dev/2016-August/044924.html Patch 1: fill tunneling type. Patch 2: inner L4 checksum error. Signed-off-by: Jianfeng Tan Jianfeng Tan (2): examples/tep_term: fix offload on VXLAN failure examples/tep_term: fix inner L4 checksum

[dpdk-dev] [PATCH v4 3/3] app/testpmd: fix Tx offload on tunneling packet

2016-08-01 Thread Jianfeng Tan
t;tso set _size _port" or the other way around. Fixes: b51c47536a9e ("app/testpmd: support TSO in checksum forward engine") Signed-off-by: Zhe Tao Signed-off-by: Jianfeng Tan --- app/test-pmd/cmdline.c | 42 --

[dpdk-dev] [PATCH v4 2/3] net/i40e: add TSO support on tunneling packet

2016-08-01 Thread Jianfeng Tan
ines the outer L2 header. Also, we define TSO on each kind of tunneling type as a capabilities. Now only i40e declares to support them. Signed-off-by: Zhe Tao Signed-off-by: Jianfeng Tan --- drivers/net/i40e/i40e_ethdev.c | 6 ++- drivers/net/i40e/i40e_rxtx.c

[dpdk-dev] [PATCH v4 1/3] mbuf: add Tx side tunneling type

2016-08-01 Thread Jianfeng Tan
-off-by: Zhe Tao Signed-off-by: Jianfeng Tan --- lib/librte_mbuf/rte_mbuf.c | 4 lib/librte_mbuf/rte_mbuf.h | 17 - 2 files changed, 20 insertions(+), 1 deletion(-) diff --git a/lib/librte_mbuf/rte_mbuf.c b/lib/librte_mbuf/rte_mbuf.c index 4846b89..4505abb 100644 --- a/lib

[dpdk-dev] [PATCH v4 0/3] Add TSO on tunneling packet

2016-08-01 Thread Jianfeng Tan
the comments Signed-off-by: Zhe Tao Signed-off-by: Jianfeng Tan Jianfeng Tan (3): mbuf: add Tx side tunneling type net/i40e: add TSO support on tunneling packet app/testpmd: fix Tx offload on tunneling packet app/test-pmd/cmdline.c | 42 +--- app/test-pmd/csumonly.c

[dpdk-dev] [PATCH] net/virtio_user: fix inconsistent name

2016-07-22 Thread Jianfeng Tan
ice as per the docs. This patch updates related strings in the docs and source code. Fixes: cb6696d22023 ("drivers: update registration macro usage") Reported-by: Tiwei Bie Signed-off-by: Jianfeng Tan --- doc/guides/rel_notes/release_16_07.rst | 2 +- doc/guides/sample_app_ug

[dpdk-dev] [PATCH v3] examples/vhost: fix perf regression

2016-07-21 Thread Jianfeng Tan
VM kernel virtio driver go into big_packets path. Fixes: 9fd72e3cbd29 ("examples/vhost: add virtio offload") Reported-by: Qian Xu Signed-off-by: Jianfeng Tan --- v3: reword commit log. v2: change the Fixes line to point to proper commit to fix. examples/vhost/main.c | 2 ++ 1 file c

[dpdk-dev] [PATCH v2] examples/vhost: fix perf regression

2016-07-21 Thread Jianfeng Tan
of vhost example, to avoid VM kernel virtio driver go into big_packets path. Fixes: 9fd72e3cbd29 ("examples/vhost: add virtio offload") Reported-by: Qian Xu Signed-off-by: Jianfeng Tan --- v2: change the Fixes line to point to proper commit to fix. examples/vhost/main.c | 2 ++ 1 file

[dpdk-dev] [PATCH] examples/vhost: fix perf regression

2016-07-19 Thread Jianfeng Tan
of vhost example, to avoid VM kernel virtio driver go into big_packets path. Fixes: 859b480d5afd ("vhost: add guest offload setting") Reported-by: Qian Xu Signed-off-by: Jianfeng Tan --- examples/vhost/main.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/vhost/main.c

[dpdk-dev] [PATCH] net/virtio: fix null pointer dereference

2016-07-05 Thread Jianfeng Tan
if (!cvq && !cvq->vq) { ... } Coverity issue: 127480 Fixes: 01ad44fd374f ("net/virtio: split Rx/Tx queue") Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virtio_ethdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/v

[dpdk-dev] [PATCH] examples/vhost: fix failure without hints

2016-07-01 Thread Jianfeng Tan
("examples/vhost: import userspace vhost application") Reported-by: Yulong Pei Signed-off-by: Jianfeng Tan --- examples/vhost/main.c | 20 1 file changed, 16 insertions(+), 4 deletions(-) diff --git a/examples/vhost/main.c b/examples/vhost/main.c index 3aff2c

[dpdk-dev] [PATCH 4/4] net/virtio-user: fix string unterminated

2016-06-29 Thread Jianfeng Tan
evice") Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virtio_user/virtio_user_dev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c index 1b1e5bf..376c9cf 100644 --- a/d

[dpdk-dev] [PATCH 3/4] net/virtio-user: fix resource leaks

2016-06-29 Thread Jianfeng Tan
The return value by rte_kvargs_parse is not free(d), which leads to memory leak. Coverity issue: 127482 Fixes: ce2eabdd43ec ("net/virtio-user: add virtual device") Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virtio_user_ethdev.c | 4 +++- 1 file changed, 3 insertions(+),

[dpdk-dev] [PATCH 2/4] net/virtio-user: fix string overflow

2016-06-29 Thread Jianfeng Tan
issue: 127484 Fixes: 6a84c37e3975 ("net/virtio-user: add vhost-user adapter layer") Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virtio_user/vhost_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/virtio/virtio_user/vhost_user.c b/drivers/

[dpdk-dev] [PATCH 1/4] net/virtio-user: fix return value not checked

2016-06-29 Thread Jianfeng Tan
3975 ("net/virtio-user: add vhost-user adapter layer") Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virtio_user/vhost_user.c | 3 +- drivers/net/virtio/virtio_user_ethdev.c | 57 ++--- 2 files changed, 45 insertions(+), 15 deletions(-) diff --git

[dpdk-dev] [PATCH 0/4] net/virtio-user: fix coverity issues

2016-06-29 Thread Jianfeng Tan
Patch 1: fix return value not checked, Coverity issue: 127344, 127478 Patch 2: fix string overflow, Coverity issue: 127484 Patch 3: fix resource leaks, Coverity issue: 127482 Patch 4: fix string unterminated, Coverity issue: 127476 Jianfeng Tan (4): net/virtio-user: fix return value not checked

[dpdk-dev] [PATCH v2] net/virtio-user: fix build error in SUSE 11

2016-06-29 Thread Jianfeng Tan
which needs _GNU_SOURCE defined on some old systems. Fixes: 37a7eb2ae816 ("net/virtio-user: add device emulation layer") Signed-off-by: Jianfeng Tan --- v2: - Change the way to fix this issue. drivers/net/virtio/virtio_user/virtio_user_dev.c | 4 ++-- 1 file changed, 2 insertions(+), 2

[dpdk-dev] [PATCH] net/virtio-user: fix missing default macro

2016-06-29 Thread Jianfeng Tan
: ce2eabdd43ec ("net/virtio-user: add virtual device") Reported-by: Ferruh Yigit Signed-off-by: Jianfeng Tan --- config/common_base | 5 + 1 file changed, 5 insertions(+) diff --git a/config/common_base b/config/common_base index 5d9daf5..0368d59 100644 --- a/config/common_base ++

[dpdk-dev] [PATCH] net/virtio-user: fix O_CLOEXEC undeclared error

2016-06-26 Thread Jianfeng Tan
t;net/virtio-user: add device emulation layer") Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virtio_user/virtio_user_dev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/virtio/virtio_user/virtio_user_dev.c b/drivers/net/virtio/virtio_user/virtio_user_dev.c ind

[dpdk-dev] [PATCH v2] net/virtio-user: fix implicit int to enum conversion

2016-06-26 Thread Jianfeng Tan
is simple, change the type of parameter req to enum vhost_user_request. Fixes: 6a84c37e3975 ("net/virtio-user: add vhost-user adapter layer") Suggested-by: Stephen Hemminger Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virtio_user/vhost.h | 2 +- drivers/net/virtio/v

[dpdk-dev] [PATCH] net/virtio-user: fix implicit int to enum conversion

2016-06-23 Thread Jianfeng Tan
is simple, aka make such conversion explicit. Fixes: 6a84c37e3975 ("net/virtio-user: add vhost-user adapter layer") Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virtio_user/vhost_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/virtio/v

[dpdk-dev] [PATCH v3 0/3] virtio-user: handle ctrl-q in driver

2016-06-15 Thread Jianfeng Tan
In virtio-user driver, when notify ctrl-queue, invoke API of virtio-user device emulation to handle ctrl-q command. Besides, multi-queue requires ctrl-queue and ctrl-queue will be enabled automatically when multi-queue is specified. Signed-off-by: Jianfeng Tan --- drivers/net/virtio

[dpdk-dev] [PATCH v3 2/3] virtio-user: add ctrl-q and mq in device emulation

2016-06-15 Thread Jianfeng Tan
of VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET to handle mq support. This patch provides an API, virtio_user_handle_cq(), for driver to handle ctrl-queue messages. Besides, multi-queue requires VIRTIO_NET_F_MQ and VIRTIO_NET_F_CTRL_VQ are enabled when we do feature negotiation. Signed-off-by: Jianfeng Tan --- drivers

[dpdk-dev] [PATCH v3 1/3] virtio-user: add mq in vhost user adapter

2016-06-15 Thread Jianfeng Tan
This patch mainly adds method in vhost user adapter to communicate enable/disable queues messages with vhost user backend, aka, VHOST_USER_SET_VRING_ENABLE. Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virtio_user/vhost.h | 5 + drivers/net/virtio/virtio_user/vhost_user.c | 22

[dpdk-dev] [PATCH v3 0/3] add multi queue support for virtio-user

2016-06-15 Thread Jianfeng Tan
ile-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 (3): virtio-user: add mq

[dpdk-dev] [PATCH v9 6/6] virtio-user: add a new vdev named virtio-user

2016-06-15 Thread Jianfeng Tan
by: Huawei Xie Signed-off-by: Jianfeng Tan Acked-by: Neil Horman Acked-by: Yuanhan Liu --- doc/guides/rel_notes/release_16_07.rst | 12 ++ doc/guides/sample_app_ug/vhost.rst | 17 +++ drivers/net/virtio/virtio_ethdev.c | 19 +-- drivers/net/virtio/virtio_ethdev.h | 2 + d

[dpdk-dev] [PATCH v9 5/6] virtio-user: add new virtual PCI driver for virtio

2016-06-15 Thread Jianfeng Tan
vhost adapter | | | -- | -- | | | -- | vhost backend | -- Signed-off-by: Huawei Xie Signed-off-by: Jianfeng Tan Acked-by: Neil Horman Acked-by: Yuanhan Liu --- drivers/net/

[dpdk-dev] [PATCH v9 4/6] virtio-user: add device emulation layer APIs

2016-06-15 Thread Jianfeng Tan
ed-off-by: Huawei Xie Signed-off-by: Jianfeng Tan Acked-by: Neil Horman --- drivers/net/virtio/Makefile | 1 + drivers/net/virtio/virtio_user/virtio_user_dev.c | 227 +++ drivers/net/virtio/virtio_user/virtio_user_dev.h | 62 +++ 3 files changed, 290 inse

[dpdk-dev] [PATCH v9 1/6] virtio: hide phys addr check inside PCI ops

2016-06-15 Thread Jianfeng Tan
This patch is to move phys addr check from virtio_dev_queue_setup to pci ops. To makt that happen, make sure virtio_ops.setup_queue return the result if we pass through the check. Signed-off-by: Jianfeng Tan Signed-off-by: Huawei Xie Acked-by: Yuanhan Liu --- drivers/net/virtio

[dpdk-dev] [PATCH v2 4/4] virtio-user: handle ctrl-q in driver

2016-06-13 Thread Jianfeng Tan
In virtio-user driver, when notify ctrl-queue, invoke API of virtio-user device emulation to handle ctrl-q command. Besides, multi-queue requires ctrl-queue and ctrl-queue will be enabled automatically when multi-queue is specified. Signed-off-by: Jianfeng Tan --- drivers/net/virtio

[dpdk-dev] [PATCH v2 3/4] virtio-user: add ctrl-q and mq in device emulation

2016-06-13 Thread Jianfeng Tan
of VIRTIO_NET_CTRL_MQ_VQ_PAIRS_SET to handle mq support. This patch provides an API, virtio_user_handle_cq(), for driver to handle ctrl-queue messages. Besides, multi-queue requires VIRTIO_NET_F_MQ and VIRTIO_NET_F_CTRL_VQ are enabled when we do feature negotiation. Signed-off-by: Jianfeng Tan --- drivers

[dpdk-dev] [PATCH v2 2/4] virtio-user: add mq in vhost user adapter

2016-06-13 Thread Jianfeng Tan
This patch mainly adds method in vhost user adapter to communicate enable/disable queues messages with vhost user backend. Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virtio_user/vhost.h | 5 + drivers/net/virtio/virtio_user/vhost_user.c | 21 + 2 files

[dpdk-dev] [PATCH v2 1/4] virtio-user: use virtual address in cq

2016-06-13 Thread Jianfeng Tan
Change to use virtio_net_hdr_mem instead of physical addr of memzone when sending contrl queue commands. The virtio_net_hdr_mem has been initialized to use virtual address under the case of virtio-user. Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virtio_ethdev.c | 6 +++--- 1 file

[dpdk-dev] [PATCH v2 0/4] add multi queue support for virtio-user

2016-06-13 Thread Jianfeng Tan
--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): vir

[dpdk-dev] [PATCH v8 6/6] virtio-user: add a new vdev named virtio-user

2016-06-13 Thread Jianfeng Tan
by: Huawei Xie Signed-off-by: Jianfeng Tan Acked-by: Neil Horman --- doc/guides/rel_notes/release_16_07.rst | 12 ++ doc/guides/sample_app_ug/vhost.rst | 17 +++ drivers/net/virtio/virtio_ethdev.c | 19 +-- drivers/net/virtio/virtio_ethdev.h | 2 + drivers/

[dpdk-dev] [PATCH v8 5/6] virtio-user: add new virtual pci driver for virtio

2016-06-13 Thread Jianfeng Tan
vhost adapter | | | -- | -- | | | -- | vhost backend | -- Signed-off-by: Huawei Xie Signed-off-by: Jianfeng Tan Acked-by: Neil Horman --- drivers/net/virtio/Ma

[dpdk-dev] [PATCH v8 4/6] virtio-user: add device emulation layer APIs

2016-06-13 Thread Jianfeng Tan
ed-off-by: Huawei Xie Signed-off-by: Jianfeng Tan Acked-by: Neil Horman --- drivers/net/virtio/Makefile | 1 + drivers/net/virtio/virtio_user/virtio_user_dev.c | 227 +++ drivers/net/virtio/virtio_user/virtio_user_dev.h | 62 +++ 3 files changed, 290 inse

[dpdk-dev] [PATCH v8 3/6] virtio-user: add vhost user adapter layer

2016-06-13 Thread Jianfeng Tan
uawei Xie Signed-off-by: Jianfeng Tan Acked-by: Neil Horman --- config/common_linuxapp | 1 + drivers/net/virtio/Makefile | 4 + drivers/net/virtio/virtio_user/vhost.h | 141 ++ drivers/net/virtio/virtio_user/vhost_use

[dpdk-dev] [PATCH v8 2/6] virtio: enable use virtual address to fill desc

2016-06-13 Thread Jianfeng Tan
here. It basically means: a. when set_base_addr, VA address is used; b. when preparing RX's descriptors, VA address is used; c. when transmitting packets, VA is filled in TX's descriptors; d. in TX and CQ's header, VA is used. Signed-off-by: Huawei Xie Signed-off-by: Jianfeng Tan Acked

[dpdk-dev] [PATCH v8 1/6] virtio: hide phys addr check inside pci ops

2016-06-13 Thread Jianfeng Tan
This patch is to move phys addr check from virtio_dev_queue_setup to pci ops. To makt that happen, make sure virtio_ops.setup_queue return the result if we pass through the check. Signed-off-by: Jianfeng Tan Signed-off-by: Huawei Xie Acked-by: Yuanhan Liu --- drivers/net/virtio

[dpdk-dev] [PATCH v8 0/6] virtio support for container

2016-06-13 Thread Jianfeng Tan
docker build -t dpdk-app-l2fwd . d. Used with vhost-user $: ./examples/vhost/build/vhost-switch -c 3 -n 4 \ --socket-mem 1024,1024 -- -p 0x1 --stats 1 $: docker run -i -t -v :/var/run/usvhost \ -v /dev/hugepages:/dev/hugepages \ dpdk-app-l2fwd l2fwd -c 0x4 -n 4 -m 1024

[dpdk-dev] [PATCH] virtio: fix allocating virtnet_rx not mem aligned

2016-06-12 Thread Jianfeng Tan
hat making sz_vq 32-byte aligned. Here we make it cache line aligned for future optimization. Fixes: a900472aedef ("virtio: split virtio Rx/Tx queue") Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virtio_ethdev.c | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) di

[dpdk-dev] [PATCH] virito: fix reuse index in nested loop

2016-06-12 Thread Jianfeng Tan
on these queues, segment fault happens. Fixes: a900472aedef ("virtio: split virtio Rx/Tx queue") Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virtio_rxtx.c | 36 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/drivers/net/virtio/virti

[dpdk-dev] [PATCH v7 6/6] virtio-user: add a new vdev named virtio-user

2016-06-12 Thread Jianfeng Tan
there are more than VHOST_MEMORY_MAX_NREGIONS(8) hugepages. - Root privilege is a must (mainly becase of sorting hugepages according to physical address). - Applications should not use file name like HUGEFILE_FMT ("%smap_%d"). Signed-off-by: Huawei Xie Signed-off-by: Jianfeng

[dpdk-dev] [PATCH v7 5/6] virtio-user: add new virtual pci driver for virtio

2016-06-12 Thread Jianfeng Tan
vhost adapter | | | -- | -- | | | -- | vhost backend | -- Signed-off-by: Huawei Xie Signed-off-by: Jianfeng Tan Acked-by: Neil Horman --- drivers/net/virtio/Ma

[dpdk-dev] [PATCH v7 4/6] virtio-user: add device emulation layer APIs

2016-06-12 Thread Jianfeng Tan
ed-off-by: Huawei Xie Signed-off-by: Jianfeng Tan Acked-by: Neil Horman --- drivers/net/virtio/Makefile | 1 + drivers/net/virtio/virtio_user/virtio_user_dev.c | 263 +++ drivers/net/virtio/virtio_user/virtio_user_dev.h | 64 ++ 3 files changed, 328 inse

[dpdk-dev] [PATCH v7 3/6] virtio-user: add vhost adapter layer

2016-06-12 Thread Jianfeng Tan
t backend | -- Signed-off-by: Huawei Xie Signed-off-by: Jianfeng Tan Acked-by: Neil Horman --- config/common_linuxapp| 1 + drivers/net/virtio/Makefile | 6 + drivers/net/virtio/virtio_user/vhost.c| 105 +++ drivers/net/virtio/vi

[dpdk-dev] [PATCH v7 2/6] virtio: enable use virtual address to fill desc

2016-06-12 Thread Jianfeng Tan
here. It basically means: a. when set_base_addr, VA address is used; b. when preparing RX's descriptors, VA address is used; c. when transmitting packets, VA is filled in TX's descriptors; d. in TX and CQ's header, VA is used. Signed-off-by: Huawei Xie Signed-off-by: Jianfeng Tan Acked

[dpdk-dev] [PATCH v7 1/6] virtio: hide phys addr check inside pci ops

2016-06-12 Thread Jianfeng Tan
This patch is to move phys addr check from virtio_dev_queue_setup to pci ops. To makt that happen, make sure virtio_ops.setup_queue return the result if we pass through the check. Signed-off-by: Jianfeng Tan Signed-off-by: Huawei Xie Acked-by: Yuanhan Liu --- drivers/net/virtio

[dpdk-dev] [PATCH v7 0/6] virtio support for container

2016-06-12 Thread Jianfeng Tan
-privileged \ -v /dev/vhost-net:/dev/vhost-net \ -v /dev/net/tun:/dev/net/tun \ -v /dev/hugepages:/dev/hugepages \ dpdk-app-l2fwd l2fwd -c 0x4 -n 4 -m 1024 --no-pci \ --vdev=virtio-user0,path=/dev/vhost-net -- -p 0x1 By the way, it's not necessary to run in

[dpdk-dev] [PATCH v6 7/7] virtio-user: add a new vdev named virtio-user

2016-06-02 Thread Jianfeng Tan
there are more than VHOST_MEMORY_MAX_NREGIONS(8) hugepages. - Root privilege is a must (mainly becase of sorting hugepages according to physical address). - Applications should not use file name like HUGEFILE_FMT ("%smap_%d"). Signed-off-by: Huawei Xie Signed-off-by: Jianfeng

[dpdk-dev] [PATCH v6 6/7] virtio-user: add new virtual pci driver for virtio

2016-06-02 Thread Jianfeng Tan
vhost adapter | | | -- | -- | | | -- | vhost backend | -- Signed-off-by: Huawei Xie Signed-off-by: Jianfeng Tan Acked-by: Neil Horman --- drivers/net/virtio/Ma

[dpdk-dev] [PATCH v6 4/7] virtio-user: add vhost adapter layer

2016-06-02 Thread Jianfeng Tan
t backend | -- Signed-off-by: Huawei Xie Signed-off-by: Jianfeng Tan Acked-by: Neil Horman --- config/common_linuxapp| 3 + drivers/net/virtio/Makefile | 6 + drivers/net/virtio/virtio_user/vhost.c| 105 +++ drivers/net/virtio/vi

[dpdk-dev] [PATCH v6 3/7] virtio: enable use virtual address to fill desc

2016-06-02 Thread Jianfeng Tan
here. It basically means: a. when set_base_addr, VA address is used; b. when preparing RX's descriptors, VA address is used; c. when transmitting packets, VA is filled in TX's descriptors; d. in TX and CQ's header, VA is used. Signed-off-by: Huawei Xie Signed-off-by: Jianfeng Tan Acked

[dpdk-dev] [PATCH v6 2/7] virtio: clean up virtio_dev_queue_setup

2016-06-02 Thread Jianfeng Tan
Abstract vring hdr desc init as an inline method. Signed-off-by: Huawei Xie Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virtio_ethdev.c | 42 ++ 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b

[dpdk-dev] [PATCH v6 1/7] virtio: hide phys addr check inside pci ops

2016-06-02 Thread Jianfeng Tan
This patch is to move phys addr check from virtio_dev_queue_setup to pci ops. To makt that happen, make sure virtio_ops.setup_queue return the result if we pass through the check. Signed-off-by: Jianfeng Tan Signed-off-by: Huawei Xie Acked-by: Yuanhan Liu --- drivers/net/virtio

[dpdk-dev] [PATCH v6 0/7] virtio support for container

2016-06-02 Thread Jianfeng Tan
t \ -v /dev/net/tun:/dev/net/tun \ -v /dev/hugepages:/dev/hugepages \ dpdk-app-l2fwd l2fwd -c 0x4 -n 4 -m 1024 --no-pci \ --vdev=virtio-user0,path=/dev/vhost-net -- -p 0x1 By the way, it's not necessary to run in a container. Signed-off-by: Huawei Xie Signed-off-by:

[dpdk-dev] [PATCH v5] eal: fix allocating all free hugepages

2016-05-31 Thread Jianfeng Tan
\ ./examples/helloworld/build/helloworld -c 0x2 -n 4 Fixes: af75078fece ("first public release") Signed-off-by: Jianfeng Tan Acked-by: Neil Horman --- v5: - Make this method as default instead of using an option. - When SIGBUS is triggered in the case of RTE_EAL_SINGLE_FILE_SEGMENTS, j

[dpdk-dev] [PATCH v5 8/8] doc: update doc for virtio-user

2016-05-30 Thread Jianfeng Tan
Signed-off-by: Huawei Xie Signed-off-by: Jianfeng Tan --- doc/guides/rel_notes/release_16_07.rst | 4 1 file changed, 4 insertions(+) diff --git a/doc/guides/rel_notes/release_16_07.rst b/doc/guides/rel_notes/release_16_07.rst index f6d543c..b1054b6 100644 --- a/doc/guides/rel_notes

[dpdk-dev] [PATCH v5 7/8] virtio-user: add a new vdev named virtio-user

2016-05-30 Thread Jianfeng Tan
there are more than VHOST_MEMORY_MAX_NREGIONS(8) hugepages. - Root privilege is a must (mainly becase of sorting hugepages according to physical address). - Applications should not use file name like HUGEFILE_FMT ("%smap_%d"). Signed-off-by: Huawei Xie Signed-off-by: Jianfeng

[dpdk-dev] [PATCH v5 6/8] virtio-user: add new virtual pci driver for virtio

2016-05-30 Thread Jianfeng Tan
vhost adapter | | | -- | -- | | | -- | vhost backend | -- Signed-off-by: Huawei Xie Signed-off-by: Jianfeng Tan Acked-by: Neil Horman --- drivers/net/virtio/Ma

[dpdk-dev] [PATCH v5 5/8] virtio-user: add device emulation layer APIs

2016-05-30 Thread Jianfeng Tan
_dev.c, virtio_user_dev.h) | || | | | vhost adapter | | | -- | -- | | | -- | vhost backend | -- Signed-off-by: Huawei Xie Signed-off-by: Jianfeng Tan Acked-by

[dpdk-dev] [PATCH v5 4/8] virtio-user: add vhost adapter layer

2016-05-30 Thread Jianfeng Tan
t backend | -- Signed-off-by: Huawei Xie Signed-off-by: Jianfeng Tan Acked-by: Neil Horman --- config/common_linuxapp| 3 + drivers/net/virtio/Makefile | 6 + drivers/net/virtio/virtio_user/vhost.c| 105 +++ drivers/net/virtio/vi

[dpdk-dev] [PATCH v5 3/8] virtio: enable use virtual address to fill desc

2016-05-30 Thread Jianfeng Tan
here. It basically means: a. when set_base_addr, VA address is used; b. when preparing RX's descriptors, VA address is used; c. when transmitting packets, VA is filled in TX's descriptors; d. in TX and CQ's header, VA is used. Signed-off-by: Huawei Xie Signed-off-by: Jianfeng Tan Acked

[dpdk-dev] [PATCH v5 2/8] virtio: clean up virtio_dev_queue_setup

2016-05-30 Thread Jianfeng Tan
Abstract vring hdr desc init as an inline method. Signed-off-by: Huawei Xie Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virtio_ethdev.c | 42 ++ 1 file changed, 24 insertions(+), 18 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b

[dpdk-dev] [PATCH v5 1/8] virtio: hide phys addr check inside pci ops

2016-05-30 Thread Jianfeng Tan
This patch is to move phys addr check from virtio_dev_queue_setup to pci ops. To makt that happen, make sure virtio_ops.setup_queue return the result if we pass through the check. Signed-off-by: Jianfeng Tan Signed-off-by: Huawei Xie Acked-by: Yuanhan Liu --- drivers/net/virtio

[dpdk-dev] [PATCH v5 0/8] virtio support for container

2016-05-30 Thread Jianfeng Tan
f. Used with vhost-net $: modprobe vhost $: modprobe vhost-net $: docker run -i -t --privileged \ -v /dev/vhost-net:/dev/vhost-net \ -v /dev/net/tun:/dev/net/tun \ -v /dev/hugepages:/dev/hugepages \ dpdk-app-l2fwd l2fwd -c 0x4 -n 4 -m 1024 --no-pci \ --vde

[dpdk-dev] [PATCH v4] eal: make hugetlb initialization more robust

2016-05-12 Thread Jianfeng Tan
-subgroup b. cgset -r hugetlb.1GB.limit_in_bytes=2147483648 test-subgroup c. cgexec -g hugetlb:test-subgroup \ ./examples/helloworld/build/helloworld -c 0x2 -n 4 --huge-trybest Signed-off-by: Jianfeng Tan Acked-by: Neil Horman --- v4: - Change map_all_hugepages to return unsigned

[dpdk-dev] [PATCH v3] eal: make hugetlb initialization more robust

2016-05-09 Thread Jianfeng Tan
-subgroup b. cgset -r hugetlb.1GB.limit_in_bytes=2147483648 test-subgroup c. cgexec -g hugetlb:test-subgroup \ ./examples/helloworld/build/helloworld -c 0x2 -n 4 --huge-trybest Signed-off-by: Jianfeng Tan Acked-by: Neil Horman --- v3: - Reword commit message to include it fixes

[dpdk-dev] [PATCH 3/3] virtio-user: add mq in virtual pci driver

2016-05-05 Thread Jianfeng Tan
queues. Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virtio_user/virtio_user_pci.c | 89 +++- 1 file changed, 87 insertions(+), 2 deletions(-) diff --git a/drivers/net/virtio/virtio_user/virtio_user_pci.c b/drivers/net/virtio/virtio_user/virtio_user_pci.c index 873e619

[dpdk-dev] [PATCH 2/3] virtio-user: add mq in device emulation

2016-05-05 Thread Jianfeng Tan
virtio_user_enable_queue_pair() for virtio-user driver to enable/disable queues. Note: Do not support multiple queue for vhost kernel backend. Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virtio_user/virtio_user_dev.c | 65 drivers/net/virtio/virtio_user/virtio_user_dev.h | 2

[dpdk-dev] [PATCH 1/3] virtio-user: add mq in vhost user adapter

2016-05-05 Thread Jianfeng Tan
This patch mainly adds method in vhost user adapter to communicate enable/disable queues messages with vhost user backend. Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virtio_user/vhost.h | 4 drivers/net/virtio/virtio_user/vhost_user.c | 21 + 2 files

[dpdk-dev] [PATCH 0/3] add multi queue support for virtio-user

2016-05-05 Thread Jianfeng Tan
=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 (3): virtio-user: add mq in vhost user adapter virtio-u

[dpdk-dev] [PATCH v4 8/8] doc: update doc for virtio-user

2016-04-29 Thread Jianfeng Tan
Signed-off-by: Huawei Xie Signed-off-by: Jianfeng Tan Acked-By: Neil Horman --- doc/guides/nics/overview.rst | 64 +- doc/guides/rel_notes/release_16_07.rst | 4 +++ 2 files changed, 36 insertions(+), 32 deletions(-) diff --git a/doc/guides/nics

[dpdk-dev] [PATCH v4 7/8] virtio-user: add a new virtual device named virtio-user

2016-04-29 Thread Jianfeng Tan
there are more than VHOST_MEMORY_MAX_NREGIONS(8) hugepages. - Root privilege is a must (mainly becase of sorting hugepages according to physical address). - Applications should not use file name like HUGEFILE_FMT ("%smap_%d"). Signed-off-by: Huawei Xie Signed-off-by: Jianfeng Tan Acke

[dpdk-dev] [PATCH v4 6/8] virtio-user: add new virtual pci driver for virtio

2016-04-29 Thread Jianfeng Tan
vhost adapter | | | -- | -- | | | -- | vhost backend | -- Signed-off-by: Huawei Xie Signed-off-by: Jianfeng Tan Acked-By: Neil Horman --- drivers/net/virtio/Ma

[dpdk-dev] [PATCH v4 5/8] virtio-user: add device emulation layer APIs

2016-04-29 Thread Jianfeng Tan
_dev.c, virtio_user_dev.h) | || | | | vhost adapter | | | -- | -- | | | -- | vhost backend | -- Signed-off-by: Huawei Xie Signed-off-by: Jianfeng Tan Acked-By

[dpdk-dev] [PATCH v4 4/8] virtio-user: add vhost adapter layer

2016-04-29 Thread Jianfeng Tan
t backend | -- Signed-off-by: Huawei Xie Signed-off-by: Jianfeng Tan Acked-By: Neil Horman --- config/common_linuxapp| 3 + drivers/net/virtio/Makefile | 6 + drivers/net/virtio/virtio_pci.h | 1 + drivers/net/virtio/virtio_use

[dpdk-dev] [PATCH v4 3/8] virtio: enable use virtual address to fill desc

2016-04-29 Thread Jianfeng Tan
preparing RX's descriptors, VA address is used; c. when transmitting packets, VA is filled in TX's descriptors; d. in TX and CQ's header, VA is used. Signed-off-by: Huawei Xie Signed-off-by: Jianfeng Tan Acked-By: Neil Horman --- drivers/net/virtio/virtio_ethdev.c | 11 --- drivers

[dpdk-dev] [PATCH v4 2/8] virtio: abstract vring hdr desc init as a method

2016-04-29 Thread Jianfeng Tan
To make it reusable, here we abstract the initialization of vring header into a method. Signed-off-by: Huawei Xie Signed-off-by: Jianfeng Tan Acked-By: Neil Horman --- drivers/net/virtio/virtio_ethdev.c | 22 -- drivers/net/virtio/virtqueue.h | 20

[dpdk-dev] [PATCH v4 1/8] virtio: hide phys addr check inside pci ops

2016-04-29 Thread Jianfeng Tan
This patch is to move phys addr check from virtio_dev_queue_setup to pci ops. To makt that happen, make sure virtio_ops.setup_queue return the result if we pass through the check. Signed-off-by: Huawei Xie Signed-off-by: Jianfeng Tan Acked-By: Neil Horman --- drivers/net/virtio

[dpdk-dev] [PATCH v4 0/8] virtio support for container

2016-04-29 Thread Jianfeng Tan
st-net:/dev/vhost-net \ -v /dev/net/tun:/dev/net/tun \ -v /dev/hugepages:/dev/hugepages \ dpdk-app-l2fwd l2fwd -c 0x4 -n 4 -m 1024 --no-pci \ --vdev=virtio-user0,path=/dev/vhost-net -- -p 0x1 By the way, it's not necessary to run in a container. Signed-off-by: Huawei Xie

[dpdk-dev] [PATCH v3 2/2] virtio: fix memory leak of virtqueue memzones

2016-04-29 Thread Jianfeng Tan
net_hdr_mz, are freed when queue is released or setup fails. Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virtio_ethdev.c | 21 ++--- drivers/net/virtio/virtqueue.h | 2 ++ 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/d

[dpdk-dev] [PATCH v3 1/2] virtio: cleanup virtio_dev_queue_setup()

2016-04-29 Thread Jianfeng Tan
Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virtio_ethdev.c | 47 +++--- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 1fe90ae..b3f4158 100644 --- a/drivers/net

[dpdk-dev] [PATCH v3 0/2] virtio: fix memory leak of virtqueue memzones

2016-04-29 Thread Jianfeng Tan
Patch 1: Do some cleanup in virtio_dev_queue_setup(); Patch 2: Fix the memory leak bug. Jianfeng Tan (2): v3: Fix a typo in the queue_type check. v2: split cleanup and fix into two patches. virtio: cleanup virtio_dev_queue_setup() virtio: fix memory leak of virtqueue memzones drivers

[dpdk-dev] [PATCH v2 1/2] virtio: cleanup virtio_dev_queue_setup()

2016-04-28 Thread Jianfeng Tan
Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virtio_ethdev.c | 47 +++--- 1 file changed, 24 insertions(+), 23 deletions(-) diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c index 1fe90ae..0553b67 100644 --- a/drivers/net

[dpdk-dev] [PATCH v2 0/2] virtio: fix memory leak of virtqueue memzones

2016-04-28 Thread Jianfeng Tan
Commit 1: Do some cleanup in virtio_dev_queue_setup(); Commit 2: Fix the memory leak bug. Signed-off-by: Jianfeng Tan Jianfeng Tan (2): virtio: cleanup virtio_dev_queue_setup() virtio: fix memory leak of virtqueue memzones drivers/net/virtio/virtio_ethdev.c | 66

[dpdk-dev] [PATCH v2] virtio: fix modify drv_flags for specific device

2016-04-28 Thread Jianfeng Tan
is currently shared by each virtio device. How to fix: dev_flags is a device-specific variable to store this info. Fixes: da978dfdc43 ("virtio: use port IO to get PCI resource") Reported-by: David Marchand Suggested-by: David Marchand Signed-off-by: Jianfeng Tan --- v2: RTE_PCI_DR

[dpdk-dev] [PATCH] virtio: fix memory leak of virtqueue memzones

2016-04-26 Thread Jianfeng Tan
fails. Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virtio_ethdev.c | 69 -- drivers/net/virtio/virtio_ethdev.h | 2 +- drivers/net/virtio/virtio_rxtx.c | 4 +-- 3 files changed, 40 insertions(+), 35 deletions(-) diff --git a/drivers/net/virtio

[dpdk-dev] [PATCH] virtio: fix modify drv_flags for specific device

2016-04-26 Thread Jianfeng Tan
is currently shared by each virtio device. How to fix: dev_flags is a device-specific variable to store this info. Fixes: da978dfdc43 ("virtio: use port IO to get PCI resource") Reported-by: David Marchand Suggested-by: David Marchand Signed-off-by: Jianfeng Tan --- drivers/net/virtio/virti

  1   2   3   >