[PATCH] net/mvpp2: fix null dereference in vmwa release

2023-11-06 Thread Weiguo Li
Pointer 'mrvl_cfg' is dereferenced and then compared to NULL. Move dereference after NULL test to fix this issue. Fixes: 7af10d29a4a0 ("net/mlx5/linux: refactor VLAN") Cc: sta...@dpdk.org Signed-off-by: Weiguo Li --- drivers/net/mlx5/linux/mlx5_vlan_os.c | 3 ++- 1 file c

[PATCH] net/sfc: fix null dereference in syslog

2023-11-04 Thread Weiguo Li
When ctx->sa is null, sfc_err(ctx->sa, ...) will triger a null dereference in the macro of sfc_err. Use SFC_GENERIC_LOG(ERR, ...) to avoid that. Fixes: 44db08d53be3 ("net/sfc: maintain controller to EFX interface mapping") Cc: sta...@dpdk.org Signed-off-by: Weiguo Li ---

[PATCH] examples/l3fwd: fix missing unlock issue

2023-11-04 Thread Weiguo Li
t;) Cc: sta...@dpdk.org Signed-off-by: Weiguo Li --- examples/l3fwd/l3fwd_event.c | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/l3fwd/l3fwd_event.c b/examples/l3fwd/l3fwd_event.c index 20be22c6db..40c69baafb 100644 --- a/examples/l3fwd/l3fwd_event.c +++ b/examples/l3fwd/l3fwd_e

[PATCH] examples/l2fwd-event: fix missing unlock issue

2023-11-04 Thread Weiguo Li
t;) Cc: sta...@dpdk.org Signed-off-by: Weiguo Li --- examples/l2fwd-event/l2fwd_event.c | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/l2fwd-event/l2fwd_event.c b/examples/l2fwd-event/l2fwd_event.c index 4b5a032e35..842fd816e5 100644 --- a/examples/l2fwd-event/l2fwd_event.c +++

[PATCH] net/mlx5: fix the unlock mismatch issue

2023-11-03 Thread Weiguo Li
ck, ensuring that the function only unlocks the spinlock if it has previously been acquired. Fixes: 48fbb0e93d06 ("net/mlx5: support flow meter mark indirect action with HWS") Cc: sta...@dpdk.org Signed-off-by: Weiguo Li --- drivers/net/mlx5/mlx5_flow_aso.c | 3 ++- 1 file changed, 2 in

[PATCH] net/bnxt: fix deadlock in mgr timer cb

