DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH 00/10] require checking ethdev get return value
@ 2024-10-04 16:21 Stephen Hemminger
  2024-10-04 16:21 ` [PATCH 01/10] app/test: remove redundant call Stephen Hemminger
                   ` (9 more replies)
  0 siblings, 10 replies; 11+ messages in thread
From: Stephen Hemminger @ 2024-10-04 16:21 UTC (permalink / raw)
  To: dev; +Cc: Stephen Hemminger

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(-)

-- 
2.45.2


^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2024-10-04 16:26 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-04 16:21 [PATCH 00/10] require checking ethdev get return value Stephen Hemminger
2024-10-04 16:21 ` [PATCH 01/10] app/test: remove redundant call Stephen Hemminger
2024-10-04 16:21 ` [PATCH 02/10] net/memif: check return value from rte_eth_dev_info_get Stephen Hemminger
2024-10-04 16:21 ` [PATCH 03/10] graph: " Stephen Hemminger
2024-10-04 16:21 ` [PATCH 04/10] examples/ethtool: handle devices without registers Stephen Hemminger
2024-10-04 16:21 ` [PATCH 05/10] examples/l3fwd: check return value from ethdev info Stephen Hemminger
2024-10-04 16:21 ` [PATCH 06/10] examples/ntb: always check return value Stephen Hemminger
2024-10-04 16:21 ` [PATCH 07/10] examples/pipeline: check return value of ethdev functions Stephen Hemminger
2024-10-04 16:21 ` [PATCH 08/10] examples/qos_sched: check return value from rte_eth_link_get Stephen Hemminger
2024-10-04 16:21 ` [PATCH 09/10] ethdev: check return value from rte_eth_dev_info_get Stephen Hemminger
2024-10-04 16:21 ` [PATCH 10/10] ethdev: require checking results of info_get functions Stephen Hemminger

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).