Re: [dpdk-dev] [PATCH 0/5] Fixes and enhancements for Tx path in Virtio PMD

2019-02-19 Thread Tiwei Bie
On Tue, Feb 19, 2019 at 09:40:05PM +0800, Jason Wang wrote: > On 2019/2/19 下午6:59, Tiwei Bie wrote: > > Below is a quick (unofficial) performance test (macfwd loop, 64B) > > for the packed ring optimizations in this series on an Intel(R) > > Xeon(R) Gold 6140 CPU @ 2.30GHz platform: > > > > w/o th

Re: [dpdk-dev] [PATCH] vhost: fix sprintf with snprintf

2019-02-19 Thread Tiwei Bie
On Tue, Feb 19, 2019 at 08:59:51PM +0800, Parthasarathy, JananeeX M wrote: > > >-Original Message- > >From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Maxime Coquelin > >Sent: Monday, February 04, 2019 3:02 PM > >To: Poornima, PallantlaX ; dev@dpdk.org > >Cc: Pattan, Reshma ; Bie, Tiwe

[dpdk-dev] [PATCH v3 2/2] eal: restrict ctrl threads to startup cpu affinity

2019-02-19 Thread David Marchand
Spawning the ctrl threads on anything that is not part of the eal coremask is not that polite to the rest of the system, especially when you took good care to pin your processes on cpu resources with tools like taskset (linux) / cpuset (freebsd). Rather than introduce yet another eal options to co

[dpdk-dev] [PATCH v3 1/2] eal: fix potential incorrect pinning for ctrl threads

2019-02-19 Thread David Marchand
pthread_setaffinity_np returns a >0 value on error. We could end up letting the ctrl threads on the current process cpu affinity. Fixes: d651ee4919cd ("eal: set affinity for control threads") Cc: sta...@dpdk.org Signed-off-by: David Marchand --- Changelog since v2: - added missing Cc: sta...@dpdk

[dpdk-dev] [PATCH v2] eal: fix check when retrieving current cpu affinity

2019-02-19 Thread David Marchand
pthread_getaffinity_np returns a >0 value when failing. This is mainly for the sake of correctness. The only case where it could fail is when passing an incorrect cpuset size wrt to the kernel. Fixes: 2eba8d21f3c9 ("eal: restrict cores auto detection") Cc: sta...@dpdk.org Signed-off-by: David Mar

Re: [dpdk-dev] [dpdk-stable] [PATCH v2 2/2] eal: restrict ctrl threads to startup cpu affinity

2019-02-19 Thread Thomas Monjalon
19/02/2019 12:51, David Marchand: > On Tue, Feb 19, 2019 at 12:38 PM Burakov, Anatoly > wrote: > > On 14-Feb-19 1:30 PM, David Marchand wrote: > > > --- a/doc/guides/prog_guide/env_abstraction_layer.rst > > > +++ b/doc/guides/prog_guide/env_abstraction_layer.rst > > > +Control Thread API > > > +~~

[dpdk-dev] [PATCH v6 1/2] doc: add svg for debug and troubleshoot guide

2019-02-19 Thread Vipin Varghese
Add svg images for debug and troubleshoot guide. Signed-off-by: Vipin Varghese Acked-by: Marko Kovacevic --- --- doc/guides/howto/img/dtg_consumer_ring.svg| 24 doc/guides/howto/img/dtg_crypto.svg | 21 .../howto/img/dtg_distributor_worker.svg | 36 ++ doc/gu

[dpdk-dev] [PATCH v6 2/2] doc: add guide for debug and troubleshoot

2019-02-19 Thread Vipin Varghese
Add user guide on debugging and troubleshooting for common issues and bottleneck found in the sample application model. Signed-off-by: Vipin Varghese Acked-by: Marko Kovacevic --- doc/guides/howto/debug_troubleshoot_guide.rst | 451 ++ doc/guides/howto/index.rst

[dpdk-dev] [PATCH v6 0/2] guide to debug and troubleshoot.

2019-02-19 Thread Vipin Varghese
The patch series adds a how-to guide for debugging and troubleshooting tips. Motivation == DPDK proc-info tool is been enhanced to accommodate the debug information for the port, traffic manager crypto, ring and mempool contents. With these additional information, it becomes easy to analy