2023-11-03 Thread Weiguo Li
tion could potentially bypass the lock release. To fix this issue, add bnxt_ulp_cntxt_entry_release() before the return statement. Fixes: 1993b267dbcb ("net/bnxt: cleanup ULP parser and mapper) CC: sta...@dpdk.org Signed-off-by: Weiguo Li --- drivers/net/bnxt/tf_ulp/ulp_ha_mgr.c | 1 + 1 file chang

[PATCH] net/mlx5: fix null derefrence in mlx5 txq start

2023-11-03 Thread Weiguo Li
Pointer 'txq_ctrl' was dereferenced and then compared to NULL. Change the order to keep the logic consistent. Fixes: f49f44839df3 ("net/mlx5: share Tx control code") Cc: sta...@dpdk.org Signed-off-by: Weiguo Li --- drivers/net/mlx5/mlx5_trigger.c | 5 - 1 file changed

[PATCH] net/enic: avoid extra unlock when setting MTU in enic

2023-11-01 Thread Weiguo Li
ate") Cc: sta...@dpdk.org Signed-off-by: Weiguo Li --- .mailmap | 2 +- drivers/net/enic/enic_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.mailmap b/.mailmap index 3f5bab26a8..b4f0ae26b8 100644 --- a/.mailmap +++ b/.mailmap @@ -1500,7 +15

[PATCH] devargs: fix derefrence before null test

2023-10-30 Thread Weiguo Li
Pointer 'da' was dereferenced and then compared to NULL, reorder the code to keep the logic consistent. Fixes: 4969f5914c9e ("devargs: introduce new parsing helper") Cc: sta...@dpdk.org Signed-off-by: Weiguo Li --- .mailmap| 2 +- lib/eal/common/

[PATCH] devtools/cocci: change boolean negation to bitwise negation

2022-03-04 Thread Weiguo Li
d to: if (x & ~BITS_MASK) The idea came from a demo script in coccinelle website: https://coccinelle.gitlabpages.inria.fr/website/rules/notand.html Signed-off-by: Weiguo Li --- devtools/cocci/bitwise_negation.cocci | 18 ++ 1 file changed, 18 insertions(+) create mode 100644

Re: [PATCH] net/txgbe: fix a bit with boolean operator

2022-03-03 Thread Weiguo Li
On March 2, 2022, 5:23 p.m Ferruh Yigit wrote: > On 3/2/2022 8:02 AM, Jiawen Wu wrote: > > On March 1, 2022 2:09 PM, Weiguo Li wrote: > >> Since boolean value is in 0 and 1, it's strange to combines a boolean > > value with > >> a bit operator. > >> &

[PATCH v5] sched: remove useless malloc in pie data init

2022-03-01 Thread Weiguo Li
'rte_pie_rt_data_init(NULL)' is not expected, and it's ought to fail when this happen. The malloc inside the function didn't work. So remove the malloc otherwise will lead to a memory leak. Fixes: 44c730b0e37971 ("sched: add PIE based congestion management") Sign

[PATCH v4] sched: remove useless malloc in pie data init

2022-03-01 Thread Weiguo Li
'rte_pie_rt_data_init(NULL)' is not expected, and it's ought to fail when this happen. The malloc inside the function didn't work. So remove the malloc otherwise will lead to a memory leak. Fixes: 44c730b0e37971 ("sched: add PIE based congestion management") Sign

[PATCH] net/txgbe: fix a bit with boolean operator

2022-02-28 Thread Weiguo Li
Since boolean value is in 0 and 1, it's strange to combines a boolean value with a bit operator. Thus it's highly possible a typo error with "if (A & !B)", and more probably to use "if (A & ~B)" instead. Fixes: c1d4e9d37abdc6 ("net/txgbe: add queu

[PATCH v3] sched: remove useless malloc in pie data init

2022-02-28 Thread Weiguo Li
'rte_pie_rt_data_init(NULL)' is not expected, and it's ought to fail when this happen. The malloc inside the function didn't work. So remove the malloc otherwise will lead to a memory leak. Fixes: 44c730b0e37971 ("sched: add PIE based congestion management") Si

[PATCH v2] sched: remove useless malloc in pie data init

2022-02-26 Thread Weiguo Li
'rte_pie_rt_data_init(NULL)' is not expected, and it's ought to fail when this happen. The malloc inside this funtion didn't work. So remove the malloc otherwise will lead to a memory leak. Fixes: 44c730b0e37971 ("sched: add PIE based congestion management") Si

Re: [PATCH] sched: add parentheses to if clause

2022-02-26 Thread Weiguo Li
On Sat, 26 Feb 2022 09:31:37 -0800, Stephen Hemminger wrote: > > Add parentheses to 'if' clause, otherwise will enlarged the > > chance of error return. > > > > Fixes: 44c730b0e37971 ("sched: add PIE based congestion management") > > &g

[PATCH] sched: add parentheses to if clause

2022-02-26 Thread Weiguo Li
Add parentheses to 'if' clause, otherwise will enlarged the chance of error return. Fixes: 44c730b0e37971 ("sched: add PIE based congestion management") Signed-off-by: Weiguo Li --- lib/sched/rte_pie.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) di

[PATCH] net/bnxt: fix a null dereference in cleanup label

2022-02-24 Thread Weiguo Li
Fixes: a46bbb57605b4 ("net/bnxt: update multi device design") In tf_session_create(), there is a case that with 'tfp->session' still be NULL and run 'goto cleanup', which will leads to a null dereference by 'tfp_free(tfp->session->core_data

[PATCH 20/20] regex/mlx5: fix a memory leak in error handling

2022-02-22 Thread Weiguo Li
When rxp_create_mkey() failed the function return, 'ptr' was not freed which caused a memory leak. Fixes: 9fa82d287f65 ("regex/mlx5: move RXP to CrSpace") Signed-off-by: Weiguo Li --- drivers/regex/mlx5/mlx5_rxp.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-)

[PATCH 19/20] raw/ntb: fix some memory leaks in error handlings

2022-02-22 Thread Weiguo Li
x_queues[qp_id]' at the end of the function when successful. When the validation failed then function returned early, 'rxq' is not released which leads to a memory leak. Fixes: c39d1e082a4b ("raw/ntb: setup queues") Signed-off-by: Weiguo Li --- drivers/raw/ntb/ntb.

[PATCH 18/20] raw/ifpga/base: fix memory leaks in error handlings

2022-02-22 Thread Weiguo Li
link status") Fixes: 15d21c851028 ("raw/ifpga/base: add I2C and at24 EEPROM driver") Signed-off-by: Weiguo Li --- drivers/raw/ifpga/base/ifpga_enumerate.c | 10 -- drivers/raw/ifpga/base/opae_eth_group.c | 1 + drivers/raw/ifpga/base/opae_i2c.c| 5 - 3 files cha

[PATCH 16/20] net/sfc: fix a memory leak in error handling

2022-02-22 Thread Weiguo Li
When efx_nic_get_board_info() failed then function return, the memory in 'id' is not released, this leads to a memory leak. Fixes: e86b48aa46d4 ("net/sfc: add HW switch ID helpers") Signed-off-by: Weiguo Li --- drivers/net/sfc/sfc.c | 4 +++- 1 file changed, 3 inser

[PATCH 17/20] net/vmxnet3: fix memory leaks in error handlings

