Re: [ovs-dev] [PATCH 1/2] Make ByteQ safe for simultaneous producer/consumer

2020-05-12 Thread Yanqin Wei
Hi Anton, I am curious of what is the concurrency use case for the ByteQ lib. Because currently we found some UT cases failure on some weak memory model CPU, like arm and ppc. Besides this question, I have a few comments inline. Best Regards, Wei Yanqin > -Original Message- > From: d

Re: [ovs-dev] [PATCH] ovs rcu: update rcu pointer first

2020-06-01 Thread Yanqin Wei
Hi Haifeng, It looks indeed a risk for using ovs-rcu. A few comments inline. Best Regards, Wei Yanqin > -Original Message- > From: dev On Behalf Of Linhaifeng > Sent: Monday, June 1, 2020 11:13 AM > To: d...@openvswitch.org > Subject: [ovs-dev] [PATCH] ovs rcu: update rcu pointer first

[ovs-dev] [PATCH v1 2/6] dpif-netdev: add tunnel_valid flag to skip ip/ipv6 address comparison

2020-06-02 Thread Yanqin Wei
rformance for all kinds of traffic. Reviewed-by: Lijian Zhang Reviewed-by: Malvika Gupta Signed-off-by: Yanqin Wei --- lib/dpif-netdev.c | 14 +++--- lib/flow.c| 2 +- lib/packets.h | 46 -- 3 files changed, 52 insertions(+),

[ovs-dev] [PATCH v1 0/6] Memory access optimization for flow scalability of userspace datapath.

2020-06-02 Thread Yanqin Wei
flows 40% EMC disable 10% Malvika Gupta (1): [ovs-dev] dpif-netdev: Modify dfc_processing function to void function Yanqin Wei (5): netdev: avoid unnecessary packet batch refilling in netdev feature check dpif-netdev: add tunnel_valid flag to skip ip/ipv6 address comparison

[ovs-dev] [PATCH v1 4/6] dpif-netdev: skip flow hash calculation in case of smc disabled

2020-06-02 Thread Yanqin Wei
(flow->ufid) in smc disabled case. Reviewed-by: Lijian Zhang Reviewed-by: Malvika Gupta Reviewed-by: Lance Yang Signed-off-by: Yanqin Wei --- lib/dpif-netdev.c | 23 +-- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netde

[ovs-dev] [PATCH v1 6/6] dpif-netdev: Modify dfc_processing function to void function

2020-06-02 Thread Yanqin Wei
. Moreover, dp_packet_batch_is_empty() called after function return from dfc_processing itself calls dp_packet_batch_size to check if 'packets' array is empty. This patch modifies the dfc_processing function to a void function to remove the above code redundancy and cleans the code. Reviewed-by: Yanqi

[ovs-dev] [PATCH v1 1/6] netdev: avoid unnecessary packet batch refilling in netdev feature check

2020-06-02 Thread Yanqin Wei
Zhang Reviewed-by: Malvika Gupta Signed-off-by: Yanqin Wei --- lib/dp-packet.h | 12 lib/netdev.c| 13 ++--- 2 files changed, 18 insertions(+), 7 deletions(-) diff --git a/lib/dp-packet.h b/lib/dp-packet.h index 0430cca8e..1345f46e7 100644 --- a/lib/dp-packet.h +++ b/lib

[ovs-dev] [PATCH v1 3/6] dpif-netdev: improve emc lookup performance by contiguous storage of hash value.

2020-06-02 Thread Yanqin Wei
: Malvika Gupta Reviewed-by: Ruifeng Wang Signed-off-by: Yanqin Wei --- lib/dpif-netdev.c | 55 +++ 1 file changed, 32 insertions(+), 23 deletions(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index c94d5e8c7..3994f41e4 100644 --- a/lib/dpif

[ovs-dev] [PATCH v1 5/6] dpif-netdev: remove unnecessary key length calculation in fast path

2020-06-02 Thread Yanqin Wei
Key length is only useful for emc table. This patch moves the key length calculation into emc_change_entry for fast path performance. Reviewed-by: Lijian Zhang Reviewed-by: Malvika Gupta Reviewed-by: Ruifeng Wang Signed-off-by: Yanqin Wei --- lib/dpif-netdev.c | 10 ++ 1 file changed

Re: [ovs-dev] [PATCH] ovs rcu: update rcu pointer first

2020-06-02 Thread Yanqin Wei
mat:"CC: %an <%ae>%nFixes: %h (\"%s\")" \ --abbrev=12 COMMIT_REF" Best Regards, Wei Yanqin > -Original Message- > From: Linhaifeng > Sent: Tuesday, June 2, 2020 3:13 PM > To: Yanqin Wei ; d...@openvswitch.org > Cc: nd > Subject: RE: [P

Re: [ovs-dev] [PATCH v2] ovs rcu: update rcu pointer first

2020-06-02 Thread Yanqin Wei
> Sent: Wednesday, June 3, 2020 1:28 AM > To: Linhaifeng > Cc: Yanqin Wei ; d...@openvswitch.org; nd > ; Lilijun (Jerry) ; chenchanghu > ; Lichunhe > Subject: Re: [ovs-dev] [PATCH v2] ovs rcu: update rcu pointer first > > On Tue, Jun 02, 2020 at 07:27:59AM +, Linhaifeng w

Re: [ovs-dev] [PATCH v2] ovs rcu: update rcu pointer first

2020-06-02 Thread Yanqin Wei
Hi Ben, This patch is from Linhai, but I have the same concern about this. I will read ovs-rcu comments and feedback. Thanks for your time. Best Regards, Wei Yanqin > -Original Message- > From: Ben Pfaff > Sent: Wednesday, June 3, 2020 8:35 AM > To: Yanqin Wei > Cc:

Re: [ovs-dev] [PATCH v2] ovs rcu: update rcu pointer first

2020-06-03 Thread Yanqin Wei
original patch. Please help to correct. https://patchwork.ozlabs.org/project/openvswitch/patch/4099de2e54afad489356c6c9161d53339735a...@dggeml522-mbs.china.huawei.com/ Best Regards, Wei Yanqin > -Original Message- > From: Ben Pfaff > Sent: Wednesday, June 3, 2020 8:48 AM > To: Y

Re: [ovs-dev] [PATCH v1 0/6] Memory access optimization for flow scalability of userspace datapath.

2020-06-30 Thread Yanqin Wei
] dpif-netdev: add tunnel_valid flag to skip ip/ipv6 address comparison [ovs-dev][PATCH v1 3/6] dpif-netdev: improve emc lookup performance by contiguous storage of hash value. Any comments from anyone are appreciated. Best Regards, Wei Yanqin > -Original Message- > From: Yanq