[dpdk-dev] [PATCH] fips_validation: Add plain SHA support

2019-02-19 Thread Fan Zhang
From: Damian Nowak This patch enables plain SHA algorithm CAVP test support in fips_validation sample application. Signed-off-by: Damian Nowak Acked-by: Fan Zhang --- examples/fips_validation/Makefile | 1 + examples/fips_validation/fips_validation.c | 17 examples/fi

[dpdk-dev] [PATCH v2 4/4] ipsec-secgw: add 3des test files

2019-02-19 Thread Fan Zhang
This patch adds the functional test scripts to ipsec-secgw sample application for both transport and tunnel working mode. Signed-off-by: Fan Zhang --- examples/ipsec-secgw/test/run_test.sh | 8 ++- .../test/trs_3descbc_sha1_common_defs.sh | 73 ++ exam

[dpdk-dev] [PATCH v2 3/4] ipsec: add 3DES-CBC algorithm support

2019-02-19 Thread Fan Zhang
This patch adds triple-des CBC mode cipher algorithm to ipsec library. Signed-off-by: Fan Zhang --- lib/librte_ipsec/sa.c | 10 ++ lib/librte_ipsec/sa.h | 6 ++ 2 files changed, 16 insertions(+) diff --git a/lib/librte_ipsec/sa.c b/lib/librte_ipsec/sa.c index e34dd320a..5c59c4b67 1

[dpdk-dev] [PATCH v2 2/4] ipsec-secgw: add test scripts for aes ctr

2019-02-19 Thread Fan Zhang
This patch adds the functional test scripts to ipsec-secgw sample application for both transport and tunnel working mode. Updated a bit on common_defs to use "mktemp" instead of "tempfile" as Fedora does not like the command. Signed-off-by: Fan Zhang --- examples/ipsec-secgw/test/common_defs.sh

[dpdk-dev] [PATCH v2 1/4] ipsec: add AES-CTR algorithm support

2019-02-19 Thread Fan Zhang
This patch adds AES-CTR cipher algorithm support to ipsec library. Signed-off-by: Fan Zhang --- lib/librte_ipsec/crypto.h | 17 ++ lib/librte_ipsec/sa.c | 133 ++ lib/librte_ipsec/sa.h | 18 +++ 3 files changed, 147 insertions(+), 21

[dpdk-dev] [PATCH v2 0/4] ipsec: add AES-CTR and 3DES-CBC support

2019-02-19 Thread Fan Zhang
This patchset adds the AES-CTR and 3DES-CBC cipher algorithms support to ipsec library. The test scripts for ipsec-secgw sample application are added too. v2: - removed unsupported tests. Fan Zhang (4): ipsec: add AES-CTR algorithm support ipsec-secgw: add test scripts for aes ctr ipsec: ad

Re: [dpdk-dev] [PATCH] build: set RTE_ARCH_64 based on pointer size

2019-02-19 Thread Luca Boccassi
On Wed, 2018-09-26 at 10:15 +0100, Bruce Richardson wrote: > Rather than relying on the target machine architecture, use the > size of a pointer from the compiler to determine if we are 64-bits > or not. This allows correct behaviour when you pass -m32 as a compile > option. It also allows us to us

[dpdk-dev] [PATCH v2 5/5] test/test: move to app folder

2019-02-19 Thread Bruce Richardson
Since all other apps have been moved to the "app" folder, the autotest app remains alone in the test folder. Rather than having an entire top-level folder for this, we can move it back to where it all started in early versions of DPDK - the "app/" folder. This move has a couple of advantages: * Th

[dpdk-dev] [PATCH v2 4/5] test/bpf: move to examples folder

2019-02-19 Thread Bruce Richardson
The bpf folder didn't actual contain a test application, but instead basic examples of BPF code for use with testpmd. Therefore we can move it to the `examples` folder. Being different, it also needs a README with it, explaining what it is and how to use it. References to the code from the testpmd

[dpdk-dev] [PATCH v2 3/5] test/test-pipeline: move to app directory

