[PATCH] kni: fix possible alloc_q starvation when mbufs are exhausted

2022-11-08 Thread Yangchao Zhou
e397 ("kni: optimize Rx burst") Cc: hem...@freescale.com Cc: sta...@dpdk.org Signed-off-by: Yangchao Zhou --- lib/kni/rte_kni.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/kni/rte_kni.c b/lib/kni/rte_kni.c index 8ab6c47153..265c5262f7 100644 --- a/lib/kni

[PATCH v2] kni: fix possible alloc_q starvation when mbufs are exhausted

2022-11-08 Thread Yangchao Zhou
e397 ("kni: optimize Rx burst") Cc: hem...@freescale.com Cc: sta...@dpdk.org Signed-off-by: Yangchao Zhou --- lib/kni/rte_kni.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/kni/rte_kni.c b/lib/kni/rte_kni.c index 8ab6c47153..ea9a507de3 100644 --- a/lib

[PATCH v3] kni: fix possible alloc_q starvation when mbufs are exhausted

2022-12-29 Thread Yangchao Zhou
Fixes: 3e12a98fe397 ("kni: optimize Rx burst") Cc: sta...@dpdk.org Signed-off-by: Yangchao Zhou --- lib/kni/rte_kni.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/kni/rte_kni.c b/lib/kni/rte_kni.c index 8ab6c47153..bfa6a001ff 100644 --- a/lib/kni/rte_kni.

[dpdk-dev] [PATCH] pci:fix missing free

2016-09-29 Thread Yangchao Zhou
Signed-off-by: Yangchao Zhou --- lib/librte_eal/common/eal_common_pci.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/lib/librte_eal/common/eal_common_pci.c b/lib/librte_eal/common/eal_common_pci.c index 7248c38..eb44998 100644 --- a/lib/librte_eal/common

[dpdk-dev] [PATCH v3] kni: fix possible rx_q mbuf leaks and speed up alloc_q release

2018-04-16 Thread Yangchao Zhou
together to speed up the release rate in userspace. Signed-off-by: Yangchao Zhou Suggested-by: Ferruh Yigit --- kernel/linux/kni/kni_dev.h |1 + kernel/linux/kni/kni_misc.c |2 ++ kernel/linux/kni/kni_net.c | 40 3 files changed, 43 insertions

[dpdk-dev] [PATCH] net/nfp: fix possible resource leak

2018-04-16 Thread Yangchao Zhou
Signed-off-by: Yangchao Zhou --- drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c |1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c b/drivers/net/nfp/nfpcore/nfp_cpp_pcie_ops.c index ad6ce72..f2fcc4a 100644 --- a/drivers/net/nfp

[dpdk-dev] [PATCH] mem: memory leaks of hubedir caused by strdup

2018-04-17 Thread Yangchao Zhou
Fixes: cb97d93e9d3bb5607681085d20acaca1aa16deb1("mem: share hugepage info primary and secondary") Signed-off-by: Yangchao Zhou --- lib/librte_eal/linuxapp/eal/eal_hugepage_info.c | 18 +- 1 files changed, 9 insertions(+), 9 deletions(-) diff --git a/lib/librte_ea

[dpdk-dev] [PATCH v2] mem: memory leaks of hubedir caused by strdup

2018-04-17 Thread Yangchao Zhou
Coverity issue: 272585 Fixes: cb97d93e9d3b ("mem: share hugepage info primary and secondary") Signed-off-by: Yangchao Zhou Acked-by: Anatoly Burakov --- lib/librte_eal/linuxapp/eal/eal_hugepage_info.c | 18 +- 1 files changed, 9 insertions(+), 9 deletions(-) diff -

[dpdk-dev] [PATCH v3] mem: fix memory leaks of hugedir and replace snprintf

2018-04-17 Thread Yangchao Zhou
The hugedir returned by get_hugepage_dir is allocated by strdup but not released. Replace snprintf with a more suitable strlcpy. Coverity issue: 272585 Fixes: cb97d93e9d3b ("mem: share hugepage info primary and secondary") Signed-off-by: Yangchao Zhou Acked-by: Anatoly Burakov

[dpdk-dev] [PATCH v4] kni: fix possible rx_q mbuf leaks and speed up alloc_q release

2018-04-18 Thread Yangchao Zhou
together to speed up the release rate in userspace. In my test, it is improved from 300-500ms with a mempool that has 131072 mbufs to 10ms(regardless of the specifications). Signed-off-by: Yangchao Zhou Suggested-by: Ferruh Yigit --- v4: * Add improve performance description. --- kernel/linux/kni

