From: Oleksandr Kolomeiets <okl-plv@napatech.com>
To: dev@dpdk.org
Cc: mko-plv@napatech.com, sil-plv@napatech.com, ckm@napatech.com,
stephen@networkplumber.org, thomas@monjalon.net
Subject: [PATCH v2 00/26] net/ntnic: fixes and improvements
Date: Mon, 5 May 2025 09:12:40 +0200 [thread overview]
Message-ID: <20250505071309.586015-1-okl-plv@napatech.com> (raw)
* Fix issues detected by static code analyzers CoverityScan and PVS studio
- PVS studio: https://inbox.dpdk.org/dev/CAOaVG170qdNxDFsTjCvJhZafY-Fs8e98xPBa3q8U--WX+K_Qvw@mail.gmail.com/1-a.txt
* Fix requested issues mentioned here https://inbox.dpdk.org/dev/20250222134157.73763253@hermes.local/
- Removed unnecessary casts to (void) in memset calls for better readability.
- Added null checks for pointers in various functions to prevent potential dereferencing of null pointers.
- Enhanced logging messages to provide clearer context
- Updated error handling to ensure proper return values when encountering invalid states.
- Refactored code to improve consistency in variable naming ('if_index' to 'n_intf_no')
- Ensured that memory is properly initialized and freed
* Fix ring queue usage and concurrency problem.
---
v2:
* replace direct access to atomic variables with RTE's load and store.
* put space between RTE_ATOMIC macro and variable name.
* rename alloced_size to allocated_size.
* rename num_queues_alloced to num_queues_allocated.
Danylo Vodopianov (18):
net/ntnic: improve logging format specifiers
net/ntnic: remove usless expressions
net/ntnic: remove unused code
net/ntnic: remove usless part of conditional expression
net/ntnic: add error logging for hsh
net/ntnic: add explicitly specificator
net/ntnic: add handle memory allocation failures
net/ntnic: remove redundant initialization
net/ntnic: enhance null checks and assertions
net/ntnic: add return value check
net/ntnic: remove redundant assignments and branching
net/ntnic: rework array usage
net/ntnic: avoid divide by zero
net/ntnic: remove unnecessary void cast
net/ntnic: remove unnecessary memset
net/ntnic: add null verification
net/ntnic: avoid possible deadlock
net/ntnic: fix operation with rte ring queue
Oleksandr Kolomeiets (8):
net/ntnic: remove usage of the variable-length arrays
net/ntnic: handle string truncations when using strlcpy
net/ntnic: replace pragma pack with DPDK defined macros
net/ntnic: remove extra memset
net/ntnic: include all queues into statistics
net/ntnic: avoid misleading variable names
net/ntnic: apply packing to the structure
net/ntnic: correct misspelled variable names
drivers/net/ntnic/adapter/nt4ga_adapter.c | 7 +-
.../net/ntnic/adapter/nt4ga_stat/nt4ga_stat.c | 4 +-
drivers/net/ntnic/dbsconfig/ntnic_dbsconfig.c | 12 +-
drivers/net/ntnic/include/flow_api_engine.h | 2 +-
drivers/net/ntnic/include/hw_mod_backend.h | 2 +-
drivers/net/ntnic/include/hw_mod_flm_v25.h | 14 +-
drivers/net/ntnic/include/ntnic_virt_queue.h | 4 +-
.../link_mgmt/link_100g/nt4ga_link_100g.c | 6 +-
.../link_agx_100g/nt4ga_agx_link_100g.c | 63 ++--
drivers/net/ntnic/meson.build | 2 -
drivers/net/ntnic/nim/i2c_nim.c | 7 +-
.../core/nt200a0x/reset/nthw_fpga_rst9563.c | 11 -
.../nt200a0x/reset/nthw_fpga_rst_nt200a0x.c | 9 +
.../nthw/core/nt400dxx/nthw_fpga_nt400dxx.c | 3 +-
.../nt400dxx/reset/nthw_fpga_rst_nt400dxx.c | 4 +-
drivers/net/ntnic/nthw/core/nthw_fpga.c | 306 +-----------------
drivers/net/ntnic/nthw/core/nthw_hif.c | 10 +-
drivers/net/ntnic/nthw/core/nthw_iic.c | 7 +-
drivers/net/ntnic/nthw/core/nthw_pcie3.c | 5 +-
drivers/net/ntnic/nthw/core/nthw_phy_tile.c | 5 +-
drivers/net/ntnic/nthw/core/nthw_rpf.c | 5 +-
drivers/net/ntnic/nthw/core/nthw_sdc.c | 8 +-
drivers/net/ntnic/nthw/core/nthw_si5340.c | 5 +-
drivers/net/ntnic/nthw/core/nthw_spi_v3.c | 17 +-
drivers/net/ntnic/nthw/core/nthw_tsm.c | 6 +-
drivers/net/ntnic/nthw/flow_api/flow_api.c | 10 +-
drivers/net/ntnic/nthw/flow_api/flow_group.c | 17 +-
.../net/ntnic/nthw/flow_api/flow_hsh_cfg.c | 8 +-
.../net/ntnic/nthw/flow_api/flow_id_table.c | 3 +-
drivers/net/ntnic/nthw/flow_api/flow_km.c | 10 +-
.../nthw/flow_api/hw_mod/hw_mod_backend.c | 5 +-
.../ntnic/nthw/flow_api/hw_mod/hw_mod_flm.c | 3 -
.../profile_inline/flow_api_hw_db_inline.c | 95 +++---
.../profile_inline/flow_api_profile_inline.c | 98 +++---
.../ntnic/nthw/flow_filter/flow_nthw_cat.c | 4 +-
.../ntnic/nthw/flow_filter/flow_nthw_csu.c | 4 +-
.../ntnic/nthw/flow_filter/flow_nthw_flm.c | 4 +-
.../ntnic/nthw/flow_filter/flow_nthw_hfu.c | 4 +-
.../ntnic/nthw/flow_filter/flow_nthw_hsh.c | 4 +-
.../ntnic/nthw/flow_filter/flow_nthw_ifr.c | 2 +-
.../ntnic/nthw/flow_filter/flow_nthw_info.c | 4 +-
.../net/ntnic/nthw/flow_filter/flow_nthw_km.c | 4 +-
.../ntnic/nthw/flow_filter/flow_nthw_pdb.c | 4 +-
.../ntnic/nthw/flow_filter/flow_nthw_qsl.c | 4 +-
.../ntnic/nthw/flow_filter/flow_nthw_rpp_lr.c | 7 +-
.../ntnic/nthw/flow_filter/flow_nthw_slc_lr.c | 4 +-
.../ntnic/nthw/flow_filter/flow_nthw_tx_cpy.c | 4 +-
.../ntnic/nthw/flow_filter/flow_nthw_tx_ins.c | 4 +-
.../ntnic/nthw/flow_filter/flow_nthw_tx_rpl.c | 4 +-
.../net/ntnic/nthw/model/nthw_fpga_model.c | 11 +-
drivers/net/ntnic/nthw/nthw_rac.c | 32 +-
.../net/ntnic/nthw/ntnic_meter/ntnic_meter.c | 6 +
drivers/net/ntnic/nthw/stat/nthw_stat.c | 5 +-
drivers/net/ntnic/ntnic_ethdev.c | 131 ++++----
drivers/net/ntnic/ntnic_filter/ntnic_filter.c | 64 ++--
drivers/net/ntnic/ntnic_vfio.c | 1 -
drivers/net/ntnic/ntnic_xstats/ntnic_xstats.c | 9 +-
57 files changed, 430 insertions(+), 663 deletions(-)
--
2.47.1
next reply other threads:[~2025-05-05 7:13 UTC|newest]
Thread overview: 27+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-05 7:12 Oleksandr Kolomeiets [this message]
2025-05-05 7:12 ` [PATCH v2 01/26] net/ntnic: remove usage of the variable-length arrays Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 02/26] net/ntnic: handle string truncations when using strlcpy Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 03/26] net/ntnic: replace pragma pack with DPDK defined macros Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 04/26] net/ntnic: remove extra memset Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 05/26] net/ntnic: include all queues into statistics Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 06/26] net/ntnic: avoid misleading variable names Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 07/26] net/ntnic: apply packing to the structure Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 08/26] net/ntnic: correct misspelled variable names Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 09/26] net/ntnic: improve logging format specifiers Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 10/26] net/ntnic: remove usless expressions Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 11/26] net/ntnic: remove unused code Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 12/26] net/ntnic: remove usless part of conditional expression Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 13/26] net/ntnic: add error logging for hsh Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 14/26] net/ntnic: add explicitly specificator Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 15/26] net/ntnic: add handle memory allocation failures Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 16/26] net/ntnic: remove redundant initialization Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 17/26] net/ntnic: enhance null checks and assertions Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 18/26] net/ntnic: add return value check Oleksandr Kolomeiets
2025-05-05 7:12 ` [PATCH v2 19/26] net/ntnic: remove redundant assignments and branching Oleksandr Kolomeiets
2025-05-05 7:13 ` [PATCH v2 20/26] net/ntnic: rework array usage Oleksandr Kolomeiets
2025-05-05 7:13 ` [PATCH v2 21/26] net/ntnic: avoid divide by zero Oleksandr Kolomeiets
2025-05-05 7:13 ` [PATCH v2 22/26] net/ntnic: remove unnecessary void cast Oleksandr Kolomeiets
2025-05-05 7:13 ` [PATCH v2 23/26] net/ntnic: remove unnecessary memset Oleksandr Kolomeiets
2025-05-05 7:13 ` [PATCH v2 24/26] net/ntnic: add null verification Oleksandr Kolomeiets
2025-05-05 7:13 ` [PATCH v2 25/26] net/ntnic: avoid possible deadlock Oleksandr Kolomeiets
2025-05-05 7:13 ` [PATCH v2 26/26] net/ntnic: fix operation with rte ring queue Oleksandr Kolomeiets
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250505071309.586015-1-okl-plv@napatech.com \
--to=okl-plv@napatech.com \
--cc=ckm@napatech.com \
--cc=dev@dpdk.org \
--cc=mko-plv@napatech.com \
--cc=sil-plv@napatech.com \
--cc=stephen@networkplumber.org \
--cc=thomas@monjalon.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).