2022-02-22 Thread Weiguo Li
function vmxnet3_dev_rx_queue_setup(): Same reason to case 1) with memory 'rxq'. Fixes: dfaff37fc46d ("vmxnet3: import new vmxnet3 poll mode driver implementation") Signed-off-by: Weiguo Li --- drivers/net/vmxnet3/vmxnet3_rxtx.c | 8 1 file changed, 8 insertion

[PATCH 15/20] net/memif: fix some memory leaks in error handlings

2022-02-22 Thread Weiguo Li
ltogether in this patch. Fixes: c41a04958b09 ("net/memif: support multi-process") Fixes: 43b815d88188 ("net/memif: support zero-copy slave") Fixes: d61138d4f0e2 ("drivers: remove direct access to interrupt handle") Signed-off-by: Weiguo Li --- drivers/net/memif/rte_eth

[PATCH 14/20] net/ice: avoid fix memory leaks in register parser

2022-02-22 Thread Weiguo Li
avoid the memory leak. Fixes: 7615a6895009cb ("net/ice: rework for generic flow enabling") Signed-off-by: Weiguo Li --- drivers/net/ice/ice_generic_flow.c | 9 + 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/net/ice/ice_generic_flow.c b/drivers/net/ice/ice_gen

[PATCH 13/20] net/ice: fix memory leaks in error handlings

2022-02-22 Thread Weiguo Li
the clean ups for 'pkt_buf' and 'msk_buf'. Fixes: 1b9c68120a1c50 ("net/ice: enable protocol agnostic flow offloading in RSS") Signed-off-by: Weiguo Li --- drivers/net/ice/ice_hash.c | 30 +++--- 1 file changed, 19 insertions(+), 11 deletion

[PATCH 12/20] net/ice: goto clean up lable to avoid memory leak

2022-02-22 Thread Weiguo Li
When function return in this branch, the memories of 'input' and 'rule' are not released, goto corresponding lable to do the clean up. Fixes: 40d466fa9f765b ("net/ice: support ACL filter in DCF") Signed-off-by: Weiguo Li --- drivers/net/ice/ice_acl_filter.c | 2 +

[PATCH 10/20] net/failsafe: fix a memory leak in error handling

2022-02-22 Thread Weiguo Li
s[rx_queue_id]', thus 'fs_rx_queue_release(dev,...)' will not work in this case. Fixes: 9e0360aebf236d ("net/failsafe: register as Rx interrupt mode") Signed-off-by: Weiguo Li --- drivers/net/failsafe/failsafe_ops.c | 1 + 1 file changed, 1 insertion(+) diff --git a/

[PATCH 11/20] net/iavf: fix a memory leak in error handling

2022-02-22 Thread Weiguo Li
When function return from this branch, memory for 'items' is not freed which caused a memory leak. Fixes: ff2d0c345c3b ("net/iavf: support generic flow API") Signed-off-by: Weiguo Li --- drivers/net/iavf/iavf_generic_flow.c | 1 + 1 file changed, 1 insertion(+) diff --gi

[PATCH 09/20] net/dpaa: fix a memory leak when validation fail

2022-02-22 Thread Weiguo Li
When buf_len validations fails and return, the mbuf is not freed which caused a memory leak. Fixes: 8cffdcbe85aa ("net/dpaa: support scattered Rx") Signed-off-by: Weiguo Li --- drivers/net/dpaa/dpaa_rxtx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/dpaa/dpa

[PATCH 08/20] net/cnxk: free 'node' memory when node add fail

2022-02-22 Thread Weiguo Li
When node_add failed and function return, then the memory of 'node' is leaked. Fixes: 4435371b8fb1c0 ("net/cnxk: add TM shaper and node operations") Signed-off-by: Weiguo Li --- drivers/net/cnxk/cnxk_tm.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/cnxk

[PATCH 07/20] net/bnx2x: add clean up for 'rxq' to avoid a memory leak

2022-02-22 Thread Weiguo Li
This error handling miss a clean up for 'rxq' which leads to a memory leak. Fixes: 540a211084a7 ("bnx2x: driver core") Signed-off-by: Weiguo Li --- drivers/net/bnx2x/bnx2x_rxtx.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/bnx2x/bnx2x_rxtx.c b/drivers/ne

[PATCH 06/20] net/bnxt: fix 'ctx' memory leak when new malloc fail

2022-02-22 Thread Weiguo Li
When new memory is not available and the memory "ctx" allocated beforehand was not assigned to anywhere, so "ctx" should be freed, otherwise will cause a memory leak. Fixes: b4f740511655 ("net/bnxt: remove unnecessary return check") Signed-off-by: Weiguo Li --- dr

[PATCH 05/20] net/bnxt: fix a memory leak in error handling

