[dpdk-dev] [PATCH v3 4/4] bonding: remove memcpy from burst functions

2016-06-12 Thread Bernard Iremonger
Now that the queue spinlocks have been added to the rx and tx burst functions the memcpy of the slave data is no longer necessary, so it has been removed. Signed-off-by: Bernard Iremonger Acked-by: Konstantin Ananyev --- drivers/net/bonding/rte_eth_bond_pmd.c | 71

[dpdk-dev] [PATCH v3 3/4] bonding: take queue spinlock in rx/tx burst functions

2016-06-12 Thread Bernard Iremonger
Use rte_spinlock_trylock() in the rx/tx burst functions to take the queue spinlock. Signed-off-by: Bernard Iremonger Acked-by: Konstantin Ananyev --- drivers/net/bonding/rte_eth_bond_pmd.c | 116 - 1 file changed, 84 insertions(+), 32 deletions(-) diff --git

[dpdk-dev] [PATCH v3 2/4] bonding: grab queue spinlocks in slave add and remove

2016-06-12 Thread Bernard Iremonger
When adding or removing a slave device from the bonding device the rx and tx queue spinlocks should be held. Signed-off-by: Bernard Iremonger Acked-by: Konstantin Ananyev --- drivers/net/bonding/rte_eth_bond_api.c | 52 -- 1 file changed, 49 insertions(+), 3

[dpdk-dev] [PATCH v3 1/4] bonding: add spinlock to rx and tx queues

2016-06-12 Thread Bernard Iremonger
At present it is possible to add and remove slave devices from the bonding device while traffic is running. This can result in segmentation faults occurring in the rx and tx burst functions. To resolve this issue spinlocks have been added to the rx and tx queues. Now when a slave is added or

[dpdk-dev] [PATCH v3 0/4] bonding: locks

2016-06-12 Thread Bernard Iremonger
Add spinlock to bonding rx and tx queues. Take spinlock in rx and tx burst functions. Take all spinlocks in slave add and remove functions. With spinlocks in place remove memcpy of slaves. Changes in v3: Rebase to latest master. Drop patches 4 and 5 from v2 patchset. Update commit messages on

[dpdk-dev] [PATCH v3 1/2] ethdev: add callback to get register size in bytes

2016-06-12 Thread Zyta Szpak
Hi, please see inline 2016-06-08 10:53 GMT+02:00 Thomas Monjalon : > Hi Zyta, > > 2016-06-01 09:56, zr at semihalf.com: > > rte_eth_dev_get_reg_length and rte_eth_dev_get_reg callbacks > > do not provide register size to the app in any way. It is > > needed to allocate proper number of bytes

[dpdk-dev] [PATCH v3 8/9] app/testpmd: check for valid mbuf pool

2016-06-12 Thread Bernard Iremonger
Fixes: b6ea6408fbc7 ("ethdev: store numa_node per device") Signed-off-by: Bernard Iremonger --- app/test-pmd/testpmd.c | 20 +--- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 991457d..1e13c36 100644 ---

[dpdk-dev] [PATCH v3 7/9] app/testpmd: check for valid socket id when attaching port

2016-06-12 Thread Bernard Iremonger
Fixes: edab33b1c01d ("app/testpmd: support port hotplug") Signed-off-by: Bernard Iremonger --- app/test-pmd/testpmd.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index c7ab8a0..991457d 100644 ---

[dpdk-dev] [PATCH v3 6/9] app/testpmd: move call to init_fwd_streams

2016-06-12 Thread Bernard Iremonger
Move call to init_fwd_streams from start_port function to start_packet_forwarding function. Signed-off-by: Bernard Iremonger --- app/test-pmd/testpmd.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index

[dpdk-dev] [PATCH v3 5/9] app/testpmd: add function port_is_bonding_slave

2016-06-12 Thread Bernard Iremonger
Use this function in stop_port and close_port functions. Signed-off-by: Bernard Iremonger --- app/test-pmd/testpmd.c | 18 ++ app/test-pmd/testpmd.h | 2 ++ 2 files changed, 20 insertions(+) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index f22d1b6..6f68a18

[dpdk-dev] [PATCH v3 4/9] app/testpmd: remove fwd_config_setup from fwd_config_display