Re: [ovs-dev] 10-25 packet drops every few (10-50) seconds TCP (iperf3)

2020-07-01 Thread Yanqin Wei
Hi Shahaji, Adding isb instruction can help rdtsc precise, which sync system counter to cntvct_el0. There is a patch in DPDK. https://patchwork.dpdk.org/patch/66561/ So it may be not related with intermittent drops you observed. Best Regards, Wei Yanqin > -Original Message- > From: dev

Re: [ovs-dev] 10-25 packet drops every few (10-50) seconds TCP (iperf3)

2020-07-02 Thread Yanqin Wei
:11 AM To: Yanqin Wei Cc: Flavio Leitner ; ovs-dev@openvswitch.org; nd ; Ilya Maximets ; Lee Reed ; Vinay Gupta ; Alex Barba Subject: Re: [ovs-dev] 10-25 packet drops every few (10-50) seconds TCP (iperf3) Hi Yanqin,  I added the patch you gave me to my script which runs a do nothing for loop

Re: [ovs-dev] 10-25 packet drops every few (10-50) seconds TCP (iperf3)

2020-07-06 Thread Yanqin Wei
degradation of multi-rings. Best Regards, Wei Yanqin From: Shahaji Bhosle Sent: Thursday, July 2, 2020 9:27 PM To: Yanqin Wei Cc: Flavio Leitner ; ovs-dev@openvswitch.org; nd ; Ilya Maximets ; Lee Reed ; Vinay Gupta ; Alex Barba Subject: Re: [ovs-dev] 10-25 packet drops every few (10-50

Re: [ovs-dev] [PATCH v1 0/6] Memory access optimization for flow scalability of userspace datapath.

2020-07-06 Thread Yanqin Wei
Regards, Wei Yanqin > > On Tue, Jun 30, 2020 at 2:26 AM Yanqin Wei wrote: > > > > Hi, every contributor > > > > These patches could significantly improve multi-flow throughput of > userspace datapath. If you feel it will take too much time to review all > patche

Re: [ovs-dev] [PATCH v1 0/6] Memory access optimization for flow scalability of userspace datapath.

2020-07-06 Thread Yanqin Wei
Hi William, > > On Tue, Jun 2, 2020 at 12:10 AM Yanqin Wei wrote: > > > > OVS userspace datapath is a program with heavy memory access. It needs > > to load/store a large number of memory, including packet header, > > metadata, EMC/SMC/DPCLS tables and so on. It

Re: [ovs-dev] [PATCH v1 2/6] dpif-netdev: add tunnel_valid flag to skip ip/ipv6 address comparison

2020-07-06 Thread Yanqin Wei
Hi Ilya, > > --- > > Hi. > First of all, thanks for working on performance improvements! Thanks, I saw some slides where OVS was used to compare flow scalability with other projects. It inspired me to optimize this code. > > However, this doesn't look as a clean patch. There are some trade-off

Re: [ovs-dev] 10-25 packet drops every few (10-50) seconds TCP (iperf3)

2020-07-06 Thread Yanqin Wei
1000LL Would you like to disable it if it is not necessary? Best Regards, Wei Yanqin From: Shahaji Bhosle Sent: Monday, July 6, 2020 8:24 PM To: Yanqin Wei Cc: Flavio Leitner ; ovs-dev@openvswitch.org; nd ; Ilya Maximets ; Lee Reed ; Vinay Gupta ; Alex Barba Subject: Re: [ovs-dev] 10-25 packet

Re: [ovs-dev] 10-25 packet drops every few (10-50) seconds TCP (iperf3)

2020-07-06 Thread Yanqin Wei
, 2020 12:23 PM To: Yanqin Wei Cc: Flavio Leitner ; ovs-dev@openvswitch.org; nd ; Ilya Maximets ; Lee Reed ; Vinay Gupta ; Alex Barba Subject: Re: [ovs-dev] 10-25 packet drops every few (10-50) seconds TCP (iperf3) Thanks Yangin, What does this define mean? Every 10 second some kind of book

Re: [ovs-dev] 10-25 packet drops every few (10-50) seconds TCP (iperf3)

2020-07-06 Thread Yanqin Wei
The 2nd one is another periodic task for dpcls ranking. From: Yanqin Wei Sent: Tuesday, July 7, 2020 1:19 PM To: Shahaji Bhosle Cc: Flavio Leitner ; ovs-dev@openvswitch.org; nd ; Ilya Maximets ; Lee Reed ; Vinay Gupta ; Alex Barba Subject: RE: [ovs-dev] 10-25 packet drops every few (10-50

Re: [ovs-dev] [PATCH v1 0/6] Memory access optimization for flow scalability of userspace datapath.

2020-07-08 Thread Yanqin Wei
Hi Harry, > > > > OVS userspace datapath is a program with heavy memory access. It needs > > to load/store a large number of memory, including packet header, > > metadata, EMC/SMC/DPCLS tables and so on. It causes a lot of cache > > line missing and refilling, which has a great impact on flow > >

Re: [ovs-dev] [PATCH v1 2/6] dpif-netdev: add tunnel_valid flag to skip ip/ipv6 address comparison

2020-07-10 Thread Yanqin Wei
Hi Ilya, > > > >>> --- > >> > >> Hi. > >> First of all, thanks for working on performance improvements! > > Thanks, I saw some slides where OVS was used to compare flow scalability > with other projects. It inspired me to optimize this code. > > > >> > >> However, this doesn't look as a clean patc

[ovs-dev] [PATCH v1 1/1] hash: Enable hash_bytes128 optimization for aarch64.

2019-02-27 Thread Yanqin Wei
rm. It was observed that 50% performance improvement in thunderX2 and 40% improvement in TaiShan(Cortex-A72). Signed-off-by: Yanqin Wei --- lib/hash.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/hash.c b/lib/hash.c index c64f25e..06f8339 100644 --- a/lib/hash.c +++ b/

[ovs-dev] [PATCH v1] netdev-dpdk: dfc_process optimization by prefetching EMC entry.

2019-03-11 Thread Yanqin Wei
need 2 cache lines in most modern CPU. Performance test was run in some arm platform. 1000/1 flows NIC2NIC test achieved around 10% throughput improvement in thunderX2(aarch64 platform). Signed-off-by: Yanqin Wei Reviewed-by: Gavin Hu --- lib/dpif-netdev.c | 81

[ovs-dev] [PATCH v2] netdev-dpdk: dfc_process optimization by

2019-03-11 Thread Yanqin Wei
need 2 cache lines in most modern CPU. Performance test was run in some arm platform. 1000/1 flows NIC2NIC test achieved around 10% throughput improvement in thunderX2(aarch64 platform). Signed-off-by: Yanqin Wei Reviewed-by: Gavin Hu --- lib/dpif-netdev.c | 80

[ovs-dev] [PATCH v3] dpif-netdev: dfc_process optimization by prefetching EMC entry.

2019-03-12 Thread Yanqin Wei
need 2 cache lines in most modern CPU. Performance test was run in some arm platform. 1000/1 flows NIC2NIC test achieved around 10% throughput improvement in thunderX2(aarch64 platform). Signed-off-by: Yanqin Wei Reviewed-by: Gavin Hu --- lib/dpif-netdev.c | 80

Re: [ovs-dev] [PATCH v2 2/3] travis: Move x86-only addon packages to linux-prepare.sh

2020-02-05 Thread Yanqin Wei
Yanqin > -Original Message- > From: Lance Yang (Arm Technology China) > Sent: Tuesday, December 17, 2019 9:54 AM > To: Ilya Maximets ; dwilder > Cc: ovs-dev@openvswitch.org; b...@ovn.org; Yanqin Wei (Arm Technology > China) ; Gavin Hu (Arm Technology China) >

Re: [ovs-dev] [PATCH v2 3/3] travis: Enable OvS Travis CI for arm

2020-02-05 Thread Yanqin Wei
Yanqin > -Original Message- > From: Lance Yang > Sent: Tuesday, January 21, 2020 9:06 AM > To: Ilya Maximets ; ovs-dev@openvswitch.org > Cc: b...@ovn.org; Yanqin Wei ; dwil...@us.ibm.com; > Gavin Hu ; Ruifeng Wang ; > Jieqiang Wang ; Malvika Gupta > ; nd > Subje

Re: [ovs-dev] OVS release - 2.13

2020-02-11 Thread Yanqin Wei
Hi Ben, There is a patch to enable travis CI on Arm. Is it possible to be put into 2.13? https://patchwork.ozlabs.org/patch/1204923/ Best Regards, Wei Yanqin > -Original Message- > From: dev On Behalf Of Ben Pfaff > Sent: Tuesday, February 11, 2020 1:44 AM > To: d...@openvswitch.org >

Re: [ovs-dev] OVS release - 2.13

2020-02-12 Thread Yanqin Wei
, we hope it can be enabled soon to prevent new issue introduced during development. Best Regards, Wei Yanqin > -Original Message- > From: Ben Pfaff > Sent: Thursday, February 13, 2020 12:23 AM > To: Ilya Maximets > Cc: Yanqin Wei ; d...@openvswitch.org; nd > ; Malvika

[ovs-dev] [PATCH v1] netdev: fix partial offloading test cases failure

2020-02-24 Thread Yanqin Wei
: Lijian Zhang Signed-off-by: Yanqin Wei --- lib/netdev-dummy.c| 5 - lib/netdev-offload.c | 11 +++ lib/netdev-provider.h | 1 + lib/netdev.c | 1 + 4 files changed, 17 insertions(+), 1 deletion(-) diff --git a/lib/netdev-dummy.c b/lib/netdev-dummy.c index 71df29184

[ovs-dev] [PATCH v1] lib: use acquire-release semantics for pvector size

2020-02-24 Thread Yanqin Wei
this is implemented by one-way barrier instead of two-way memory fence. Reviewed-by: Gavin Hu Reviewed-by: Lijian Zhang Signed-off-by: Yanqin Wei --- lib/pvector.c | 14 +++--- lib/pvector.h | 12 +++- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/lib/pvector.c b

Re: [ovs-dev] [PATCH v1] netdev: fix partial offloading test cases failure

2020-02-25 Thread Yanqin Wei
Hi Ilya, > -Original Message- > From: Ilya Maximets > Sent: Tuesday, February 25, 2020 5:25 PM > To: Yanqin Wei ; d...@openvswitch.org > Cc: nd ; Lijian Zhang ; Gavin Hu > ; i.maxim...@ovn.org > Subject: Re: [ovs-dev] [PATCH v1] netdev: fix partial offloading

Re: [ovs-dev] [PATCH v1] lib: use acquire-release semantics for pvector size

2020-02-25 Thread Yanqin Wei
Hi Ilya, > -Original Message- > From: Ilya Maximets > Sent: Tuesday, February 25, 2020 5:54 PM > To: Yanqin Wei ; d...@openvswitch.org > Cc: Lijian Zhang ; Gavin Hu ; nd > ; i.maxim...@ovn.org; Ben Pfaff > Subject: Re: [ovs-dev] [PATCH v1] lib: use acquire-

Re: [ovs-dev] [PATCH v1] netdev: fix partial offloading test cases failure

2020-02-25 Thread Yanqin Wei
> -Original Message- > From: Ilya Maximets > Sent: Tuesday, February 25, 2020 6:31 PM > To: Yanqin Wei ; Ilya Maximets > ; d...@openvswitch.org > Cc: nd ; Lijian Zhang ; Gavin Hu > > Subject: Re: [ovs-dev] [PATCH v1] netdev: fix partial offloading test cases &

[ovs-dev] [PATCH v2] lib: use acquire-release semantics for pvector size

2020-02-25 Thread Yanqin Wei
this is implemented by one-way barrier instead of two-way memory fence. Reviewed-by: Gavin Hu Reviewed-by: Lijian Zhang Signed-off-by: Yanqin Wei --- lib/pvector.c | 16 +--- lib/pvector.h | 10 ++ 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/lib/pvector.c b

[ovs-dev] [PATCH v2] netdev: fix partial offloading test cases failure

2020-02-25 Thread Yanqin Wei
his patch. Suggested-by: Ilya Maximets Reviewed-by: Gavin Hu Reviewed-by: Lijian Zhang Signed-off-by: Yanqin Wei --- tests/dpif-netdev.at | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/dpif-netdev.at b/tests/dpif-netdev.at index 0aeb4e788..12e468744 100644 --- a/te

[ovs-dev] [PATCH v3] lib: use acquire-release semantics for pvector size

2020-02-27 Thread Yanqin Wei
this is implemented by one-way barrier instead of two-way memory fence. Reviewed-by: Gavin Hu Reviewed-by: Lijian Zhang Signed-off-by: Yanqin Wei --- lib/pvector.c | 18 +++--- lib/pvector.h | 12 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/lib

Re: [ovs-dev] [PATCH v2] lib: use acquire-release semantics for pvector size

2020-02-27 Thread Yanqin Wei
Hi Ilya, V3 has been updated based on your comments. Thanks. Best Regards, Wei Yanqin > -Original Message- > From: Ilya Maximets > Sent: Wednesday, February 26, 2020 9:41 PM > To: Yanqin Wei ; d...@openvswitch.org > Cc: nd ; Lijian Zhang ; Gavin Hu > ; i.maxim...@ovn

[ovs-dev] [PATCH v4] lib: use acquire-release semantics for pvector size

2020-03-03 Thread Yanqin Wei
this is implemented by one-way barrier instead of two-way memory fence. Fixes: fe7cfa5c3f19 ("lib/pvector: Non-intrusive RCU priority vector.") Reviewed-by: Gavin Hu Reviewed-by: Lijian Zhang Signed-off-by: Yanqin Wei --- lib/pvector.c | 18 +++--- lib/pvector.h | 13 ++

Re: [ovs-dev] [PATCH v3] lib: use acquire-release semantics for pvector size

2020-03-03 Thread Yanqin Wei
Hi Ilya, Thanks for your comments. V4 has been updated, could you please check it again? https://patchwork.ozlabs.org/patch/1248440/ Best Regards, Wei Yanqin > -Original Message- > From: Ilya Maximets > Sent: Friday, February 28, 2020 9:40 PM > To: Yanqin Wei ; d...@ope

Re: [ovs-dev] [PATCH v2 3/3] travis: Enable OvS Travis CI for arm

2020-03-11 Thread Yanqin Wei
; From: Lance Yang > Sent: Tuesday, January 21, 2020 9:06 AM > To: Ilya Maximets ; ovs-dev@openvswitch.org > Cc: b...@ovn.org; Yanqin Wei ; dwil...@us.ibm.com; > Gavin Hu ; Ruifeng Wang ; > Jieqiang Wang ; Malvika Gupta > ; nd > Subject: RE: [ovs-dev] [PATCH v2 3/3] travis: E

[ovs-dev] [PATCH v1 2/3] dpif-netdev: improve partial offloding datapath by sda-table lookup

2020-03-12 Thread Yanqin Wei
Cmap_find is a hot spot in partial offloading datapath. This patch applies sda-table for mark2flow lookup. The throughput uplift is more than 10% in case of single flow and 20% with 1000 mega flows. Reviewed-by: Gavin Hu Reviewed-by: Malvika Gupta Signed-off-by: Yanqin Wei --- lib/dpif

[ovs-dev] [PATCH v1 1/3] lib: implement scalable direct address table for fast lookup

2020-03-12 Thread Yanqin Wei
eviewed-by: Malvika Gupta Signed-off-by: Yanqin Wei --- lib/automake.mk | 2 + lib/sda-table.c | 166 lib/sda-table.h | 127 3 files changed, 295 insertions(+) create mode 100644 lib/sda-table.c create mode 1006

[ovs-dev] [PATCH v1 3/3] tests/test-sda-table: add check test for sda-table.

2020-03-12 Thread Yanqin Wei
Add check test for sda-table lookup, insertion and deletion. Reviewed-by: Gavin Hu Reviewed-by: Malvika Gupta Signed-off-by: Yanqin Wei --- tests/automake.mk | 3 +- tests/test-sda-table.c | 197 + 2 files changed, 199 insertions(+), 1 deletion

[ovs-dev] [PATCH v1 0/3] improve mark2flow lookup for partial offloading datapath

2020-03-12 Thread Yanqin Wei
ookup. The throughput uplift is more than 10% in case of single flow and 20% with >1000 mega flow. Yanqin Wei (3): lib: implement scalable direct address table for fast lookup dpif-netdev: improve partial offloding datapath by sda-table lookup tests/test-sda-table: add check test for sda

Re: [ovs-dev] [PATCH v2 3/3] travis: Enable OvS Travis CI for arm

2020-03-12 Thread Yanqin Wei
Thanks for the feedback. Replied in line. > -Original Message- > From: Ilya Maximets > Sent: Thursday, March 12, 2020 12:20 AM > To: Yanqin Wei ; Ilya Maximets > ; ovs-dev@openvswitch.org; b...@ovn.org; Lance Yang > > Cc: dwil...@us.ibm.com; Gavin Hu ; Ruifeng W

Re: [ovs-dev] [PATCH v2 1/2] dpif-netdev: Expand the meter capacity using cmap

2020-03-15 Thread Yanqin Wei
Hi Xiangxia, The meter id is allocated by id_pool, which can always return the lowest available id. There is a light scalable data struct which supports direct address lookup. It can achieve several times performance improvement than cmap_find. And it has not copy memory when expanding. https:

Re: [ovs-dev] [PATCH v2 3/3] travis: Enable OvS Travis CI for arm

2020-03-19 Thread Yanqin Wei
Hi Ilya, The patch is updated for reducing Arm CI running time. Do you think if the time increment is acceptable? https://patchwork.ozlabs.org/patch/1258100/ Best Regards, Wei Yanqin > -Original Message- > From: Yanqin Wei > Sent: Thursday, March 12, 2020 5:39 PM > To: I

[ovs-dev] [PATCH v1 0/2] improve cmap read-write concurrency

2019-11-17 Thread Yanqin Wei
1. add thread fence to ensure hash setting safe. 2. make reader not blocked by writer. Yanqin Wei (2): [ovs-dev] [PATCH 1/2] cmap: add thread fence for slot update [ovs-dev] [PATCH 2/2] cmap: non-blocking cmap lookup lib/cmap.c | 159 ++--- 1

[ovs-dev] [PATCH v1 1/2] cmap: add thread fence for slot update

2019-11-17 Thread Yanqin Wei
bucket update in the cmap lib is protected by a counter. But hash setting is possible to be moved before counter update. This patch fix this issue. Reviewed-by: Ola Liljedahl Reviewed-by: Gavin Hu Signed-off-by: Yanqin Wei --- lib/cmap.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion

[ovs-dev] [PATCH v1 2/2] cmap: non-blocking cmap lookup

2019-11-17 Thread Yanqin Wei
se counter and bitmap share one 32 bits variable. No additional load/store for reader and writer. Reviewed-by: Ola Liljedahl Reviewed-by: Gavin Hu Signed-off-by: Yanqin Wei --- lib/cmap.c | 157 ++--- 1 file changed, 101 insertions(+), 56 deletion

[ovs-dev] [PATCH v1] netdev: use acquire-release semantics for change_seq in netdev

2019-11-17 Thread Yanqin Wei
"rxq_enabled" of netdev is writen in the vhost thread and read by pmd thread once it observes 'change_seq' is updated. This patch is to keep order on aarch64 or other weak memory model CPU to ensure 'rxq_enabled' is observed before 'change_seq'. Reviewed

[ovs-dev] [PATCH v2] netdev: use acquire-release semantics for change_seq in netdev

2019-11-25 Thread Yanqin Wei
"rxq_enabled" of netdev is writen in the vhost thread and read by pmd thread once it observes 'change_seq' is updated. This patch is to keep order on aarch64 or other weak memory model CPU to ensure 'rxq_enabled' is observed before 'change_seq'. Reviewed

[ovs-dev] [PATCH v4 0/2] dfc_process optimization by prefetching EMC entry

2019-06-03 Thread Yanqin Wei
only under the medium number of flows scenario. Yanqin Wei (2): dpif-netdev: add EMC entries counter dpif-netdev: dfc_process performance optimization by prefetching EMC entry. lib/dpif-netdev.c | 88 +++ 1 file changed, 57 insertions

[ovs-dev] [PATCH v4 1/2] dpif-netdev: add EMC entries counter

2019-06-03 Thread Yanqin Wei
Implement entries counter for EMC. It could be used for improvement for EMC lookup. Signed-off-by: Yanqin Wei Reviewed-by: Gavin Hu --- lib/dpif-netdev.c | 22 ++ 1 file changed, 14 insertions(+), 8 deletions(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index

[ovs-dev] [PATCH v4 2/2] dpif-netdev: dfc_process performance optimization by prefetching EMC entry.

2019-06-03 Thread Yanqin Wei
ent in 100k flows RFC2544 test. And low number of flows has almost no performance impact. Signed-off-by: Yanqin Wei Reviewed-by: Gavin Hu --- lib/dpif-netdev.c | 66 --- 1 file changed, 43 insertions(+), 23 deletions(-) mode change 100644 =>

[ovs-dev] [PATCH v1] util: implement count_1bits with Neon intrinsics or gcc built-in for aarch64.

2019-06-13 Thread Yanqin Wei
s run in two aarch64 machines. In the NIC2NIC test, one tuple dpcls lookup case achieves around 4% throughput improvement and 10(average) tuples case achieves around 5% improvement. Tested-by: Malvika Gupta Signed-off-by: Yanqin Wei --- lib/util.h | 7 ++- 1 file changed, 6 insertions(+)

[ovs-dev] [PATCH v1] flow: miniflow_extract metadata branchless optimization

2019-08-22 Thread Yanqin Wei
P2P forwarding cases. Change-Id: I5d606afb52bfa68e8afa6f886d69b9665cdad51a Reviewed-by: Gavin Hu Signed-off-by: Yanqin Wei --- lib/dpif-netdev.c | 13 +++--- lib/flow.c| 116 -- lib/flow.h| 2 + 3 files changed, 79 inserti

[ovs-dev] [PATCH v1] flow: fix incorrect padding length checking and combine branch in ipv6_sanity_check

2019-08-22 Thread Yanqin Wei
The padding length is (packet size - ipv6 header length - ipv6 plen). This patch fixes incorrect ipv6 size checking and improves it by combining branch. Change-Id: I7a6212872f89ef9c11e3fbcec4dbecbcc6e89c47 Reviewed-by: Gavin Hu Signed-off-by: Yanqin Wei --- lib/flow.c | 10 -- 1 file

[ovs-dev] [PATCH v1 ] flow: save "vlan_hdrs" memset for untagged traffic

2019-08-22 Thread Yanqin Wei
: I6d503c904d0354c94882196d7720a574b2d07e44 Reviewed-by: Gavin Hu Signed-off-by: Yanqin Wei --- lib/flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/flow.c b/lib/flow.c index 1b21f51..4d895e5 100644 --- a/lib/flow.c +++ b/lib/flow.c @@ -343,7 +343,6 @@ parse_vlan

[ovs-dev] [PATCH v2] flow: miniflow_extract metadata branchless optimization

2019-08-22 Thread Yanqin Wei
P2P forwarding cases. Reviewed-by: Gavin Hu Signed-off-by: Yanqin Wei --- lib/dpif-netdev.c | 13 +++--- lib/flow.c| 116 -- lib/flow.h| 2 + 3 files changed, 79 insertions(+), 52 deletions(-) diff --git a/lib/dpif-netdev.c

[ovs-dev] [PATCH v2] flow: fix incorrect padding length checking and combine branch in ipv6_sanity_check

2019-08-22 Thread Yanqin Wei
The padding length is (packet size - ipv6 header length - ipv6 plen). This patch fixes incorrect ipv6 size checking and improves it by combining branch. Reviewed-by: Gavin Hu Signed-off-by: Yanqin Wei --- lib/flow.c | 10 -- 1 file changed, 4 insertions(+), 6 deletions(-) diff --git

[ovs-dev] [PATCH v2 ] flow: save "vlan_hdrs" memset for untagged traffic

2019-08-22 Thread Yanqin Wei
-by: Gavin Hu Signed-off-by: Yanqin Wei --- lib/flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/flow.c b/lib/flow.c index 1b21f51..4d895e5 100644 --- a/lib/flow.c +++ b/lib/flow.c @@ -343,7 +343,6 @@ parse_vlan(const void **datap, size_t *sizep, union flow_vlan_hdr

[ovs-dev] [PATCH v3] flow: fix incorrect padding length checking in ipv6_sanity_check

2019-09-02 Thread Yanqin Wei
The padding length is (packet size - ipv6 header length - ipv6 plen). This patch fixes incorrect padding size checking in ipv6_sanity_check. Reviewed-by: Gavin Hu Signed-off-by: Yanqin Wei --- lib/flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/flow.c b/lib

[ovs-dev] [PATCH v1 1/1] hash: Implement hash for aarch64 using CRC32c intrinsics.

2019-01-25 Thread Yanqin Wei (Arm Technology China)
. Test bed: aarch64(Centriq 2400) platform. Test case: DPCLS forwarding(disable EMC + avg 10 subtable lookups) Test result: improve around 10%. Signed-off-by: Yanqin Wei --- lib/automake.mk| 1 + lib/hash-aarch64.h | 151 +

[ovs-dev] [PATCH v1 1/1] hash: Enable hash_bytes128 optimization for aarch64.

2019-02-17 Thread Yanqin Wei (Arm Technology China)
m. It was observed that 50% performance improvement in thunderX2 and 40% improvement in TaiShan(Cortex-A72). Signed-off-by: Yanqin Wei --- lib/hash.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/hash.c b/lib/hash.c index c64f25e..06f8339 100644 --- a/lib/hash.c +++ b/

Re: [ovs-dev] [PATCH v1 1/1] hash: Enable hash_bytes128 optimization for aarch64.

2019-02-26 Thread Yanqin Wei (Arm Technology China)
Hi Ben, Sorry for the format issue. I will resubmit it by "git send-email". Best Regards, Wei Yanqin -Original Message- From: Ben Pfaff Sent: Saturday, February 23, 2019 5:03 AM To: Yanqin Wei (Arm Technology China) Cc: d...@openvswitch.org Subject: Re: [ovs-dev] [PATCH v1

Re: [ovs-dev] [ovs-dev, v2] netdev-dpdk: dfc_process optimization by

2019-03-12 Thread Yanqin Wei (Arm Technology China)
Thanks for the comments. It will be fixed in the following patch v3. -Original Message- From: Ilya Maximets Sent: Tuesday, March 12, 2019 9:31 PM To: Yanqin Wei (Arm Technology China) ; d...@openvswitch.org Cc: nd ; Gavin Hu (Arm Technology China) Subject: Re: [ovs-dev,v2] netdev-dpdk

Re: [ovs-dev] [PATCH v3] dpif-netdev: dfc_process optimization by prefetching EMC entry.

2019-03-22 Thread Yanqin Wei (Arm Technology China)
Hi , OVS Maintainers, Could you help to have a look at this patch? Thanks a lot. Best Regards, Wei Yanqin -Original Message- From: Yanqin Wei Sent: Wednesday, March 13, 2019 1:28 PM To: d...@openvswitch.org Cc: nd ; Gavin Hu (Arm Technology China) ; Yanqin Wei (Arm Technology China

Re: [ovs-dev] [PATCH v3] dpif-netdev: dfc_process optimization by prefetching EMC entry.

2019-03-24 Thread Yanqin Wei (Arm Technology China)
From: Ian Stokes Sent: Monday, March 25, 2019 6:16 AM To: Yanqin Wei (Arm Technology China) ; d...@openvswitch.org Cc: nd ; Gavin Hu (Arm Technology China) ; Ilya Maximets Subject: Re: [ovs-dev] [PATCH v3] dpif-netdev: dfc_process optimization by prefetching EMC entry. On 3/13/2019 5:27 AM, Y

Re: [ovs-dev] [PATCH v3] dpif-netdev: dfc_process optimization by prefetching EMC entry.

2019-03-25 Thread Yanqin Wei (Arm Technology China)
even in worst case(EMC/SMC disable & no hash-feature/load balance enable). Best Regards, Wei Yanqin -Original Message- From: Ilya Maximets Sent: Friday, March 22, 2019 9:12 PM To: Yanqin Wei (Arm Technology China) ; d...@openvswitch.org; ian.sto...@intel.com Cc: nd Subject: Re:

Re: [ovs-dev] [PATCH v3] dpif-netdev: dfc_process optimization by prefetching EMC entry.

2019-03-31 Thread Yanqin Wei (Arm Technology China)
will try to improve it . For 1-8 flows cases, it should be not very important because of the lack of actual deployment. Best Regards, Wei Yanqin -Original Message- From: Ilya Maximets Sent: Monday, April 1, 2019 2:16 PM To: Yanqin Wei (Arm Technology China) ; d...@openvswitch.org

Re: [ovs-dev] [PATCH v3] dpif-netdev: dfc_process optimization by prefetching EMC entry.

2019-04-01 Thread Yanqin Wei (Arm Technology China)
avoided by configuration. Is my understanding correct? Best Regards, Wei Yanqin -Original Message- From: Ilya Maximets Sent: Monday, April 1, 2019 3:15 PM To: Yanqin Wei (Arm Technology China) ; d...@openvswitch.org; ian.sto...@intel.com Cc: nd ; Gavin Hu (Arm Technology China) Subject

Re: [ovs-dev] [PATCH ] travis: support ppc64le builds

2019-10-30 Thread Yanqin Wei (Arm Technology China)
Hi, We are working to support arm64 build for ovs travis CI. It is indeed to use arch: arm64 to choose cpu architecture, because travis has provided native arm64 option now. But in this patch it seems ppc64 builds run on the ppc-VM + x86 native machine. Currently arm only select a part of jo

Re: [ovs-dev] [PATCH ] travis: support ppc64le builds

2019-11-02 Thread Yanqin Wei (Arm Technology China)
Yanqin -Original Message- From: dwilder Sent: Saturday, November 2, 2019 1:09 AM To: Yanqin Wei (Arm Technology China) Cc: Ilya Maximets ; ovs-dev@openvswitch.org; wil...@us.ibm.com; nd Subject: Re: RE: [ovs-dev] [PATCH ] travis: support ppc64le builds On 2019-10-30 19:04, Yanqin Wei

Re: [ovs-dev] [PATCH ] travis: support ppc64le builds

2019-11-07 Thread Yanqin Wei (Arm Technology China)
Hi David, I am sorry to reply this late. Yes, if travis support this configuration, it should be a good solution for me. Best regards, Wei Yanqin -Original Message- From: dwilder Sent: Wednesday, November 6, 2019 4:32 AM To: Yanqin Wei (Arm Technology China) Cc: Ilya Maximets ; ovs

Re: [ovs-dev] [PATCH v3] travis: support ppc64le builds

2019-11-08 Thread Yanqin Wei (Arm Technology China)
Hi David > -Original Message- > From: David Wilder > Sent: Thursday, November 7, 2019 3:21 AM > To: ovs-dev@openvswitch.org > Cc: i.maxim...@ovn.org; b...@ovn.org; Yanqin Wei (Arm Technology China) > ; wil...@us.ibm.com > Subject: [PATCH v3] travis: support ppc64le b

Re: [ovs-dev] [PATCH v1 2/2] cmap: non-blocking cmap lookup

2019-11-18 Thread Yanqin Wei (Arm Technology China)
e found in anther candidate bucket. Best Regards, Wei Yanqin > -Original Message- > From: Ilya Maximets > Sent: Tuesday, November 19, 2019 12:06 AM > To: Ola Liljedahl ; i.maxim...@ovn.org; Yanqin Wei > (Arm Technology China) ; ovs-dev@openvswitch.org > Cc: Gavin Hu (Arm

Re: [ovs-dev] [bug-report] bfd decay unit case failure

2019-11-22 Thread Yanqin Wei (Arm Technology China)
Hi Ben, This issue is difficult to reproduce in local machine. We will try to do it. Could you suggest the log we need to collect or enable? Best Regards, Wei Yanqin > -Original Message- > From: dev On Behalf Of Ben Pfaff > Sent: Friday, November 22, 2019 1:34 AM > To: Lance Yang (Arm

Re: [ovs-dev] [PATCH v1 2/4] travis: Move x86-only addon packages

2019-11-22 Thread Yanqin Wei (Arm Technology China)
Hi Ilya, Reply inline. Best Regards, Wei Yanqin > -Original Message- > From: dev On Behalf Of Ilya Maximets > Sent: Friday, November 22, 2019 3:30 AM > To: Lance Yang (Arm Technology China) ; > d...@openvswitch.org; ovs-dev@openvswitch.org > Cc: Jieqiang Wang (Arm Technology China) ; >

Re: [ovs-dev] [PATCH v1] netdev: use acquire-release semantics for change_seq in netdev

2019-11-25 Thread Yanqin Wei (Arm Technology China)
age- > From: Ben Pfaff > Sent: Tuesday, November 26, 2019 5:54 AM > To: Yanqin Wei (Arm Technology China) > Cc: d...@openvswitch.org; ovs-dev@openvswitch.org; nd ; > Gavin Hu (Arm Technology China) > Subject: Re: [ovs-dev] [PATCH v1] netdev: use acquire-release semantic

Re: [ovs-dev] [PATCH] dpif-netdev-perf: aarch64 support for accurate timing update of TSC cycle counter

2019-11-26 Thread Yanqin Wei (Arm Technology China)
is portable to all aarch64 > > architectures and has been verified on an 64-bit arm server. > > > > Suggested-by: Yanqin Wei > > Signed-off-by: Malvika Gupta > > --- > > Thanks for the patch! > > Are you trying to use AF_XDP on aarch64? Asking becaus

Re: [ovs-dev] [PATCHv9] netdev-afxdp: add new netdev type for AF_XDP.

2019-05-26 Thread Yanqin Wei (Arm Technology China)
Hi William, I think the main objective of this patch is to introduce AF_XDP socket for OVS userspace datapath. This is an alternative to DPDK PMD library. Is it possible to continue using other DPDK libraries before XDP provides the corresponding functionality? Best Regards, Wei Yanqin

[ovs-dev] OVS compiling issue(gcc version 6.5.0 )

2019-06-03 Thread Yanqin Wei (Arm Technology China)
Hi, I am trying to compile OVS(master branch) via gcc 6.5.0, but there is gcc option error. gcc: error: unrecognized command line option '-Wmultistatement-macros'; did you mean '-Wunused-macros'? My question is which versions of GCC are supported by OVS. Is it a bug of OVS compiling? The compi

Re: [ovs-dev] OVS compiling issue(gcc version 6.5.0 )

2019-06-04 Thread Yanqin Wei (Arm Technology China)
your support. Best Regards, Wei Yanqin -Original Message- From: Ben Pfaff Sent: Tuesday, June 4, 2019 7:11 AM To: Yanqin Wei (Arm Technology China) Cc: ovs-disc...@openvswitch.org; d...@openvswitch.org Subject: Re: [ovs-dev] OVS compiling issue(gcc version 6.5.0 ) On Mon, Jun 03, 2019

Re: [ovs-dev] [PATCH v2] flow: fix incorrect padding length checking and combine branch in ipv6_sanity_check

2019-08-29 Thread Yanqin Wei (Arm Technology China)
on in this patch. What do you think of it? Best Regards, Wei Yanqin -Original Message- From: Ben Pfaff Sent: Thursday, August 29, 2019 5:58 AM To: Yanqin Wei (Arm Technology China) Cc: d...@openvswitch.org; nd ; Gavin Hu (Arm Technology China) Subject: Re: [ovs-dev] [PATCH v2] flow:

Re: [ovs-dev] [PATCH v2] flow: miniflow_extract metadata branchless optimization

2019-08-29 Thread Yanqin Wei (Arm Technology China)
data-oriented and well-defined flag to bypass some time-consuming handling, it can improve performance a lot. Best Regards, Wei Yanqin -Original Message- From: Ben Pfaff Sent: Thursday, August 29, 2019 6:11 AM To: Yanqin Wei (Arm Technology China) ; Ilya Maximets Cc: d

Re: [ovs-dev] [PATCH v2] flow: miniflow_extract metadata branchless optimization

2019-08-30 Thread Yanqin Wei (Arm Technology China)
Yanqin -Original Message- From: Ilya Maximets Sent: Thursday, August 29, 2019 9:46 PM To: Yanqin Wei (Arm Technology China) ; Ben Pfaff Cc: d...@openvswitch.org; nd ; Gavin Hu (Arm Technology China) Subject: Re: [ovs-dev] [PATCH v2] flow: miniflow_extract metadata branchless

Re: [ovs-dev] SIGILL ovs branch-2.12/arm64/DPDK

2019-09-04 Thread Yanqin Wei (Arm Technology China)
Hi James, CRC32 is not a mandatory feature for Armv8.0. What is the arm64 CPU used in your platform? I'm not sure if it's necessary to use mandatory feature (neon) to optimize hash libraries, because I thought most arm64 CPUs supported CRC32. Best Regards, Wei Yanqin -Original Message-

Re: [ovs-dev] SIGILL ovs branch-2.12/arm64/DPDK

2019-09-04 Thread Yanqin Wei (Arm Technology China)
Understood. Thanks for the information. Best Regards, Wei Yanqin From: James Page Sent: Wednesday, September 4, 2019 5:45 PM To: Yanqin Wei (Arm Technology China) Cc: Ilya Maximets ; ovs-dev@openvswitch.org Subject: Re: [ovs-dev] SIGILL ovs branch-2.12/arm64/DPDK Hi On Wed, Sep 4, 2019 at 10

Re: [ovs-dev] SIGILL ovs branch-2.12/arm64/DPDK

2019-09-05 Thread Yanqin Wei (Arm Technology China)
- From: Ilya Maximets Sent: Wednesday, September 4, 2019 8:46 PM To: Yanqin Wei (Arm Technology China) ; James Page Cc: ovs-dev@openvswitch.org Subject: Re: [ovs-dev] SIGILL ovs branch-2.12/arm64/DPDK BTW, I submitted a bug to DPDK: https://bugs.dpdk.org/show_bug.cgi?id=344 Best regards, Ilya

Re: [ovs-dev] SIGILL ovs branch-2.12/arm64/DPDK

2019-09-05 Thread Yanqin Wei (Arm Technology China)
Hi Ilya, Thanks for the clarification. It looks application is strong couple with DPDK. I will follow your discussion under this bug. Best Regards, Wei Yanqin -Original Message- From: Ilya Maximets Sent: Thursday, September 5, 2019 3:41 PM To: Yanqin Wei (Arm Technology China) ; James

Re: [ovs-dev] SIGILL ovs branch-2.12/arm64/DPDK

2019-09-05 Thread Yanqin Wei (Arm Technology China)
Thanks James, I can understand the root cause now. Best Regards, Wei Yanqin From: James Page Sent: Thursday, September 5, 2019 3:42 PM To: Yanqin Wei (Arm Technology China) Cc: Ilya Maximets ; ovs-dev@openvswitch.org Subject: Re: [ovs-dev] SIGILL ovs branch-2.12/arm64/DPDK On Thu, Sep 5, 2019