[dpdk-dev] [PATCH v4 0/2] ethdev: debug code cleanup

Bruce Richardson bruce.richardson at intel.com
Tue Nov 17 13:21:05 CET 2015


This patchset performs two cleanups:
1. Four functions in ethdev.c which were enabled for debug only have been
  merged into their inlined header-file counterparts. This change required that
  a number of macros be renamed and moved to the header file too. The macro changes
  are in patches 1 & 2, and the elimination of the separate debug fns are in patch 3.
2. Checks for valid function pointers are added to the API calls for reading
  the descriptor ring count, and checking for a valid descriptor. This is because
  these functions are not implemented by most drivers, and so it's far safer to
  have the check.

NOTE: This patchset now depends upon the cryptodev patchset

---

V4 Changes:
* Originally this was a 4-patch set, but patches 1 and 2 duplicated changes being
  made in the patchset to add crypto device support. Therefore this set has
  been reduced to two patches to sit on top of that set.
* As suggested on-list, when adding checks for the function pointers being
  valid we can also add in the similarly lightweight checks for the port id
  being valid.

V3 Changes:
* Rebased to latest DPDK codebase
* Fixed checkpatch issues in patches 2 and 3.

V2 Changes:
* Rebased to latest DPDK codebase
* Changed type from uint32_t to int for the count function, on the basis of
feedback received.

Bruce Richardson (2):
  ethdev: remove duplicated debug functions
  ethdev: add sanity checks to functions

 lib/librte_ether/rte_ethdev.c | 64 -------------------------------------------
 lib/librte_ether/rte_ethdev.h | 62 ++++++++++++++++++++---------------------
 2 files changed, 30 insertions(+), 96 deletions(-)

-- 
2.5.0



More information about the dev mailing list