2022-02-22 Thread Weiguo Li
When run goto from this branch, the 'ulp_fc_info' has not set into the context yet, so ulp_fc_mgr_deinit(ctxt) in the error label can not release 'ulp_fc_info' in this case which cause a memory leak. Fixes: 9cf9c8385df7 ("net/bnxt: add ULP flow counter manager&qu

[PATCH 04/20] crypto/qat: fix a memory leak when set encrypt key fail

2022-02-22 Thread Weiguo Li
We allocated memory for 'in', we don't free it when AES_set_encrypt_key() fails and it will lead to memory leak. We can move set_encrypt_key() ahead of the memory allocation to fix it. Fixes: 1703e94ac5ce ("qat: add driver for QuickAssist devices") Signed-off-by: Weigu

[PATCH 03/20] crypto/dpaa2_sec: fix memory leaks in error handlings

2022-02-22 Thread Weiguo Li
When function returned from error handling branches, the memories were not freed which caused a memory leak. Fixes: 8d1f3a5d751b ("crypto/dpaa2_sec: support crypto operation") Signed-off-by: Weiguo Li --- drivers/crypto/dpaa2_sec/dpaa2_sec_dpseci.c | 3 +++ 1 file changed, 3

[PATCH 02/20] common/dpaax: fix a memory leak in iterate dir

2022-02-22 Thread Weiguo Li
When process_dir() fails, the memory to 'subdir' was not freed which caused a memory leak. Fixes: 2183c6f69d7e ("bus/dpaa: add OF parser for device scanning") Signed-off-by: Weiguo Li --- drivers/common/dpaax/dpaa_of.c | 4 +++- 1 file changed, 3 insertions(+), 1 delet

[PATCH 01/20] baseband/acc100: fix a memory leak in acc100 queue setup

2022-02-22 Thread Weiguo Li
We allocated memory for 'q', we don't free it when null check for 'd' fails and it will lead to memory leak. We can move null check for 'd' ahead of the memory allocation to fix it. Fixes: 060e76729302 ("baseband/acc100: add queue configuration") Si

[PATCH 00/20] fix memory leaks in error handling

2022-02-22 Thread Weiguo Li
x \| &x \), ...) when forall * return ...; ...+> } ) Weiguo Li (20): baseband/acc100: fix a memory leak in acc100 queue setup common/dpaax: fix a memory leak in iterate dir crypto/dpaa2_sec: fix memory leaks in error handlings crypto/qat: fix a memory leak when set encrypt key fail n

[PATCH] crypto/qat: fix a memory leak in error branch

2022-02-18 Thread Weiguo Li
Fixes: 1703e94ac5ce ("qat: add driver for QuickAssist devices") Signed-off-by: Weiguo Li --- drivers/crypto/qat/qat_sym_session.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/crypto/qat/qat_sym_session.c b/drivers/crypto/qat/qat_sym_session.c index 8ca475ca8b..fa7d020

[PATCH] net/bnxt: fix a memory leak when new malloc fail

2022-02-18 Thread Weiguo Li
When new memory is not available and the memory "ctx" allocated beforehand was not assigned to anywhere, so "ctx" should be freed, otherwise will cause a memory leak. Fixes: b4f740511655 ("net/bnxt: remove unnecessary return check") Signed-off-by: Weiguo Li --- dr

[PATCH] common/dpaax: fix a memory leak in iterate dir

2022-02-18 Thread Weiguo Li
Release the memory when error occur. Fixes: 2183c6f69d7e ("bus/dpaa: add OF parser for device scanning") Signed-off-by: Weiguo Li --- drivers/common/dpaax/dpaa_of.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/common/dpaax/dpaa_of.c b/drivers/co

[PATCH] baseband/acc100: fix a memory leak in acc100 queue setup

2022-02-18 Thread Weiguo Li
Add a memory free in error branch. Fixes: 060e76729302 ("baseband/acc100: add queue configuration") Signed-off-by: Weiguo Li --- drivers/baseband/acc100/rte_acc100_pmd.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/baseband/acc100/rte_acc100_pmd.c b/drivers/baseb

RE: [PATCH v2 12/16] acl: add define guards to avoid multi-inclusion

2022-02-09 Thread Weiguo Li
On Wed, 9 Feb 2022 09:42:28 +, Ananyev, Konstantin wrote: > > Do we really need these changes? > All these headers are internal ones for acl_run_*.c and not > supposed to be included multiple times anyway. > Got it. This v2 series are superseded. I've updated it by a new verision v3[1] whic

[PATCH v2] net/memif: remove pointer deference before null check

2022-02-08 Thread Weiguo Li
There are duplicates of assignment here, the one before null check may cause a null pointer deference, so remove the previous one. Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD") Signed-off-by: Weiguo Li --- v2: * fix typo --- drivers/net/memif/memif_socket.c | 3 +

[PATCH] net/memif: remove pointer deference before null check

2022-02-08 Thread Weiguo Li
There are duplicates of asignment here, the one before null check may cause a null pointer deference, so remove the previous one. Fixes: 09c7e63a71f9 ("net/memif: introduce memory interface PMD") Signed-off-by: Weiguo Li --- drivers/net/memif/memif_socket.c | 3 +-- 1 file changed, 1

[PATCH v3 1/4] kni: add define guards to avoid multi-inclusion

