[v5,0/5] fix segment fault when parse args

Message ID 20231106073125.55280-1-fengchengwen@huawei.com (mailing list archive)
Headers
Series fix segment fault when parse args |

Message

fengchengwen Nov. 6, 2023, 7:31 a.m. UTC
The rte_kvargs_process() was used to parse key-value (e.g. socket_id=0),
it also supports to parse only-key (e.g. socket_id). But many drivers's
callback can only handle key-value, it will segment fault if handles
only-key. so the patchset [1] was introduced.

Because the patchset [1] modified too much drivers, therefore:
1) A new API rte_kvargs_process_opt() was introduced, it inherits the
function of rte_kvargs_process() which could parse both key-value and
only-key.
2) Constraint the rte_kvargs_process() can only parse key-value.

This patchset also include one bugfix for kvargs of mvneta driver.

[1] https://patches.dpdk.org/project/dpdk/patch/20230320092110.37295-1-fengchengwen@huawei.com/

Chengwen Feng (5):
  kvargs: add one new process API
  net/sfc: use new API to parse kvargs
  net/tap: use new API to parse kvargs
  common/nfp: use new API to parse kvargs
  net/mvneta: fix possible out-of-bounds write

---
v5: remove redundant of rte_kvargs_count of 4/5 commit which address
    Stephen's comment.
v4: refine API's define and impl which address Ferruh's comments.
    add common/nfp change commit.
v3: introduce new API instead of modify too many drivers which address
    Ferruh's comments.

 doc/guides/rel_notes/release_23_11.rst | 13 ++++++++
 drivers/common/nfp/nfp_common_pci.c    |  6 ++--
 drivers/common/sfc_efx/sfc_efx.c       |  4 +--
 drivers/net/mvneta/mvneta_ethdev.c     |  3 ++
 drivers/net/sfc/sfc_kvargs.c           |  2 +-
 drivers/net/tap/rte_eth_tap.c          | 10 +++---
 lib/kvargs/rte_kvargs.c                | 43 ++++++++++++++++++++------
 lib/kvargs/rte_kvargs.h                | 37 ++++++++++++++++++++--
 lib/kvargs/version.map                 |  3 ++
 9 files changed, 97 insertions(+), 24 deletions(-)