[dpdk-dev] [PATCH v3] lib/librte_vhost: update used->idx when allocation of mbuf fails

2015-03-21 Thread Linhaifeng
cc changchun.ouyang at intel.com cc huawei.xie at intel.com On 2015/3/21 9:47, linhaifeng wrote: > From: Linhaifeng > > When failed to malloc buffer from mempool we just update last_used_idx but > not used->idx so after many times vhost thought have handle all packets > but virtio_net thought

[dpdk-dev] [PATCH] cast used->idx to volatile

2015-03-21 Thread linhaifeng
From: Linhaifeng Same as rte_vhost_enqueue_burst we should cast used->idx to volatile before notify guest. Signed-off-by: Linhaifeng --- lib/librte_vhost/vhost_rxtx.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/librte_vhost/vhost_rxtx.c

[dpdk-dev] [RFC PATCH 0/7] add OSv support

2015-03-21 Thread Takuya ASADA
On Fri, Mar 13, 2015 at 7:00 PM, Bruce Richardson < bruce.richardson at intel.com> wrote: > On Fri, Mar 13, 2015 at 06:05:41AM +0900, Takuya ASADA wrote: > > Hi DPDK developers, > > > > I'd like to contribute a new EAL to support our open-sourced operating > system called "OSv". > > It is a new

[dpdk-dev] [RFC PATCH 5/7] add OSv support

2015-03-21 Thread Takuya ASADA
I forgot to copied rte_eal_version.map, added on new patchset. OSv supports shared libraries, but I found that DPDK shared libraries causes an error on OSv: https://github.com/cloudius-systems/osv/issues/599 I'll fix it shortly. On Tue, Mar 17, 2015 at 7:42 AM, Neil Horman wrote: > On Mon,

[dpdk-dev] [RFC PATCHv2 8/8] doc: Add Getting Started Guide for OSv

2015-03-21 Thread Takuya ASADA
Described how to build DPDK for OSv, using "Capstan". Signed-off-by: Takuya ASADA --- doc/guides/index.rst | 1 + doc/guides/osv_gsg/build_dpdk.rst | 276 ++ doc/guides/osv_gsg/build_sample_apps.rst | 123

[dpdk-dev] [RFC PATCHv2 7/8] app/test: support OSv

2015-03-21 Thread Takuya ASADA
Add support OSv EAL. Signed-off-by: Takuya ASADA --- app/test/test_eal_flags.c | 34 +- app/test/test_timer_perf.c | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/app/test/test_eal_flags.c b/app/test/test_eal_flags.c index

[dpdk-dev] [RFC PATCHv2 6/8] virtio: enable MSI-X on OSv

2015-03-21 Thread Takuya ASADA
Add support OSv EAL. Signed-off-by: Takuya ASADA --- lib/librte_pmd_virtio/virtio_ethdev.c | 15 ++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/lib/librte_pmd_virtio/virtio_ethdev.c b/lib/librte_pmd_virtio/virtio_ethdev.c index 603be2d..fed65f3 100644 ---

[dpdk-dev] [RFC PATCHv2 5/8] add OSv support

2015-03-21 Thread Takuya ASADA
Adding OSv support. Based on Linux/FreeBSD EAL, but calling OSv kernel APIs to access devices, allocate contiguous memory, etc. Signed-off-by: Takuya ASADA --- config/{common_linuxapp => common_osvapp} | 24 +- ...xapp-gcc => defconfig_x86_64-native-osvapp-gcc} | 2 +-

[dpdk-dev] [RFC PATCHv2 4/8] eal: Add extern C on eal_private.h

2015-03-21 Thread Takuya ASADA
This is required to link with OSv EAL. Signed-off-by: Takuya ASADA --- lib/librte_eal/common/eal_private.h | 8 1 file changed, 8 insertions(+) diff --git a/lib/librte_eal/common/eal_private.h b/lib/librte_eal/common/eal_private.h index 4acf5a0..80b3d44 100644 ---

[dpdk-dev] [RFC PATCHv2 3/8] eal: Add extern C on eal_thread.h

2015-03-21 Thread Takuya ASADA
This is required to link with OSv EAL. Signed-off-by: Takuya ASADA --- lib/librte_eal/common/eal_thread.h | 8 1 file changed, 8 insertions(+) diff --git a/lib/librte_eal/common/eal_thread.h b/lib/librte_eal/common/eal_thread.h index e4e76b9..794137f 100644 ---

[dpdk-dev] [RFC PATCHv2 2/8] eal: Add extern C on eal_hugepages.h