2022-02-08 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- lib/kni/rte_kni_fifo.h | 5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/kni/rte_kni_fifo.h b/lib/kni/rte_kni_fifo.h index d2ec82fe87..2ff71554c0 100644 --- a/lib/kni/rte_kni_fifo.h

[PATCH v3 3/4] efd: add define guards to avoid multi-inclusion

2022-02-08 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- lib/efd/rte_efd_x86.h | 5 + 1 file changed, 5 insertions(+) diff --git a/lib/efd/rte_efd_x86.h b/lib/efd/rte_efd_x86.h index e2f9dcca88..6e377765f9 100644 --- a/lib/efd/rte_efd_x86.h +++ b/lib/efd

[PATCH v3 4/4] hash: add define guards to avoid multi-inclusion

2022-02-08 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- lib/hash/rte_cmp_arm64.h | 5 + lib/hash/rte_cmp_x86.h | 5 + 2 files changed, 10 insertions(+) diff --git a/lib/hash/rte_cmp_arm64.h b/lib/hash/rte_cmp_arm64.h index e9e26f9abd..ecf0ea3e6f 100644

[PATCH v3 2/4] eal: add define guards to avoid multi-inclusion

2022-02-08 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li Acked-by: Dmitry Kozlyuk --- lib/eal/include/rte_eal_paging.h| 5 + lib/eal/windows/include/rte_virt2phys.h | 5 + 2 files changed, 10 insertions(+) diff --git a/lib/eal/include/rte_eal_paging.h b

[PATCH v3 0/4] add define guards to avoid multi-inclusion

2022-02-08 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. --- v3: * limit changes to "rte_xxx.h" headers v2: * update to a simple style Weiguo Li (4): kni: add define guards to avoid multi-inclusion eal: add define guards to avoid multi-inclusion efd: add define guards to a

[PATCH v2 16/16] pcapng: add define guards to avoid multi-inclusion

2022-02-08 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- lib/pcapng/pcapng_proto.h | 5 + 1 file changed, 5 insertions(+) diff --git a/lib/pcapng/pcapng_proto.h b/lib/pcapng/pcapng_proto.h index 47161d8a12..6dc100632a 100644 --- a/lib/pcapng/pcapng_proto.h +++ b

[PATCH v2 13/16] eal: add define guards to avoid multi-inclusion

2022-02-08 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li Acked-by: Dmitry Kozlyuk --- lib/eal/include/rte_eal_paging.h| 5 + lib/eal/windows/include/rte_virt2phys.h | 5 + 2 files changed, 10 insertions(+) diff --git a/lib/eal/include/rte_eal_paging.h b

[PATCH v2 15/16] hash: add define guards to avoid multi-inclusion

2022-02-08 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- lib/hash/rte_cmp_arm64.h | 5 + lib/hash/rte_cmp_x86.h | 5 + 2 files changed, 10 insertions(+) diff --git a/lib/hash/rte_cmp_arm64.h b/lib/hash/rte_cmp_arm64.h index e9e26f9abd..ecf0ea3e6f 100644

[PATCH v2 14/16] efd: add define guards to avoid multi-inclusion

2022-02-08 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- lib/efd/rte_efd_x86.h | 5 + 1 file changed, 5 insertions(+) diff --git a/lib/efd/rte_efd_x86.h b/lib/efd/rte_efd_x86.h index e2f9dcca88..6e377765f9 100644 --- a/lib/efd/rte_efd_x86.h +++ b/lib/efd

[PATCH v2 12/16] acl: add define guards to avoid multi-inclusion

2022-02-08 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. It should noted that there is an exceptional case: lib/acl/acl_run_avx512_common.h is designed to be included several times. Signed-off-by: Weiguo Li --- lib/acl/acl_run_altivec.h | 5 + lib/acl/acl_run_avx2.h | 5 + lib/acl

[PATCH v2 11/16] kni: add define guards to avoid multi-inclusion

2022-02-08 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- kernel/linux/kni/compat.h | 5 + lib/kni/rte_kni_fifo.h| 5 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h index 664785674f

[PATCH v2 10/16] raw/ifpga/base: add define guards to avoid multi-inclusion

2022-02-08 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- drivers/raw/ifpga/base/opae_at24_eeprom.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/raw/ifpga/base/opae_at24_eeprom.h b/drivers/raw/ifpga/base/opae_at24_eeprom.h index caae9a3ec1

[PATCH v2 09/16] net/virtio: add define guards to avoid multi-inclusion

2022-02-08 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- drivers/net/virtio/virtio_rxtx_packed_avx.h | 5 + drivers/net/virtio/virtio_rxtx_packed_neon.h | 5 + 2 files changed, 10 insertions(+) diff --git a/drivers/net/virtio/virtio_rxtx_packed_avx.h b

[PATCH v2 06/16] net/netvsc: add define guards to avoid multi-inclusion

2022-02-08 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- drivers/net/netvsc/hn_nvs.h | 5 + drivers/net/netvsc/hn_rndis.h | 5 + drivers/net/netvsc/hn_var.h | 5 + 3 files changed, 15 insertions(+) diff --git a/drivers/net/netvsc/hn_nvs.h b/drivers

