Re: [dpdk-dev] [PATCH] net/nfp: add CPP bridge as service

2019-01-14 Thread Ferruh Yigit
On 1/14/2019 6:00 PM, Alejandro Lucero wrote: > > > On Mon, Jan 14, 2019 at 10:40 AM Ferruh Yigit > wrote: > > On 1/13/2019 9:41 PM, Thomas Monjalon wrote: > > 11/01/2019 17:42, Ferruh Yigit: > >> On 1/11/2019 1:25 PM, Alejandro Lucero wrote: > >>>

Re: [dpdk-dev] [PATCH] net/nfp: add CPP bridge as service

2019-01-14 Thread Alejandro Lucero
On Mon, Jan 14, 2019 at 6:22 PM Ferruh Yigit wrote: > On 1/14/2019 6:00 PM, Alejandro Lucero wrote: > > > > > > On Mon, Jan 14, 2019 at 10:40 AM Ferruh Yigit > > wrote: > > > > On 1/13/2019 9:41 PM, Thomas Monjalon wrote: > > > 11/01/2019 17:42, Ferruh Yigi

Re: [dpdk-dev] [PATCH] eal: fix build of external apps with clang on armv8

2019-01-14 Thread Thomas Monjalon
14/01/2019 17:50, Honnappa Nagarahalli: > > > > In case DPDK built using GCC, RTE_TOOLCHAIN_CLANG is not defined. > > But 'rte_atomic.h' is a generic header that included to the external apps > > like > > OVS while building with DPDK. As a result, clang build of OVS fails on ARMv8 >

Re: [dpdk-dev] [dpdk-stable] [PATCH] eal: fix build of external apps with clang on armv8

2019-01-14 Thread Thomas Monjalon
14/01/2019 17:27, Thomas Monjalon: > 14/01/2019 17:14, Ilya Maximets: > > In case DPDK built using GCC, RTE_TOOLCHAIN_CLANG is not defined. > > But 'rte_atomic.h' is a generic header that included to the > > external apps like OVS while building with DPDK. As a result, > > clang build of OVS fails

Re: [dpdk-dev] [PATCH] net/nfp: add CPP bridge as service

2019-01-14 Thread Thomas Monjalon
14/01/2019 19:29, Alejandro Lucero: > On Mon, Jan 14, 2019 at 6:22 PM Ferruh Yigit wrote: > > > On 1/14/2019 6:00 PM, Alejandro Lucero wrote: > > > > > > > > > On Mon, Jan 14, 2019 at 10:40 AM Ferruh Yigit > > > wrote: > > > > > > On 1/13/2019 9:41 PM, Thomas M

Re: [dpdk-dev] [PATCH] config: remove NFP PMD from 32-bits builds

2019-01-14 Thread Thomas Monjalon
14/01/2019 19:12, Alejandro Lucero: > Signed-off-by: Alejandro Lucero > --- > config/defconfig_i686-native-linuxapp-gcc| 5 + > config/defconfig_i686-native-linuxapp-icc| 5 + > config/defconfig_x86_x32-native-linuxapp-gcc | 5 + > 3 files changed, 15 insertions(+) You forgot

Re: [dpdk-dev] [dpdk-stable] [PATCH] eal: fix build of external apps with clang on armv8

2019-01-14 Thread Thomas Monjalon
14/01/2019 19:49, Thomas Monjalon: > 14/01/2019 17:27, Thomas Monjalon: > > 14/01/2019 17:14, Ilya Maximets: > > > In case DPDK built using GCC, RTE_TOOLCHAIN_CLANG is not defined. > > > But 'rte_atomic.h' is a generic header that included to the > > > external apps like OVS while building with DPD

Re: [dpdk-dev] [PATCH] net/nfp: add CPP bridge as service