[dpdk-dev] [PATCH] kni: fix possible kernel crash with va2pa

2019-02-27 Thread Yangchao Zhou
va2pa depends on the physical address and virtual address offset of current mbuf. It may get the wrong physical address of next mbuf which allocated in another hugepage segment. Signed-off-by: Yangchao Zhou --- kernel/linux/kni/kni_net.c | 16 ++-- .../eal

[dpdk-dev] [PATCH v2] kni: fix possible kernel crash with va2pa

2019-03-12 Thread Yangchao Zhou
reserve memory in several memzones that have different physical address and virtual address offsets. The rte_mempool_populate_default() is used by rte_pktmbuf_pool_create(). Signed-off-by: Yangchao Zhou --- v2: Add an explanation that causes this problem. Use m->next to store physical addr

[dpdk-dev] [PATCH] kni: fix possible rx_q mbuf leak and speed up alloc_q release

2018-04-10 Thread Yangchao Zhou
together to speed up the release rate in userspace. Signed-off-by: Yangchao Zhou Suggested-by: Ferruh Yigit --- kernel/linux/kni/kni_dev.h | 1 + kernel/linux/kni/kni_misc.c | 2 ++ kernel/linux/kni/kni_net.c | 41 + 3 files changed, 44 insertions(+) diff

[dpdk-dev] [PATCH v2] kni: fix possible rx_q mbuf leak and speed up alloc_q release

2018-04-11 Thread Yangchao Zhou
use kernel threads are randomly stopped. When the kni is released and netdev is unregisterd, convert the physical address mbufs in rx_q to the virtual address in free_q. By the way, alloc_q can be processed together to speed up the release rate in userspace. Signed-off-by: Yangchao Zhou Sugges

[dpdk-dev] [PATCH] hash: optimize the softrss computation

2017-08-22 Thread Yangchao Zhou
Use rte_bsf32 and fast bit unset operation to optimize the softrss computation. The following measurements shows improvement over the default softrss computation function. tuple lens old(cycles) new(cycles) 31225 337 93743 992 Signed-off-by: Yangchao Zhou

[dpdk-dev] [PATCH] lpm: skip table entries update if rules found

2020-04-17 Thread Yangchao Zhou
Table entries do not need to be updated if the same rules can be found. Signed-off-by: Yangchao Zhou --- lib/librte_lpm/rte_lpm.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c index 268756419..ee44fc4e5 100644 --- a

Re: [dpdk-dev] [PATCH] lpm: skip table entries update if rules found

2020-04-17 Thread Yangchao Zhou
++ dev@dpdk.org On Fri, Apr 17, 2020 at 10:38 PM Yangchao Zhou wrote: > Hi Vladimir, > > Thanks, you are right. I saw that the next hop is also in lpm table > entries. > On the basis of the same route, skiping the table entries update only if > the next hop is also the same.

[dpdk-dev] [PATCH v2] lpm: skip table entries update if rules found

2020-04-17 Thread Yangchao Zhou
Table entries do not need to be updated if the same rules can be found. Signed-off-by: Yangchao Zhou --- lib/librte_lpm/rte_lpm.c | 8 1 file changed, 8 insertions(+) diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c index 268756419..83db3cd34 100644 --- a/lib

[dpdk-dev] [PATCH v3] lpm: skip table entries update if rules found

2020-04-17 Thread Yangchao Zhou
Table entries do not need to be updated if the same rules can be found. Signed-off-by: Yangchao Zhou --- lib/librte_lpm/rte_lpm.c | 9 + 1 file changed, 9 insertions(+) diff --git a/lib/librte_lpm/rte_lpm.c b/lib/librte_lpm/rte_lpm.c index 268756419..9085f935e 100644 --- a/lib

[dpdk-dev] [PATCH v4] lpm: skip table entries update if rules found

2020-04-19 Thread Yangchao Zhou
Table entries do not need to be updated if the same rules can be found. Signed-off-by: Yangchao Zhou --- v1-v2: Skip updating when the next hop is the same as the current one v2-v4: Coding style fix --- lib/librte_lpm/rte_lpm.c | 9 + 1 file changed, 9 insertions(+) diff --git a/lib

[dpdk-dev] [PATCH v3] kni: fix possible kernel crash with va2pa

2019-06-25 Thread Yangchao Zhou
reserve memory in several memzones that have different physical address and virtual address offsets. The rte_mempool_populate_default() is used by rte_pktmbuf_pool_create(). Fixes: 8451269e6d7b ("kni: remove continuous memory restriction") Signed-off-by: Yangchao Zhou --- .../