2015-03-21 Thread Takuya ASADA
This is required to link with OSv EAL. Signed-off-by: Takuya ASADA --- lib/librte_eal/common/eal_hugepages.h | 8 1 file changed, 8 insertions(+) diff --git a/lib/librte_eal/common/eal_hugepages.h b/lib/librte_eal/common/eal_hugepages.h index 38edac0..b722aee 100644 ---

[dpdk-dev] [RFC PATCHv2 1/8] mk: support compiling C++ code

2015-03-21 Thread Takuya ASADA
Since OSv is written in C++, we need to write OSv EAL in C++. To do so, we need to compile .cc files by $(CXX). This patch does not contain diff for clang and icc, but OSv EAL does not supported these toolchain, this is enough for now. Signed-off-by: Takuya ASADA ---

[dpdk-dev] [RFC PATCHv2 0/8] add OSv support

2015-03-21 Thread Takuya ASADA
This is 2nd version of OSv support patchset. Changelist: - Added "Capstan" build script for OSv - Added Getting Started Guide for OSv - Added rte_delay_us() on osvapp - Added rte_eal_version.map Takuya ASADA (8): mk: support compiling C++ code eal: Add extern C on eal_hugepages.h eal:

[dpdk-dev] [PATCH] lib/librte_vhost:fix can't send packet anymore after mempool is full again

2015-03-21 Thread Linhaifeng
Hi, changchun & xie I have modify the path with your suggestions.Please review. Thank you. On 2015/3/20 15:28, Ouyang, Changchun wrote: > > >> -Original Message- >> From: Linhaifeng [mailto:haifeng.lin at huawei.com] >> Sent: Friday, March 20, 2015 2:36 PM >> To: dev at dpdk.org >>

[dpdk-dev] [PATCH] lib/librte_pmd_virtio fix can't receive packets after rx_q is empty

2015-03-21 Thread Linhaifeng
On 2015/3/21 0:54, Xie, Huawei wrote: > On 3/20/2015 6:47 PM, linhaifeng wrote: >> From: Linhaifeng >> >> If failed to alloc mbuf ring_size times the rx_q may be empty and can't >> receive any packets forever because nb_used is 0 forever. > Agreed. In current implementation, once VQ becomes

[dpdk-dev] [PATCH v3] lib/librte_vhost: update used->idx when allocation of mbuf fails

2015-03-21 Thread linhaifeng
From: Linhaifeng When failed to malloc buffer from mempool we just update last_used_idx but not used->idx so after many times vhost thought have handle all packets but virtio_net thought vhost have not handle all packets and will not update avail->idx. Signed-off-by:

[dpdk-dev] [PATCH] lib/librte_pmd_virtio fix can't receive packets after rx_q is empty

2015-03-21 Thread Linhaifeng
On 2015/3/21 0:54, Xie, Huawei wrote: > On 3/20/2015 6:47 PM, linhaifeng wrote: >> From: Linhaifeng >> >> If failed to alloc mbuf ring_size times the rx_q may be empty and can't >> receive any packets forever because nb_used is 0 forever. > Agreed. In current implementation, once VQ becomes

[dpdk-dev] [PATCH] hash: fix breaking strict-aliasing rules

2015-03-21 Thread Жумабеков Ерден Мирзагулович
Hi Pawel, Oops, thanks for the clue. I have a buffer over-read here leading to undefined behaviour. The only solution I see here is to declare uint32_t pointer and evaluate it to (uint8_t *) data + data_len - (data_len & 0x07). Ideas are welcome. That would resolve strict-aliasing violation.

[dpdk-dev] [PATCH] app/testpmd: Fix not set need_reconfig flag when port id is RTE_PORT_ALL

2015-03-21 Thread Thomas Monjalon
> > When port id is RTE_PORT_ALL, port_id_is_invalid will also return zero. > > So this function will only set ports[255] need_reconfig flag, other ports > > will be > > skipped. > > > > Signed-off-by: Marvin liu > > Acked-by: Changchun Ouyang Fixes: edab33b1c01d ("app/testpmd: support port

[dpdk-dev] [PATCH] lib/librte_vhost: fix build errors

2015-03-21 Thread Thomas Monjalon
> > fix the error "missing initializer" and "cast to pointer from integer of > > different size". > > > > For the pointer to integer cast issue, need to investigate changing the > > typeof mapped_address. > > > > Signed-off-by: Huawei Xie > > > Acted-by: Changchun Ouyang ^ I recommend