2019-01-14 Thread Alejandro Lucero
On Mon, Jan 14, 2019 at 6:54 PM Thomas Monjalon wrote: > 14/01/2019 19:29, Alejandro Lucero: > > On Mon, Jan 14, 2019 at 6:22 PM Ferruh Yigit > wrote: > > > > > On 1/14/2019 6:00 PM, Alejandro Lucero wrote: > > > > > > > > > > > > On Mon, Jan 14, 2019 at 10:40 AM Ferruh Yigit < > ferruh.yi...@in

[dpdk-dev] [PATCH v5 2/2] net/mlx5: fix instruction hotspot on replenishing Rx buffer

2019-01-14 Thread Yongseok Koh
On replenishing Rx buffers for vectorized Rx, mbuf->buf_addr isn't needed to be accessed as it is static and easily calculated from the mbuf address. Accessing the mbuf content causes unnecessary load stall and it is worsened on ARM. Fixes: 545b884b1da3 ("net/mlx5: fix buffer address posting in SS

[dpdk-dev] [PATCH v5 1/2] mbuf: add function returning buffer address

2019-01-14 Thread Yongseok Koh
This patch introduces two new functions - rte_mbuf_buf_addr() and rte_mbuf_data_addr_default(). rte_mbuf_buf_addr() reutrns the buffer address of given mbuf which comes after mbuf structure and private data. rte_mbuf_data_addr_default() returns the default address of mbuf data taking the headroom

Re: [dpdk-dev] [PATCH] ipsec: fix compilation problem

2019-01-14 Thread Thomas Monjalon
14/01/2019 16:58, Konstantin Ananyev: > gcc 6.2 and 6.4 fails to compile lib/librte_ipsec/sa.c > with the following errors: > /local/kananye1/dpdk.org/lib/librte_ipsec/sa.c: > In function âinline_outb_tun_pkt_processâ: > dpdk.org/x86_64-native-linuxapp-gcc/include/rte_memcpy.h:337:2: > error: ar

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

2019-01-14 Thread Thomas Monjalon
09/01/2019 15:47, Akhil Goyal: > On 1/7/2019 4:16 PM, Pallantla Poornima wrote: > > sprintf function is not secure as it doesn't check the length of string. > > More secure function snprintf is used > > > > Fixes: 828d51d8fc ("bus/fslmc: refactor scan and probe functions") > > Fixes: c22fab9a6c ("r

Re: [dpdk-dev] [dpdk-stable] [PATCH v2] gro: add missing invalid packet checks

2019-01-14 Thread Thomas Monjalon
Any review, please? 10/01/2019 16:06, Jiayu Hu: > Currently, GRO library doesn't check if input packets have > invalid headers. The packets with invalid headers will also > be processed by GRO. > > However, GRO shouldn't process invalid packets. This patch adds > missing invalid packet checks. >

Re: [dpdk-dev] [dpdk-stable] [PATCH v3] lib/efd: fix to free tail queue entry after use

2019-01-14 Thread Thomas Monjalon
Any review please? 11/01/2019 12:49, Hari Kumar Vemula: > In rte_efd_create() allocated memory for tail queue entry but > not freed. > Added freeing the tail queue entry. > > Fixes: 56b6ef874f80 ("efd: new Elastic Flow Distributor library") > Cc: sta...@dpdk.org > > Signed-off-by: Hari Kumar Vem

Re: [dpdk-dev] [PATCH] libs/power: fix the resource leaking issue

2019-01-14 Thread Thomas Monjalon
28/12/2018 12:32, Liang Ma: > Fixes: e6c6dc0f96c8 ("power: add p-state driver compatibility") > Coverity issue: 328528 > > Also add the missing functionality of enable/disable turbo If you are changing two things, you probably need to split in two patches. In 19.02 timeframe, we will get only the

Re: [dpdk-dev] [dpdk-stable] [PATCH v3] lib/efd: fix to free tail queue entry after use