2016-06-12 Thread Bernard Iremonger
Remove fwd_config_setup from fwd_config_display and check that forwarding has been setup before displaying forwarding configuration. Add call to fwd_config_setup for corelist, coremask, nbcore setup. Add call to fwd_config_setup for portlist, portmask, nbport setup. Signed-off-by: Bernard

[dpdk-dev] [PATCH v3 3/9] app/testpmd: check port is not forwarding in stop_port and close_port

2016-06-12 Thread Bernard Iremonger
Add calls to port_is_forwarding function. Signed-off-by: Bernard Iremonger --- app/test-pmd/testpmd.c | 24 ++-- 1 file changed, 10 insertions(+), 14 deletions(-) diff --git a/app/test-pmd/testpmd.c b/app/test-pmd/testpmd.c index 7a1e470..f22d1b6 100644 ---

[dpdk-dev] [PATCH v3 2/9] app/testpmd: don't update fwding config when attaching/detaching a port

2016-06-12 Thread Bernard Iremonger
Remove checks on test_done variable. Remove code to update forwarding configuration. Fixes: edab33b1c01d ("app/testpmd: support port hotplug") Signed-off-by: Bernard Iremonger --- app/test-pmd/testpmd.c | 28 +--- 1 file changed, 1 insertion(+), 27 deletions(-) diff

[dpdk-dev] [PATCH v3 1/9] app/testpmd: add function port_is_forwarding

2016-06-12 Thread Bernard Iremonger
Add function port_is_forwarding to check whether a port is forwarding or not. Signed-off-by: Bernard Iremonger --- app/test-pmd/config.c | 18 +- app/test-pmd/testpmd.h | 3 ++- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/app/test-pmd/config.c

[dpdk-dev] [PATCH v3 0/9] app/testpmd: forwarding

2016-06-12 Thread Bernard Iremonger
Modify testpmd to allow stop, close, detach and attach of a port without stopping forwarding. Changes in v3: rebase to latest master. added patch 9 app/testpmd: stop forwarding on exit reworked and renamed patch 4 app/testpmd: remove fwd_config_setup from fwd_config_display Changes in v2:

[dpdk-dev] Can't build DPDK-16.04 on CentOS 6.8

2016-06-12 Thread Rosen, Rami
Hi Thiago, > Any clue? Sure. This is the reason: in dpdk-16.04/lib/librte_eal/linuxapp/igb_uio we have: #ifndef PCI_MSIX_ENTRY_SIZE #define PCI_MSIX_ENTRY_SIZE 16 #define PCI_MSIX_ENTRY_LOWER_ADDR 0 #define PCI_MSIX_ENTRY_UPPER_ADDR 4 #define PCI_MSIX_ENTRY_DATA

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

2016-06-12 Thread Jianfeng Tan
Compile DPDK with clang, below line in virtio_rxtx.c could be optimized with four "VMOVAPS ymm, m256". memset(>fake_mbuf, 0, sizeof(rxvq->fake_mbuf)); This instruction requires memory address is 32-byte aligned. Or, it leads to segfault. Although only tested with Clang 3.6.0, it can be

[dpdk-dev] [PATCH v2] ip_pipeline: fix false cacheline sharing among threads

2016-06-12 Thread Jasvinder Singh
In ip_pipeline app, the structure app_thread_data needs to be aligned to the cache line boundary as threads on different cpu cores are accessing fields of the app->thread_data and having this structure not aligned on cacheline boundary leads to false cacheline sharing. Fixes: 7f64b9c004aa

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

2016-06-12 Thread Jianfeng Tan
This patches fixes problem of reusing index of outmost loop in nested loops. This bug will lead to failure when starting a multi queue virtio device: rx queues (except from the first one) cannot be started, expecially their vq_ring cannot be initialized, so that when invoking rx func on these

[dpdk-dev] [PATCH 2/8] lib/librte_ether: defind RX/TX lock mode

2016-06-12 Thread Lu, Wenzhuo
Hi Stephen, > -Original Message- > From: Stephen Hemminger [mailto:stephen at networkplumber.org] > Sent: Saturday, June 11, 2016 2:12 AM > To: Lu, Wenzhuo > Cc: dev at dpdk.org; Tao, Zhe > Subject: Re: [dpdk-dev] [PATCH 2/8] lib/librte_ether: defind RX/TX lock mode > > On Wed, 8 Jun