2019-02-19 Thread Bruce Richardson
Move to the app directory, and add to meson build. CC: Cristian Dumitrescu Signed-off-by: Bruce Richardson --- MAINTAINERS | 2 +- app/Makefile| 1 + app/meson.build | 1 + {test => app}/t

[dpdk-dev] [PATCH v2 1/5] test/cmdline_test: move to app directory

2019-02-19 Thread Bruce Richardson
Move app to "app" directory and enable with meson build. CC: Olivier Matz Signed-off-by: Bruce Richardson --- MAINTAINERS | 2 +- app/Makefile| 1 + {test => app}/cmdline_test/Makefile | 0 {test => app}/cmdline

[dpdk-dev] [PATCH v2 2/5] test/test-acl: move to app directory

2019-02-19 Thread Bruce Richardson
Move to "app" directory and enable with meson build. CC: Konstantin Ananyev Signed-off-by: Bruce Richardson --- MAINTAINERS | 2 +- app/Makefile| 1 + app/meson.build | 1 + {test => app}/test-acl/Makefile | 0 {test => app}/test-acl/main.

[dpdk-dev] [PATCH v2 0/5] consolidate testing apps to app dir

2019-02-19 Thread Bruce Richardson
The apps for testing are split between the "test" and "app" directories, with a not-very-clear distinction between the two (at least to my mind). Given how the apps are being built, the easiest path to having cmdline_test, test-acl and test-pipeline build using meson is to consolidate all these ap

Re: [dpdk-dev] [PATCH 0/5] Fixes and enhancements for Tx path in Virtio PMD

2019-02-19 Thread Jason Wang
On 2019/2/19 下午6:59, Tiwei Bie wrote: Below is a quick (unofficial) performance test (macfwd loop, 64B) for the packed ring optimizations in this series on an Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz platform: w/o this series: packed ring normal/in-order: ~10.4 Mpps w/ this series: packed ri

[dpdk-dev] [PATCH] drivers/net: fix shifting 32-bit signed variable 31 times

2019-02-19 Thread Andrius Sirvys
Shifting signed 32-bit values by 31-bits has the potential for unexpected outcomes as compiler can overwrite a bit. Specified that values are unsigned. Errors are observed from running cppcheck. Bugzilla ID: 58 Fixes: 69e209be5464 ("net/axgbe: add register map and related macros") Fixes: b5bf771

Re: [dpdk-dev] [PATCH] eal: fix check when retrieving current cpu affinity

2019-02-19 Thread David Marchand
On Tue, Feb 19, 2019 at 12:40 PM Burakov, Anatoly wrote: > On 14-Feb-19 5:41 PM, David Marchand wrote: > > On Thu, Feb 14, 2019 at 5:44 PM Burakov, Anatoly > > mailto:anatoly.bura...@intel.com>> wrote: > > CC: stable? > > > > Not really sure about CCing stable for this. > > > > I did not get

Re: [dpdk-dev] [PATCH v2 2/2] eal: restrict ctrl threads to startup cpu affinity

2019-02-19 Thread David Marchand
On Tue, Feb 19, 2019 at 12:38 PM Burakov, Anatoly wrote: > On 14-Feb-19 1:30 PM, David Marchand wrote: > > --- a/doc/guides/prog_guide/env_abstraction_layer.rst > > +++ b/doc/guides/prog_guide/env_abstraction_layer.rst > > @@ -498,6 +498,20 @@ Those TLS include *_cpuset* and *_socket_id*: > > *

Re: [dpdk-dev] [PATCH] eal: fix check when retrieving current cpu affinity

2019-02-19 Thread Burakov, Anatoly
On 14-Feb-19 5:41 PM, David Marchand wrote: On Thu, Feb 14, 2019 at 5:44 PM Burakov, Anatoly mailto:anatoly.bura...@intel.com>> wrote: On 14-Feb-19 1:27 PM, David Marchand wrote: > pthread_getaffinity_np returns a >0 value when failing. > > This is mainly for the sake of c

Re: [dpdk-dev] [PATCH v2 2/2] eal: restrict ctrl threads to startup cpu affinity

