[dpdk-dev] perfomance of rte_lpm rule subsystem

2016-05-02 Thread Александр Киселев
Stephen, what was the main reason you use red-black tree instead of dir-24-8? Did you switch to using trees because of too big memory working set of dir-24-8 algorithm? 2016-04-19 18:46 GMT+03:00 Stephen Hemminger : > On Tue, 19 Apr 2016 14:11:11 +0300 > ? ??? wrote: > > > Hi. > >

[dpdk-dev] [PATCH] mk: add rpath for applications

2016-05-02 Thread Thomas Monjalon
2016-04-29 17:34, Ferruh Yigit: > Add default library output folder to the library search folder. > > This is useful for development environment, in production environment > DPDK libraries already should be in know locations. Yes it is useful in dev environment, but can be risky or strange when

[dpdk-dev] [PATCH] app/testpmd: add packet data prefetch in macswap loop

2016-05-02 Thread De Lara Guarch, Pablo
Hi Jerin, > -Original Message- > From: Jerin Jacob [mailto:jerin.jacob at caviumnetworks.com] > Sent: Monday, May 02, 2016 1:00 PM > To: dev at dpdk.org > Cc: De Lara Guarch, Pablo; Jerin Jacob > Subject: [dpdk-dev] [PATCH] app/testpmd: add packet data prefetch in > macswap loop > >

[dpdk-dev] [PATCH] mk: do not enforce any specific ARM ABI

2016-05-02 Thread Thomas Monjalon
2016-04-16 00:33, Jan Viktorin: > The dpdk build system passes -mfloat-abi=softfp, which makes the build fail > when the selected ABI is EABIhf. The dpdk build system should not make > assumptions on the selected ARM ABI. > > Signed-off-by: Jan Viktorin > Reported-by: Thomas Petazzoni Applied,

[dpdk-dev] [PATCH 3/3] vhost: arrange virtio_net fields for better cache sharing

2016-05-02 Thread Yuanhan Liu
the ifname[] field takes so much space, that it seperate some frequently used fields into different caches, say, features and broadcast_rarp. This patch move all those fields that will be accessed frequently in Rx/Tx together (before the ifname[] field) to let them share one cache line.

[dpdk-dev] [PATCH 2/3] vhost: optimize dequeue for small packets

2016-05-02 Thread Yuanhan Liu
Both current kernel virtio driver and DPDK virtio driver use at least 2 desc buffer for Tx: the first for storing the header, and the others for storing the data. Therefore, we could fetch the first data desc buf before the main loop, and do the copy first before the check of "are we done yet?".

[dpdk-dev] [PATCH 1/3] vhost: pre update used ring for Tx and Rx

2016-05-02 Thread Yuanhan Liu
Pre update and update used ring in batch for Tx and Rx at the stage while fetching all avail desc idx. This would reduce some cache misses and hence, increase the performance a bit. Pre update would be feasible as guest driver will not start processing those entries as far as we don't update

[dpdk-dev] ovs crash when running traffic from VM to VM over DPDK and vhostuser

2016-05-02 Thread Yi Ba
Running with dpdk 16.04 and latest ovs from git, and removing "mrg_rxbuf=off" from virtio params, the crash is no longer observed. However, we are wittnessing ovs gets stuck, and will post to ovs mailing list:2016-05-02T17:26:18.804Z|00111|ovs_rcu|WARN|blocked 1000 ms waiting for pmd145 to

[dpdk-dev] [PATCH] app/testpmd: add packet data prefetch in macswap loop

2016-05-02 Thread Jerin Jacob
prefetch the next packet data address in advance in macswap loop for performance improvement. Signed-off-by: Jerin Jacob --- app/test-pmd/macswap.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/test-pmd/macswap.c b/app/test-pmd/macswap.c index 154889d..c10f4b5 100644 ---

[dpdk-dev] [PATCH] cmdline: fix unchecked return value

2016-05-02 Thread Olivier Matz
Hi Daniel, On 04/14/2016 03:01 PM, Daniel Mrzyglod wrote: > This patch is for checking if error values occurs. > fix for coverity errors #13209 & #13195 > > If the function returns an error value, the error value may be mistaken > for a normal value. > > In rdline_char_in: Value returned from a

[dpdk-dev] [PATCH 0/4] cleanup debug and dead code

2016-05-02 Thread Thomas Monjalon
2016-04-22 15:43, Thomas Monjalon: > With this series, the default log level is not debug anymore. > And more code depends on debug level instead of having some > almost dead code. > > Thomas Monjalon (4): > eal: increase log level of some messages > log: increase default level to info >