2019-01-14 Thread Honnappa Nagarahalli
> > Any review please? > > 11/01/2019 12:49, Hari Kumar Vemula: > > In rte_efd_create() allocated memory for tail queue entry but not > > freed. > > Added freeing the tail queue entry. > > > > Fixes: 56b6ef874f80 ("efd: new Elastic Flow Distributor library") > > Cc: sta...@dpdk.org > > > > Signed

Re: [dpdk-dev] [PATCH] lib/power: fix error handling on setting governor

2019-01-14 Thread Thomas Monjalon
08/01/2019 15:59, David Hunt: > In the power_set_governor_*() functions, we using fputs() on /sys > filesystem. However, we also need to call fflush() to ensure that > the write completes successfully. Otherwise the attempt to set the > power governor fails and the function returns as if it has > s

Re: [dpdk-dev] [PATCH] lib/power: fix freq list function to handle null

2019-01-14 Thread Thomas Monjalon
07/01/2019 15:39, David Hunt: > This patch fixes a segfault in the case where a null buffer is passed > to the following functions: >power_acpi_cpufreq_freqs() >power_pstate_cpufreq_freqs() > > Fixes: 445c6528b55f ("power: common interface for guest and host") > > Signed-off-by: David Hun

Re: [dpdk-dev] [PATCH] lib/power: fix return code to unsigned value

2019-01-14 Thread Thomas Monjalon
07/01/2019 15:40, David Hunt: > The power_pstate_cpufreq_freqs() function was returning -1 in an > unsigned int, causing buffer over-runs when the results were being > processed. This function should be returning zero for all error > conditions, similar to it's acpi relation, power_acpi_cpufreq_fre

Re: [dpdk-dev] [PATCH] test/power: fix unit test to handle pstate mode

2019-01-14 Thread Thomas Monjalon
07/01/2019 15:40, David Hunt: > The cpufreq test breakes when the system is using the intel_pstate > driver for frequency management. The power library has recentyly been > updated to allow use of the intel_pstate driver, this patch fixes the > cpufreq test so that it can now use either acpi or pst

Re: [dpdk-dev] [PATCH] examples/power: fix intel pstate power manager

2019-01-14 Thread Thomas Monjalon
08/01/2019 16:25, David Hunt: > The vm_power_manager starts by setting the environment to acpi > using rte_power_set_env(PM_ENV_ACPI_CPUFREQ). This causes a problem > starting vm_power_manager when the system is using the intel_pstate > driver. The env should be set to none, or not called at all, b

Re: [dpdk-dev] [PATCH] examples/power: fix wrong core_id with JSON cmds

2019-01-14 Thread Thomas Monjalon
> > >> This patch fixes a bug introduced in the 64-core limtation > > >> enhancement where the core_id is inadvertently converted from > > >> virtual to physical even though it may already be a physical > > >> core_id. > > >> > > >> We should be using the core_type field, and only converting via >

Re: [dpdk-dev] [PATCH v2] test/hash: reset iter and found in perf test