[dpdk-dev] [PATCH 2/8] lib/librte_ether: defind RX/TX lock mode

2016-06-12 Thread Lu, Wenzhuo
Hi Olivier, > -Original Message- > From: Olivier Matz [mailto:olivier.matz at 6wind.com] > Sent: Thursday, June 9, 2016 3:51 PM > To: Lu, Wenzhuo; Stephen Hemminger > Cc: dev at dpdk.org; Tao, Zhe > Subject: Re: [dpdk-dev] [PATCH 2/8] lib/librte_ether: defind RX/TX lock mode > > Hi, > >

[dpdk-dev] [PATCH v4 2/8] lib/librte_ether: defind RX/TX lock mode

2016-06-12 Thread Lu, Wenzhuo
Hi Konstantin, > -Original Message- > From: Ananyev, Konstantin > Sent: Wednesday, June 8, 2016 5:20 PM > To: Lu, Wenzhuo; Tao, Zhe; dev at dpdk.org > Cc: Richardson, Bruce; Chen, Jing D; Liang, Cunming; Wu, Jingjing; Zhang, > Helin > Subject: RE: [PATCH v4 2/8] lib/librte_ether: defind

[dpdk-dev] [PATCH v4 4/8] ixgbe: implement device reset on VF

2016-06-12 Thread Lu, Wenzhuo
Hi Konstantin, > -Original Message- > From: Ananyev, Konstantin > Sent: Wednesday, June 8, 2016 4:42 PM > To: Lu, Wenzhuo; Tao, Zhe; dev at dpdk.org > Cc: Richardson, Bruce; Chen, Jing D; Liang, Cunming; Wu, Jingjing; Zhang, > Helin > Subject: RE: [PATCH v4 4/8] ixgbe: implement device

[dpdk-dev] [PATCH] examples: add a new example for link reset

2016-06-12 Thread Lu, Wenzhuo
Hi Konstantin, Thomas, > -Original Message- > From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com] > Sent: Wednesday, June 8, 2016 5:00 PM > To: Ananyev, Konstantin; Lu, Wenzhuo > Cc: dev at dpdk.org > Subject: Re: [dpdk-dev] [PATCH] examples: add a new example for link reset > >

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

2016-06-12 Thread Jianfeng Tan
Add a new virtual device named vhost-user, which can be used just like eth_ring, eth_null, etc. To reuse the code of original virtio, we do some adjustment in virtio_ethdev.c, such as remove key _static_ of eth_virtio_dev_init() so that it can be reused in virtual device; and we add some check to

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

2016-06-12 Thread Jianfeng Tan
This patch implements another new instance of struct virtio_pci_ops to drive the virtio-user virtual device. Instead of rd/wr ioport or PCI configuration space, this virtual pci driver will rd/wr the virtual device struct virtio_user_hw, and when necessary, invokes APIs provided by device

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

2016-06-12 Thread Jianfeng Tan
Two device emulation layer APIs are added for virtio driver to call: - virtio_user_start_device() - virtio_user_stop_device() - virtio_user_dev_init() - virtio_user_dev_uninit() These APIs will get called by virtio driver, and they call vhost adapter layer APIs to implement the

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

2016-06-12 Thread Jianfeng Tan
This patch is to provide vhost adapter layer implementations. Instead of relying on a hypervisor to translate between device emulation and vhost backend, here we directly talk with vhost backend through the vhost file. Depending on the type of vhost file, - vhost-user is used if the given path

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

2016-06-12 Thread Jianfeng Tan
This patch is related to how to calculate relative address for vhost backend. The principle is that: based on one or multiple shared memory regions, vhost maintains a reference system with the frontend start address, backend start address, and length for each segment, so that each frontend

[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 ---

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

2016-06-12 Thread Jianfeng Tan
v7: - CONFIG_RTE_VIRTIO_VDEV -> CONFIG_RTE_VIRTIO_USER; and corresondingly, RTE_VIRTIO_VDEV -> RTE_VIRTIO_USER. - uint64_t -> uintptr_t, so that it can be compiled on 32-bit platform. - Rebase on latest dpdk-next-virtio branch. - Abandon abstracting related code into vring_hdr_desc_init(),