2019-02-19 Thread Burakov, Anatoly
On 14-Feb-19 1:30 PM, David Marchand wrote: Spawning the ctrl threads on anything that is not part of the eal coremask is not that polite to the rest of the system, especially when you took good care to pin your processes on cpu resources with tools like taskset (linux) / cpuset (freebsd). Rathe

[dpdk-dev] [PATCH 4/5] net/virtio: introduce a helper for clearing net header

2019-02-19 Thread Tiwei Bie
This patch introduces a helper for clearing the virtio net header to avoid the code duplication. Macro is used as it shows slightly better performance. Signed-off-by: Tiwei Bie --- drivers/net/virtio/virtio_rxtx.c | 46 +--- 1 file changed, 18 insertions(+), 28 deleti

[dpdk-dev] [PATCH 0/5] Fixes and enhancements for Tx path in Virtio PMD

2019-02-19 Thread Tiwei Bie
Below is a quick (unofficial) performance test (macfwd loop, 64B) for the packed ring optimizations in this series on an Intel(R) Xeon(R) Gold 6140 CPU @ 2.30GHz platform: w/o this series: packed ring normal/in-order: ~10.4 Mpps w/ this series: packed ring normal: ~10.9 Mpps packed rin

[dpdk-dev] [PATCH 5/5] net/virtio: optimize xmit enqueue for packed ring

2019-02-19 Thread Tiwei Bie
This patch introduces an optimized enqueue function in packed ring for the case that virtio net header can be prepended to the unchained mbuf. Signed-off-by: Tiwei Bie --- drivers/net/virtio/virtio_rxtx.c | 63 +++- 1 file changed, 61 insertions(+), 2 deletions(-) di

[dpdk-dev] [PATCH 3/5] net/virtio: fix in-order Tx path for packed ring

2019-02-19 Thread Tiwei Bie
When IN_ORDER feature is negotiated, device may just write out a single used descriptor for a batch of buffers: """ Some devices always use descriptors in the same order in which they have been made available. These devices can offer the VIRTIO_F_IN_ORDER feature. If negotiated, this knowledge all

[dpdk-dev] [PATCH 1/5] net/virtio: fix Tx desc cleanup for packed ring

2019-02-19 Thread Tiwei Bie
We should try to cleanup at least the 'need' number of descs. Fixes: 892dc798fa9c ("net/virtio: implement Tx path for packed queues") Cc: sta...@dpdk.org Signed-off-by: Tiwei Bie --- drivers/net/virtio/virtio_rxtx.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/virtio/virtio_rx

[dpdk-dev] [PATCH 2/5] net/virtio: fix in-order Tx path for split ring

2019-02-19 Thread Tiwei Bie
When IN_ORDER feature is negotiated, device may just write out a single used ring entry for a batch of buffers: """ Some devices always use descriptors in the same order in which they have been made available. These devices can offer the VIRTIO_F_IN_ORDER feature. If negotiated, this knowledge all

[dpdk-dev] [PATCH v4 0/2] ticketlock: implement ticketlock and add test case

2019-02-19 Thread Joyce Kong
v4: Change some assignment operation in recursive ticket lock to __atomic. V3: 1.Update ticketlock intrduction(suggested by Honnappa Nagarahalli). 2.Change the implementation of rte_ticketlock_trylock to CAS(suggested by Honnappa Nagarahalli). V2: 1.Update commit message(sugg

[dpdk-dev] [PATCH v4 2/2] test/ticketlock: add ticket lock test case

2019-02-19 Thread Joyce Kong
Add test cases for ticket lock, recursive ticket lock, and ticket lock performance. Signed-off-by: Joyce Kong Reviewed-by: Gavin Hu Reviewed-by: Phil Yang --- test/test/Makefile | 1 + test/test/autotest_data.py | 6 + test/test/meson.build | 1 + test/test/test_ticketloc

[dpdk-dev] [PATCH v4 1/2] ticketlock: ticket based to improve fairness

2019-02-19 Thread Joyce Kong
The spinlock implementation is unfair, some threads may take locks aggressively while leaving the other threads starving for long time. This patch introduces ticketlock which gives each waiting thread a ticket and they can take the lock one by one. First come, first serviced. This avoids starvatio