2019-01-14 Thread Thomas Monjalon
14/01/2019 10:23, Dharmik Thakkar: > Reset 'iter' and 'tbl_rw_test_param.found' on each iteration > to give correct result for lost and duplicated keys. > > This patch also changes the default return value of the test to -1 > when not enough resources are provided. > > Fixes: 0eb3726ebcf14 ("test

Re: [dpdk-dev] [PATCH v1] ticketlock: ticket based to improve fairness

2019-01-14 Thread Honnappa Nagarahalli
> Subject: [PATCH v1] ticketlock: ticket based to improve fairness > > From: Joyce Kong > > The spinlock implementation is unfair, some threads may take locks > aggressively while leaving the other threads starving for long time. As shown > in the following test, within same period of time, ther

Re: [dpdk-dev] [PATCH v3]/driver/raw/ifpga_rawdev: fix a memory leak bug in ifpga

2019-01-14 Thread Thomas Monjalon
Hi Andy, I comment here for all your patches (4 are pending). They are your first patches for DPDK, welcome! You may want to read the guides explaining how to contribute: http://doc.dpdk.org/guides/contributing/patches.html The title should be "raw/ifpga: fix memory leak in [area here]"

Re: [dpdk-dev] [PATCH v2] examples/ip_fragmentation: support big packets

2019-01-14 Thread Thomas Monjalon
14/01/2019 13:55, Ananyev, Konstantin: > > > > In some vendors the RX and TX configuration must be the same, therefore > > the MTU size need to be equal to max_rx_pkt_len. > > The MTU is the largest size packet in bytes that can be sent on the > > network, therefore before changing this parameter,

Re: [dpdk-dev] [PATCH] examples/tep_term: remove MAX_PRINT_BUFF

2019-01-14 Thread Thomas Monjalon
13/01/2019 16:02, Rami Rosen: > The definition of MAX_PRINT_BUFF in examples/tep_termination/main.c > is not necessary as it is not used. This cleanup patch removes it. > > Fixes: a50245ede72a ("examples/tep_term: initialize VXLAN sample") > Cc: sta...@dpdk.org > > Signed-off-by: Rami Rosen A

Re: [dpdk-dev] [PATCH v3] pdump: fix vdev cleanup

2019-01-14 Thread Thomas Monjalon
11/01/2019 18:51, Reshma Pattan: > Virtual devices added in pdump application > using rte_eal_hotplug_add should be removed explicitly > while existing the pdump application, otherwise the existing -> exiting ? > subsequent run of the pdump application will fail with the reason > that virtual dev

Re: [dpdk-dev] [PATCH v2] gro: add missing invalid packet checks

2019-01-14 Thread Stephen Hemminger
On Thu, 10 Jan 2019 23:06:08 +0800 Jiayu Hu wrote: > + > +#define ILLEGAL_ETHER_HDRLEN(len) ((len) != ETHER_HDR_LEN) > +#define ILLEGAL_ETHER_VXLAN_HDRLEN(len) \ > + ((len) != (ETHER_VXLAN_HLEN + ETHER_HDR_LEN)) > +#define ILLEGAL_IPV4_HDRLEN(len) ((len) != sizeof(struct ipv4_hdr)) > +#define

Re: [dpdk-dev] [PATCH v1 0/8] Clean up rte_option

2019-01-14 Thread Thomas Monjalon
20/12/2018 18:06, Gaetan Rivet: > rte_option lib might benefit from a few improvements. > > Overview: > > - list registered options on /rte/app --help > - check duplicates within base EAL options > - rename some fields to be closer to standard struct option > and just cleaner overall. >

Re: [dpdk-dev] [PATCH v2 0/3] segment sanity checks

2019-01-14 Thread Thomas Monjalon
07/01/2019 09:57, David Marchand: > Resubmitting this series that I did not finish in my previous life (6WIND > people are okay with this). > > Here is a little series which helped me identify a multi segment issue. > Hope it can help others. > > The difference since the RFC patches I sent some t

Re: [dpdk-dev] [PATCH v5 1/2] mbuf: add function returning buffer address

2019-01-14 Thread Thomas Monjalon
14/01/2019 22:16, Yongseok Koh: > This patch introduces two new functions - rte_mbuf_buf_addr() and > rte_mbuf_data_addr_default(). > > rte_mbuf_buf_addr() reutrns the buffer address of given mbuf which comes > after mbuf structure and private data. > > rte_mbuf_data_addr_default() returns the de

Re: [dpdk-dev] [PATCH v2] doc: fix a typo in programmer's guide

2019-01-14 Thread Thomas Monjalon
07/01/2019 10:10, Yong Wang: > This patch fixes a typo in programmer's guide. It should be Frequency, > not Fequence. > > Fixes: 450f0791312c ("power: add traffic pattern aware power control") > > Signed-off-by: Yong Wang Applied, thanks

Re: [dpdk-dev] [PATCH] examples/vhost: fix a typo

2019-01-14 Thread Thomas Monjalon
14/01/2019 16:37, Gavin Hu (Arm Technology China): > > > -Original Message- > > From: dev On Behalf Of Rami Rosen > > Sent: Monday, January 14, 2019 10:48 PM > > To: dev@dpdk.org > > Cc: maxime.coque...@redhat.com; huawei@intel.com; > > tiwei@intel.com; Rami Rosen > > Subject: [d

Re: [dpdk-dev] [PATCH] drivers: fix to replace strcat with strncat

2019-01-14 Thread Thomas Monjalon
14/01/2019 15:21, Bruce Richardson: > On Mon, Jan 14, 2019 at 06:04:35AM +, Chaitanya Babu Talluri wrote: > > Strcat does not check the destination length and there might be > > chances of string overflow so insted of strcat, strncat is used. [...] > > While I believe this is correct, this (an

Re: [dpdk-dev] [dpdk-stable] [PATCH 2/2] examples/vhost: fix realloc failure

2019-01-14 Thread Thomas Monjalon
14/01/2019 04:34, Tiwei Bie: > Fixes: ad0eef4d2203 ("examples/vhost: support multiple socket files") > Cc: sta...@dpdk.org Please add some explanations about what was wrong. About the title, do you mean "fix path allocation failure handling" ?

Re: [dpdk-dev] [PATCH 3/6] net/tap: check interface name in kvargs

2019-01-14 Thread Thomas Monjalon
11/01/2019 20:50, Wiles, Keith: > > > On Jan 11, 2019, at 1:49 PM, Stephen Hemminger > > wrote: > > > > On Fri, 11 Jan 2019 19:37:00 + > > "Wiles, Keith" wrote: > > > >>> +/* make sure name is a possible Linux network device name */ > >>> +static bool is_valid_iface(const char *name) >

Re: [dpdk-dev] [PATCH] net/i40e: fix FPK VF overwrite PF RSS LUT

2019-01-14 Thread Wu, Yanglong
Hi qi, -Original Message- From: Zhang, Qi Z Sent: Monday, January 14, 2019 8:48 PM To: Wu, Yanglong ; dev@dpdk.org Cc: Hall, Ryan E ; sta...@dpdk.org Subject: RE: [PATCH] net/i40e: fix FPK VF overwrite PF RSS LUT > -Original Message- > From: Wu, Yanglong > Sent: Monday, January

[dpdk-dev] [dpdk-announce] release candidate 19.02-rc2

2019-01-14 Thread Thomas Monjalon
A new DPDK release candidate is ready for testing: https://git.dpdk.org/dpdk/tag/?id=v19.02-rc2 Less than 200 patches were integrated. The release notes were updated: http://doc.dpdk.org/guides/rel_notes/release_19_02.html Some highlights of 19.02-rc2: - new library for I

[dpdk-dev] [PATCH v2] net/i40e: fix FPK VF overwrite PF RSS LUT

2019-01-14 Thread Yanglong Wu
i40e_aq_set_rss_lut should set rigister according to the vsi->type. if not, VF may overwrite the rigister of PF Fixes: d0a349409bd7 ("i40e: support AQ based RSS config") Cc: sta...@dpdk.org Signed-off-by: Yanglong Wu --- drivers/net/i40e/i40e_ethdev.c | 6 -- 1 file changed, 4 insertions(+)

Re: [dpdk-dev] [PATCH] vhost: fix deadlock when vhost unregister.

2019-01-14 Thread Ye Xiaolong
Hi, On 01/11, sunwenjie wrote: >When rte_vhost_driver_unregister delete the connection fd, >fdset_try_del will always try and donot release the >vhostuser.mutex if the fd is busy, but the fdset_event_dispatch >will set the fd to busy and call vhost_user_msg_handler to get >vh

Re: [dpdk-dev] [PATCH v2] gro: add missing invalid packet checks

2019-01-14 Thread Hu, Jiayu
> -Original Message- > From: Stephen Hemminger [mailto:step...@networkplumber.org] > Sent: Tuesday, January 15, 2019 9:00 AM > To: Hu, Jiayu > Cc: dev@dpdk.org; Ananyev, Konstantin ; > tho...@monjalon.net; sta...@dpdk.org > Subject: Re: [dpdk-dev] [PATCH v2] gro: add missing invalid pac

Re: [dpdk-dev] [PATCH v2] gro: add missing invalid packet checks

2019-01-14 Thread Wang, Yinan
Tested-by: Yinan Wang Best Wishes, Yinan -Original Message- From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Jiayu Hu Sent: 2019年1月10日 23:06 To: dev@dpdk.org Cc: Ananyev, Konstantin ; tho...@monjalon.net; Hu, Jiayu ; sta...@dpdk.org Subject: [dpdk-dev] [PATCH v2] gro: add missing i

[dpdk-dev] [DPDK] [PATCH v4] raw/ifpga: fix a typo and delete code of unused function

2019-01-14 Thread Andy Pei
fix a typo and delete code of unused function Fixes: 88c9eb7cb4b5 (\"fix a typo and delete code of unused function\") Cc: andy@intel.com Cc: rosen...@intel.com Cc: tianfei.zh...@intel.com Signed-off-by: Andy Pei --- drivers/raw/ifpga_rawdev/base/opae_hw_api.c | 24 +---

Re: [dpdk-dev] [PATCH v2] net/virtio: add platform memory ordering feature support

2019-01-14 Thread Shahaf Shuler
Thursday, January 10, 2019 10:37 PM, Shahaf Shuler: > Subject: RE: [dpdk-dev] [PATCH v2] net/virtio: add platform memory > ordering feature support > > Wednesday, January 9, 2019 5:50 PM, Michael S. Tsirkin: > > alejandro.luc...@netronome.com; Daniel Marcovitch > > > > Subject: Re: [dpdk-dev] [PA

[dpdk-dev] [PATCH v2] vhost: remove statement for non-existed function

2019-01-14 Thread Xiaolong Ye
vhost_user_host_notifier_ctrl is not existed anymore, its statement in header file should be removed accordingly. Fixes: 43f34e35663f ("vhost: provide helper for host notifier ctrl") Cc: xiao.w.w...@intel.com Signed-off-by: Xiaolong Ye --- lib/librte_vhost/vhost_user.h | 1 - 1 file changed, 1

Re: [dpdk-dev] [PATCH v2] vhost: remove statement for non-existed function

2019-01-14 Thread Tiwei Bie
On Tue, Jan 15, 2019 at 02:48:13PM +0800, Xiaolong Ye wrote: > vhost_user_host_notifier_ctrl is not existed anymore, its statement in > header file should be removed accordingly. > > Fixes: 43f34e35663f ("vhost: provide helper for host notifier ctrl") > Cc: xiao.w.w...@intel.com > > Signed-off-by

Re: [dpdk-dev] [dpdk-stable] [PATCH 2/2] examples/vhost: fix realloc failure

2019-01-14 Thread Tiwei Bie
On Tue, Jan 15, 2019 at 02:56:39AM +0100, Thomas Monjalon wrote: > 14/01/2019 04:34, Tiwei Bie: > > Fixes: ad0eef4d2203 ("examples/vhost: support multiple socket files") > > Cc: sta...@dpdk.org > > Please add some explanations about what was wrong. My bad. Will do it in the next version. > > Ab

Re: [dpdk-dev] IXGBE, IOMMU DMAR DRHD handling fault issue

2019-01-14 Thread Hu, Xuekun
Hi, Ravi Did you resolve this issue that VF used in guest with vIOMMU enabled? I googled, but still can't get the answer that it is driver or qemu vt-d emulation issue. Currently I met the same issue again that host reported DMAR error: [59939.130110] DMAR: DRHD: handling fault status reg 2 [

[dpdk-dev] [PATCH v2 0/2] Fixes for realloc() in vhost

2019-01-14 Thread Tiwei Bie
Tiwei Bie (2): vhost: fix memory leak on realloc failure examples/vhost: fix path allocation failure handling examples/vhost/main.c | 8 lib/librte_vhost/vhost_user.c | 3 +++ 2 files changed, 11 insertions(+) -- 2.17.1

[dpdk-dev] [PATCH v2 2/2] examples/vhost: fix path allocation failure handling

2019-01-14 Thread Tiwei Bie
Add the missing failure handling for path allocation, as realloc() may fail. Fixes: ad0eef4d2203 ("examples/vhost: support multiple socket files") Cc: sta...@dpdk.org Signed-off-by: Tiwei Bie Reviewed-by: Maxime Coquelin --- v2: - Improve the title and add some explanations (Thomas); examples

[dpdk-dev] [PATCH v2 1/2] vhost: fix memory leak on realloc failure

2019-01-14 Thread Tiwei Bie
When realloc() fails, the original block isn't freed. Fixes: e246896178e6 ("vhost: get guest/host physical address mappings") Cc: sta...@dpdk.org Signed-off-by: Tiwei Bie Reviewed-by: Maxime Coquelin --- lib/librte_vhost/vhost_user.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/l

[dpdk-dev] [PATCH v1] net/i40e: support request any number of queues

2019-01-14 Thread Zhirun Yan
Before this patch, VF must request a specific queues(1/2/4/8/16) with DPDK PF. This patch align the number of requested queues to next power of 2. So VF can request any number queues from 1 to 16. Signed-off-by: Zhirun Yan --- drivers/net/i40e/i40e_pf.c | 5 - 1 file changed, 4 insertions(+)

[dpdk-dev] [PATCH v4 4/4] spinlock: reimplement with atomic one-way barrier builtins

2019-01-14 Thread gavin hu
From: Gavin Hu The __sync builtin based implementation generates full memory barriers ('dmb ish') on Arm platforms. Using C11 atomic builtins to generate one way barriers. Here is the assembly code of __sync_compare_and_swap builtin. __sync_bool_compare_and_swap(dst, exp, src); 0x0090

[dpdk-dev] [PATCH v4 0/4] spinlock optimization and test case enhancements

2019-01-14 Thread gavin hu
V4: 1. Drop one patch for the test case to get time precisely as the overhead of getting time is amortized already in another patch. 2. Drop the ticket lock patch from this series as there are no dependency between them, the ticket lock patch was submitted separately: http://patchwork.dpd

[dpdk-dev] [PATCH v4 3/4] test/spinlock: amortize the cost of getting time

2019-01-14 Thread gavin hu
From: Gavin Hu Instead of getting timestamps per iteration, amortize its overhead can help getting more precise benchmarking results. Change-Id: I32642b181f883cd57bc1f7c4f56a4744b0438781 Signed-off-by: Gavin Hu Reviewed-by: Joyce Kong --- test/test/test_spinlock.c | 29 ---

[dpdk-dev] [PATCH v4 1/4] eal: fix clang compilation error on x86

2019-01-14 Thread gavin hu
From: Gavin Hu When CONFIG_RTE_FORCE_INTRINSICS is enabled for x86, the clang compilation error was: include/generic/rte_atomic.h:215:9: error: implicit declaration of function '__atomic_exchange_2' is invalid in C99 include/generic/rte_atomic.h:494

[dpdk-dev] [PATCH v4 2/4] test/spinlock: remove 1us delay for correct benchmarking

2019-01-14 Thread gavin hu
From: Gavin Hu The test is to benchmark the performance of spinlock by counting the number of spinlock acquire and release operations within the specified time. A typical pair of lock and unlock operations costs tens or hundreds of nano seconds, in comparison to this, delaying 1 us outside of the

<    1   2