[PATCH v2 08/16] net/tap: add define guards to avoid multi-inclusion

2022-02-08 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- drivers/net/tap/tap_bpf_insns.h | 5 + drivers/net/tap/tap_log.h | 5 + 2 files changed, 10 insertions(+) diff --git a/drivers/net/tap/tap_bpf_insns.h b/drivers/net/tap/tap_bpf_insns.h index

[PATCH v2 07/16] net/qede: add define guards to avoid multi-inclusion

2022-02-08 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- drivers/net/qede/base/reg_addr.h | 5 + drivers/net/qede/qede_sriov.h| 5 + 2 files changed, 10 insertions(+) diff --git a/drivers/net/qede/base/reg_addr.h b/drivers/net/qede/base/reg_addr.h index

[PATCH v2 05/16] net/i40e: add define guards to avoid multi-inclusion

2022-02-08 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- v2: * update to a simple guard style --- drivers/net/i40e/i40e_regs.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/i40e/i40e_regs.h b/drivers/net/i40e/i40e_regs.h index b19bb1d5a5

[PATCH v2 04/16] net/enetfec: add define guards to avoid multi-inclusion

2022-02-08 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- v2: * update to a simple guard style --- drivers/net/enetfec/enet_uio.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/enetfec/enet_uio.h b/drivers/net/enetfec/enet_uio.h index fec8ba6f95

[PATCH v2 00/16] add define guards to avoid multi-inclusion

2022-02-08 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Notice that there are couples of guard styles used in this project, like "XX_H", "XX_H_" or "XXX_H__". Adhere to Thomas's advice, this patch set use the first style to make it simple. Weiguo Li (16): b

[PATCH v2 02/16] event/octeontx: add define guards to avoid multi-inclusion

2022-02-08 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- v2: * update to a simple guard style --- drivers/event/octeontx/timvf_worker.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/event/octeontx/timvf_worker.h b/drivers/event/octeontx

[PATCH v2 03/16] net/cxgbe: add define guards to avoid multi-inclusion

2022-02-08 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- v2: * update to a simple guard style --- drivers/net/cxgbe/base/t4_regs.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/cxgbe/base/t4_regs.h b/drivers/net/cxgbe/base/t4_regs.h index

[PATCH v2 01/16] bus/dpaa: add define guards to avoid multi-inclusion

2022-02-08 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- v2: * update to a simple guard style --- drivers/bus/dpaa/base/qbman/qman.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/bus/dpaa/base/qbman/qman.h b/drivers/bus/dpaa/base/qbman/qman.h

[PATCH v2 6/6] eventdev: remove cplusplus guard in private header file

2022-02-07 Thread Weiguo Li
This private header contains an incomplete cplusplus guard, just remove it. Fixes: d35e61322de52 ("eventdev: move inline APIs into separate structure") Cc: pbhagavat...@marvell.com Signed-off-by: Weiguo Li --- lib/eventdev/eventdev_pmd.h | 4 1 file changed, 4 deletions(-) di

[PATCH v2 5/6] eal/windows: fix the curly braces mismatch problem

2022-02-07 Thread Weiguo Li
Remove the incomplete cplusplus guard in internal header. Fixes: 6e1ed4cbbe99 ("eal/windows: add dirent implementation") Cc: pallavi.ka...@intel.com Signed-off-by: Weiguo Li --- lib/eal/windows/include/dirent.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/lib/eal/windo

[PATCH v2 4/6] net/dpaa2: fix the curly braces mismatch problem

2022-02-07 Thread Weiguo Li
Remove the incomplete cplusplus guard in internal headers. Fixes: 72ec7a678e70 ("net/dpaa2: add soft parser driver") Cc: sunil.k...@nxp.com Signed-off-by: Weiguo Li --- drivers/net/dpaa2/dpaa2_sparser.h | 4 1 file changed, 4 deletions(-) diff --git a/drivers/net/dpaa2/dpaa2_sp

[PATCH v2 3/6] net/cxgbe: fix the curly braces mismatch problem

2022-02-07 Thread Weiguo Li
Remove the incomplete cplusplus guard in internal header. Fixes: 3bd122eef2cc ("cxgbe/base: add hardware API for Chelsio T5 series adapters") Cc: rahul.lakkire...@chelsio.com Signed-off-by: Weiguo Li --- drivers/net/cxgbe/base/common.h | 4 1 file changed, 4 deletions(-) di

[PATCH v2 2/6] common/mlx5: fix the curly braces mismatch problem

2022-02-07 Thread Weiguo Li
Remove the incomplete cplusplus guard in internal headers. Fixes: 7525ebd8ebb0 ("common/mlx5: add glue functions on Windows") Cc: tal...@nvidia.com Signed-off-by: Weiguo Li --- drivers/common/mlx5/windows/mlx5_win_defs.h | 4 drivers/common/mlx5/windows/mlx5_win_ext.h | 4 ---

