Skip to content

require checking ethdev get return value

Stephen Hemminger dpdk-dev 1 version Applied

Status from this message: Applied, thanks.

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest10 patches 5 repliesApplied

Patches in v1 Applied

#Subject and filesSizeRepliesApplied
1/10app/test: remove redundant callapp/test/test_link_bonding_rssconf.c+0 -10 replies
2/10net/memif: check return value from rte_eth_dev_info_getdrivers/net/memif/rte_eth_memif.c+10 -21 reply
3/10graph: check return value from rte_eth_dev_info_getapp/graph/ethdev.c+16 -40 replies
4/10examples/ethtool: handle devices without registersexamples/ethtool/lib/rte_ethtool.c+2 -40 replies
5/10examples/l3fwd: check return value from ethdev infoexamples/l3fwd-graph/main.c examples/l3fwd/l3fwd_fib.c examples/l3fwd/l3fwd_lpm.c+32 -100 replies
6/10examples/ntb: always check return valueexamples/ntb/ntb_fwd.c+4 -10 replies
7/10examples/pipeline: check return value of ethdev functionsexamples/pipeline/cli.c+4 -30 replies
8/10examples/qos_sched: check return value from rte_eth_link_getexamples/qos_sched/init.c+11 -20 replies
9/10ethdev: check return value from rte_eth_dev_info_getlib/ethdev/rte_class_eth.c+3 -11 reply
10/10ethdev: require checking results of info_get functionslib/ethdev/rte_ethdev.h+21 -131 reply

Reviews trailers per patch

3 of 10 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchFerruh YigitMorten Brørup
SeriesA-b
1/10
2/10A-b
3/10
4/10
5/10
6/10
7/10
8/10
9/10A-b
10/10A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 00/10] require checking ethdev get return value

Several places flagged by Coverity and Codeql are from code that calls rte_eth_dev_info_get() but does not check the return value. If rte_eth_dev_info_get() returns an error, the device info is garbage.

This patch series uses the function attribute to force code to check the result or there will be a compiler warning.

The series is ordered to fix the current warnings first before enabling it.

Stephen Hemminger (10):
app/test: remove redundant call
net/memif: check return value from rte_eth_dev_info_get
graph: check return value from rte_eth_dev_info_get examples/ethtool: handle devices without registers examples/l3fwd: check return value from ethdev info examples/ntb: always check return value examples/pipeline: check return value of ethdev functions examples/qos_sched: check return value from rte_eth_link_get
ethdev: check return value from rte_eth_dev_info_get
ethdev: require checking results of info_get functions

 app/graph/ethdev.c                   | 20 ++++++++++++----
 app/test/test_link_bonding_rssconf.c |  1 -
 drivers/net/memif/rte_eth_memif.c    | 12 ++++++++--
 examples/ethtool/lib/rte_ethtool.c   |  6 ++---
 examples/l3fwd-graph/main.c          | 12 ++++++++--
 examples/l3fwd/l3fwd_fib.c           | 16 +++++++++----
 examples/l3fwd/l3fwd_lpm.c           | 14 ++++++++----
 examples/ntb/ntb_fwd.c               |  5 +++-
 examples/pipeline/cli.c              |  7 +++---
 examples/qos_sched/init.c            | 13 +++++++++--
 lib/ethdev/rte_class_eth.c           |  4 +++-
 lib/ethdev/rte_ethdev.h              | 34 +++++++++++++++++-----------
 12 files changed, 103 insertions(+), 41 deletions(-)
Signature · 1 line
2.45.2