[PATCH v2 00/26] net/ntnic: fixes and improvements
Oleksandr Kolomeiets
okl-plv at napatech.com
Mon May 5 09:12:40 CEST 2025
* 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
More information about the dev
mailing list