[PATCH v2 1/6] bus/dpaa: fix the curly braces mismatch problem

2022-02-07 Thread Weiguo Li
sh.j...@nxp.com Signed-off-by: Weiguo Li --- drivers/bus/dpaa/include/fsl_fman.h | 4 drivers/bus/dpaa/rte_dpaa_bus.h | 4 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/bus/dpaa/include/fsl_fman.h b/drivers/bus/dpaa/include/fsl_fman.h index acb344584f..20690

Re: [PATCH 0/6] fix the curly braces mismatch problem

2022-02-07 Thread Weiguo Li
On Mon, 7 Feb 2022 09:29:58 +, Bruce Richardson wrote: > Any headers that have filenames not starting with "rte_" are internal > headers, and so should have the guards removed. Therefore, I think that > most patches in this set should just be removing guards. From my tests with > building our p

Re: [PATCH 5/6] eal/windows: fix the curly braces mismatch problem

2022-02-07 Thread Weiguo Li
On Sun, 6 Feb 2022 19:23:03 +0300, Dmitry Kozlyuk wrote: > This file is not public, used only from DPDK C code. > Rather then adding the opening part, the closing part should be removed. > The "Fixes" tag is incorrect, should be: > Fixes: 6e1ed4cbbe99 ("eal/windows: add dirent implementation") >

[PATCH 13/16] eal: add define guards to avoid multi-inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- lib/eal/include/rte_eal_paging.h| 5 + lib/eal/windows/include/rte_virt2phys.h | 5 + 2 files changed, 10 insertions(+) diff --git a/lib/eal/include/rte_eal_paging.h b/lib/eal/include

[PATCH 16/16] pcapng: add define guards to avoid multi-inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- lib/pcapng/pcapng_proto.h | 5 + 1 file changed, 5 insertions(+) diff --git a/lib/pcapng/pcapng_proto.h b/lib/pcapng/pcapng_proto.h index 47161d8a12..2e0c0e8cfd 100644 --- a/lib/pcapng/pcapng_proto.h +++ b

[PATCH 15/16] hash: add define guards to avoid multi-inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- lib/hash/rte_cmp_arm64.h | 5 + lib/hash/rte_cmp_x86.h | 5 + 2 files changed, 10 insertions(+) diff --git a/lib/hash/rte_cmp_arm64.h b/lib/hash/rte_cmp_arm64.h index e9e26f9abd..aaad614d56 100644

[PATCH 14/16] efd: add define guards to avoid multi-inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- lib/efd/rte_efd_x86.h | 5 + 1 file changed, 5 insertions(+) diff --git a/lib/efd/rte_efd_x86.h b/lib/efd/rte_efd_x86.h index e2f9dcca88..fac74fa50b 100644 --- a/lib/efd/rte_efd_x86.h +++ b/lib/efd

[PATCH 10/16] raw/ifpga/base: add define guards to avoid multi-inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- drivers/raw/ifpga/base/opae_at24_eeprom.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/raw/ifpga/base/opae_at24_eeprom.h b/drivers/raw/ifpga/base/opae_at24_eeprom.h index caae9a3ec1

[PATCH 11/16] kni: add define guards to avoid multi-inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- kernel/linux/kni/compat.h | 5 + lib/kni/rte_kni_fifo.h| 5 - 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/kernel/linux/kni/compat.h b/kernel/linux/kni/compat.h index 664785674f

[PATCH 12/16] acl: add define guards to avoid multi-inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. It should noted that there is an exceptional case: lib/acl/acl_run_avx512_common.h is designed to be included several times. Signed-off-by: Weiguo Li --- lib/acl/acl_run_altivec.h | 5 + lib/acl/acl_run_avx2.h | 5 + lib/acl

[PATCH 09/16] net/virtio: add define guards to avoid multi-inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- drivers/net/virtio/virtio_rxtx_packed_avx.h | 5 + drivers/net/virtio/virtio_rxtx_packed_neon.h | 5 + 2 files changed, 10 insertions(+) diff --git a/drivers/net/virtio/virtio_rxtx_packed_avx.h b

[PATCH 08/16] net/tap: add define guards to avoid multi-inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- drivers/net/tap/tap_bpf_insns.h | 5 + drivers/net/tap/tap_log.h | 5 + 2 files changed, 10 insertions(+) diff --git a/drivers/net/tap/tap_bpf_insns.h b/drivers/net/tap/tap_bpf_insns.h index

[PATCH 07/16] net/qede: add define guards to avoid multi-inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- drivers/net/qede/base/reg_addr.h | 5 + drivers/net/qede/qede_sriov.h| 5 + 2 files changed, 10 insertions(+) diff --git a/drivers/net/qede/base/reg_addr.h b/drivers/net/qede/base/reg_addr.h index

[PATCH 06/16] net/netvsc: add define guards to avoid multi-inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- drivers/net/netvsc/hn_nvs.h | 5 + drivers/net/netvsc/hn_rndis.h | 5 + drivers/net/netvsc/hn_var.h | 5 + 3 files changed, 15 insertions(+) diff --git a/drivers/net/netvsc/hn_nvs.h b/drivers