[dpdk-dev] [PATCH v3 1/1] cmdline: add any multi string mode to token string

2016-05-02 Thread Thomas Monjalon
2016-04-29 16:29, Piotr Azarewicz: > While parsing token string there may be several modes: > - fixed single string > - multi-choice single string > - any single string > > This patch add one more mode - any multi string. > > Signed-off-by: Piotr Azarewicz > Acked-by: Olivier Matz Applied,

[dpdk-dev] Flow Director Example?

2016-05-02 Thread Alex Forster
Hi Helin, thanks for the reply. Some code might help me explain myself better- port->configuration = rte_eth_conf { .fdir_conf = { .mode = RTE_FDIR_MODE_SIGNATURE, .pballoc = RTE_FDIR_PBALLOC_64K, .mask = rte_eth_fdir_masks {

[dpdk-dev] [PATCH 16/16] vhost: make buf vector for scatter Rx local

2016-05-02 Thread Yuanhan Liu
From: Ilya Maximets Array of buf_vector's is just an array for temporary storing information about available descriptors. It used only locally in virtio_dev_merge_rx() and there is no reason for that array to be shared. Fix that by allocating local buf_vec inside

[dpdk-dev] [PATCH 15/16] vhost: per device vhost_hlen

2016-05-02 Thread Yuanhan Liu
Virtio net header length is set per device, but not per queue. So, there is no reason to store it in vhost_virtqueue struct, instead, we should store it in virtio_net struct, to make one copy only. Signed-off-by: Yuanhan Liu --- lib/librte_vhost/vhost-net.h | 2 +-

[dpdk-dev] [PATCH 14/16] vhost: reserve few more space for future extension

2016-05-02 Thread Yuanhan Liu
"virtio_net_device_ops" is the only left open struct that an application can access, therefore, it's the only place that might introduce potential ABI break in future for extension. So, do some reservation for it. 5 should be pretty enough, considering that we have barely touched it for a long

[dpdk-dev] [PATCH 13/16] vhost: remove virtio-net.h

2016-05-02 Thread Yuanhan Liu
It barely has anything useful there, just 2 functions prototype. Here move them to vhost-net.h, and delete it. Signed-off-by: Yuanhan Liu --- lib/librte_vhost/vhost-net.h | 3 ++ lib/librte_vhost/vhost_cuse/virtio-net-cdev.c | 1 - lib/librte_vhost/vhost_rxtx.c

[dpdk-dev] [PATCH 11/16] vhost: hide internal structs/macros/functions

2016-05-02 Thread Yuanhan Liu
We are now safe to move all those internal structs/macros/functions to vhost-net.h, to hide them from external access. This patch also breaks long lines and removes some redundant comments. Signed-off-by: Yuanhan Liu --- lib/librte_vhost/rte_virtio_net.h | 128

[dpdk-dev] [PATCH 10/16] vhost: export vid as the only interface to applications

2016-05-02 Thread Yuanhan Liu
With all the previous prepare works, we are just one step away from the final ABI refactoring. That is, to change current API to let them stick to vid instead of the old virtio_net dev. Signed-off-by: Yuanhan Liu --- drivers/net/vhost/rte_eth_vhost.c | 61 ++-

[dpdk-dev] [PATCH 09/16] vhost: add few more functions

2016-05-02 Thread Yuanhan Liu
Add few more functions to export few more fields or informations of virtio_net struct, to applications, as we are gonna make them private. It includes: - rte_vhost_avail_entries It's actually a rename of "rte_vring_available_entries", with the "vring" to "vhost" name change to keep the

[dpdk-dev] [PATCH 08/16] vhost: query pmd internal by vid

2016-05-02 Thread Yuanhan Liu
Query internal by vid instead of "ifname", to avoid the dependency of virtio_net struct. Signed-off-by: Yuanhan Liu --- drivers/net/vhost/rte_eth_vhost.c | 19 +-- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/drivers/net/vhost/rte_eth_vhost.c

[dpdk-dev] [PATCH 04/16] example/vhost: make a copy of virtio device id

2016-05-02 Thread Yuanhan Liu
Make a copy of virtio device id (device_fh) from the virtio_net struct, so that we could have less dependency on the virtio_net struct. Signed-off-by: Yuanhan Liu --- examples/vhost/main.c | 59 --- examples/vhost/main.h | 1 + 2 files changed,

[dpdk-dev] [PATCH 03/16] vhost: declare device_fh as int

2016-05-02 Thread Yuanhan Liu
Firstly, "int" would be big enough: we don't need 64 bit to represent a virtio-net device id. Secondly, this could let us avoid the ugly "%" PRIu64 ".." stuff. And since ctx.fh is derived from device_fh, declare it as int, too. Signed-off-by: Yuanhan Liu --- examples/vhost/main.c

[dpdk-dev] [PATCH 02/16] vhost: set/reset dev flags internally

2016-05-02 Thread Yuanhan Liu
It does not make sense to ask the application to set/unset the flag VIRTIO_DEV_RUNNING (that used internal only) at new_device()/ destroy_device() callback. Instead, it should be set after new_device() succeeds and reset before destroy_device() is invoked inside vhost lib. This patch fixes it.

[dpdk-dev] [PATCH 01/16] vhost: declare backend with int type

2016-05-02 Thread Yuanhan Liu
It's an fd; so define it as "int", which could also save the unncessary (int) case. Signed-off-by: Yuanhan Liu --- lib/librte_vhost/rte_virtio_net.h | 2 +- lib/librte_vhost/virtio-net.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git

[dpdk-dev] [PATCH 00/16] vhost ABI/API refactoring

2016-05-02 Thread Yuanhan Liu
Every time we introduce a new feature to vhost, we are likely to break ABI. Moreover, some cleanups (such as the one from Ilya to remove vec_buf from vhost_virtqueue struct) also break ABI. This patch set is meant to resolve above issue ultimately, by hiding virtio_net structure (as well as few

[dpdk-dev] [PATCH] lpm6: fix assigned value is garbage or undefined

2016-05-02 Thread Thomas Monjalon
2016-04-27 17:07, Daniel Mrzyglod: > Fix issue reported by clang scan-build > > Value of pointer tbl_next was uninitialized. When function lookup_step() > take else branch it may provide garbage into tbl = tbl_next; > > Fixes: 5c510e13a9cb ("lpm: add IPv6 support") > > Signed-off-by: Daniel

[dpdk-dev] [PATCH] cfgfile: fix uninitialized scalar variable

2016-05-02 Thread Thomas Monjalon
> > CID 13323: > > Uninitialized scalar variable. Using uninitialized value > > cfg->num_sections when calling rte_cfgfile_close. > > > > Fixes: eaafbad419bf ("cfgfile: library to interpret config files") > > > > Signed-off-by: Michal Kobylinski > > Acked-by: Cristian Dumitrescu Applied,

[dpdk-dev] [PATCH] cfgfile: fix return value comment

2016-05-02 Thread Thomas Monjalon
> > Function rte_cfgfile_load can return NULL value, when something goes > > wrong. > > > > Signed-off-by: Dmitriy Yakovlev > Acked-by: Cristian Dumitrescu Applied, thanks

[dpdk-dev] [PATCH v2 8/8] examples/vhost: embed statistics into vhost_dev struct

2016-05-02 Thread Yuanhan Liu
Embed dev_statistics into vhost_dev strcuct, which could clean the code a bit. Signed-off-by: Yuanhan Liu --- examples/vhost/main.c | 87 +++ examples/vhost/main.h | 11 +-- 2 files changed, 40 insertions(+), 58 deletions(-) diff --git

[dpdk-dev] [PATCH v2 7/8] examples/vhost: switch_worker cleanup

2016-05-02 Thread Yuanhan Liu
switch_worker() is the last piece of code that is messy yet it touches virtio/vhost device. Here do a cleanup, so that we will be less painful for later vhost ABI refactoring. The cleanup is straigforward: break long lines, move some code into functions. The last, comment a bit on

[dpdk-dev] [PATCH v2 6/8] examples/vhost: fix mbuf allocation failure

2016-05-02 Thread Yuanhan Liu
It has always been a mystery (at least to me before) that how many mbuf is enough while creating an mbuf pool. While current macro NUM_MBUFS_PER_PORT gives your some insights, it's not that accurate: it doesn't consider the case we may receive a big packet, say 64K when TSO is enabled. We

[dpdk-dev] [PATCH v2 5/8] examples/vhost: handle broadcast packet

2016-05-02 Thread Yuanhan Liu
Every time I do a VM2VM iperf test with vhost example, I have to set the arp table manually, as vhost-switch just ignores the broadcast packet, leaving the ARP request not served. Here we do a transmit a broadcast packet (such as ARP request) to every vhost device, as well as the physical port,

[dpdk-dev] [PATCH v2 4/8] examples/vhost: use mac compare helper function directly

2016-05-02 Thread Yuanhan Liu
rte_ether.h already provides a helper function to do mac address compare. No need to define our own, use it directly. Signed-off-by: Yuanhan Liu --- examples/vhost/main.c | 14 +- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/examples/vhost/main.c

[dpdk-dev] [PATCH v2 3/8] examples/vhost: use tailq to link vhost devices

2016-05-02 Thread Yuanhan Liu
To simplify code and logic. Signed-off-by: Yuanhan Liu --- examples/vhost/main.c | 457 -- examples/vhost/main.h | 32 ++-- 2 files changed, 126 insertions(+), 363 deletions(-) diff --git a/examples/vhost/main.c b/examples/vhost/main.c index

[dpdk-dev] [PATCH v2 2/8] examples/vhost: remove unused macro and struct

2016-05-02 Thread Yuanhan Liu
Interestingly, DESC_PER_CACHELINE has never been used since the introduction of vhost example. Remove it. vlan_ethhdr struct and VLAN_ETH_HLEN macro reference had been removed by commit 4d50b6acbd95 ("examples/vhost: adapt Tx routing to lib"), but had forgot to remove the definition. Fixes:

[dpdk-dev] [PATCH v2 1/8] examples/vhost: remove the non-working zero copy code

2016-05-02 Thread Yuanhan Liu
It's reported that it's has not been working for a long while. And due to it's complex, it's better to redesign it than to fix it to make it work again. Signed-off-by: Yuanhan Liu --- v2: remove macro PRINT_PACKET; will not be used anymore --- doc/guides/sample_app_ug/vhost.rst | 36 +-

[dpdk-dev] [PATCH v2 0/8] vhost/example cleanup/fix

2016-05-02 Thread Yuanhan Liu
I'm starting to work on the vhost ABI refactoring, that I also have to touch the vhost example code. The vhost example code, however, is very messy, full of __very__ long lines. This would make a later diff to apply the new vhost API be very ugly, therefore, not friendly for review. This is how

[dpdk-dev] [PATCH] ethdev: make struct rte_eth_dev cache aligned

2016-05-02 Thread Jerin Jacob
Elements of struct rte_eth_dev used in the fast path. Make struct rte_eth_dev cache aligned to avoid the cases where rte_eth_dev elements share the same cache line with other structures. Signed-off-by: Jerin Jacob --- lib/librte_ether/rte_ethdev.c | 2 +- lib/librte_ether/rte_ethdev.h | 2 +- 2

[dpdk-dev] [PATCH] ip_pipeline: configuration file parser cleanup

2016-05-02 Thread Jasvinder Singh
This patch updates the parsing routines of packet queues (pktq_in/out fields in the PIPELINE section) and message queues (msgq_in/out fields of in the MSGQ Section) specified in ip_pipeline configuration file. Signed-off-by: Jasvinder Singh Acked-by: Cristian Dumitrescu ---

[dpdk-dev] [PATCH] lpm6: fix missing header dependency

2016-05-02 Thread Thomas Monjalon
2016-04-28 15:08, Igor Ryzhov: > Include stdint.h for the definition of uint*_t types. > > Signed-off-by: Igor Ryzhov Applied, thanks

[dpdk-dev] [PATCH] lpm: fix freeing of rules_tbl in rte_lpm_free_v20

2016-05-02 Thread Thomas Monjalon
> > Back then when we fixed the missing free lpm I was to quickly to say yes > > if it applies not only to the lpm6 but also to all of the lpm code. > > > > It turned out to not apply to all of them. In rte_lpm_create_v20 there > > is an unexpected fused allocation: > > mem_size = sizeof(*lpm) +

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

2016-05-02 Thread Yuanhan Liu
On Thu, Apr 28, 2016 at 06:08:59PM +, Jianfeng Tan wrote: > Issue: virtio's drv_flags are decided by devices types (modern vs legacy), > and which kernel driver is used, and the negotiated features (especially > VIRTIO_NET_STATUS) with backend, which makes it possible to multiple > virtio

[dpdk-dev] Flow Director Example?

2016-05-02 Thread Zhang, Helin
Hi Alex Can you confirm that you are using DPDK? And how do you use DPDK and possibly kernel driver? I need your detailed topo of how are you using DPDK, as I am a bit confused. Thanks! Regards, Helin > -Original Message- > From: dev [mailto:dev-bounces at dpdk.org] On Behalf Of Alex