[PATCH 04/16] net/enetfec: add define guards to avoid multiple inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- drivers/net/enetfec/enet_uio.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/enetfec/enet_uio.h b/drivers/net/enetfec/enet_uio.h index fec8ba6f95..0d5b9e7a39 100644 --- a/drivers/net

[PATCH 05/16] net/i40e: add define guards to avoid multiple inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- drivers/net/i40e/i40e_regs.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/i40e/i40e_regs.h b/drivers/net/i40e/i40e_regs.h index b19bb1d5a5..b3111dbf96 100644 --- a/drivers/net/i40e

[PATCH 02/16] event/octeontx: add define guards to avoid multi-inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- drivers/event/octeontx/timvf_worker.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/event/octeontx/timvf_worker.h b/drivers/event/octeontx/timvf_worker.h index 3f1e77f1d1..a99ff54245 100644

[PATCH 03/16] net/cxgbe: add define guards to avoid multiple inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- drivers/net/cxgbe/base/t4_regs.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/net/cxgbe/base/t4_regs.h b/drivers/net/cxgbe/base/t4_regs.h index 8a14d09a15..4952f7cde4 100644 --- a/drivers

[PATCH 01/16] bus/dpaa: add define guards to avoid multiple inclusion

2022-02-05 Thread Weiguo Li
Supplement define guards to prevent multiple inclusion. Signed-off-by: Weiguo Li --- drivers/bus/dpaa/base/qbman/qman.h | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/bus/dpaa/base/qbman/qman.h b/drivers/bus/dpaa/base/qbman/qman.h index 4346d86537..19be738424 100644 --- a

[PATCH 6/6] eventdev: remove C++ include guard from private header

2022-02-05 Thread Weiguo Li
gavat...@marvell.com Signed-off-by: Weiguo Li --- lib/eventdev/eventdev_pmd.h | 4 1 file changed, 4 deletions(-) diff --git a/lib/eventdev/eventdev_pmd.h b/lib/eventdev/eventdev_pmd.h index d0b0c00a60..b05ffce549 100644 --- a/lib/eventdev/eventdev_pmd.h +++ b/lib/eventdev/eventdev_pmd.h @@ -13

[PATCH 5/6] eal/windows: fix the curly braces mismatch problem

2022-02-05 Thread Weiguo Li
Supplement the first half of braces for the extern "C" block Fixes: 99a2dd955fba6 ("lib: remove librte_ prefix from directory names") Cc: bruce.richard...@intel.com Signed-off-by: Weiguo Li --- lib/eal/windows/include/dirent.h | 4 1 file changed, 4 insertions(+)

[PATCH 4/6] net/dpaa2: fix the curly braces mismatch problem

2022-02-05 Thread Weiguo Li
Supplement the second half of braces for the extern "C" block Fixes: 72ec7a678e70 ("net/dpaa2: add soft parser driver") Cc: sunil.k...@nxp.com Signed-off-by: Weiguo Li --- drivers/net/dpaa2/dpaa2_sparser.h | 5 + 1 file changed, 5 insertions(+) diff --git

[PATCH 3/6] net/cxgbe: fix the curly braces mismatch problem

2022-02-05 Thread Weiguo Li
Supplement the second half of braces for the extern "C" block Fixes: 3bd122eef2cc ("cxgbe/base: add hardware API for Chelsio T5 series adapters") Cc: rahul.lakkire...@chelsio.com Signed-off-by: Weiguo Li --- drivers/net/cxgbe/base/common.h | 5 + 1 file changed, 5

[PATCH 0/6] fix the curly braces mismatch problem

2022-02-05 Thread Weiguo Li
ot;:1$" Apart from two false positive cases, I found some real issues -- some missing the left brace parts, the others missing the right brace parts. In one of the cases, the c++ guard is removed since it's useless in private header as previous patch (http://dpdk.org/patch/98948) noted. For

[PATCH 1/6] bus/dpaa: fix the curly braces mismatch problem

2022-02-05 Thread Weiguo Li
Supplement the missing half of braces for the extern "C" block Fixes: 6d6b4f49a155 ("bus/dpaa: add FMAN hardware operations") Fixes: 919eeaccb2ba ("bus/dpaa: introduce NXP DPAA bus driver skeleton") Cc: shreyansh.j...@nxp.com Signed-off-by: Weiguo Li --- drivers/b

[PATCH 2/6] common/mlx5: fix the curly braces mismatch problem

2022-02-05 Thread Weiguo Li
Supplement the second half of braces for the extern "C" block Fixes: 7525ebd8ebb0 ("common/mlx5: add glue functions on Windows") Cc: tal...@nvidia.com Signed-off-by: Weiguo Li --- drivers/common/mlx5/windows/mlx5_win_defs.h | 5 + drivers/common/mlx5/windows/mlx5_wi

  1   2   >