DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 0/4] ethdev: Add checks for function support in driver
@ 2015-06-12 11:28 Bruce Richardson
  2015-06-12 11:28 ` [dpdk-dev] [PATCH 1/4] ethdev: rename macros to have RTE_ETH prefix Bruce Richardson
                   ` (4 more replies)
  0 siblings, 5 replies; 55+ messages in thread
From: Bruce Richardson @ 2015-06-12 11:28 UTC (permalink / raw)
  To: dev

The functions to check the current occupancy of the RX descriptor ring, and
to specifically query if a particular descriptor is ready to be received, are
used for load monitoring on the data path, and so are inline functions inside
rte_ethdev.h. However, these functions are not implemented for the majority of
drivers, so their use can cause crashes in applications as there are no checks
for a function call with a NULL pointer.

This patchset attempts to fix this by putting in place the minimal check
for a NULL pointer needed before calling the function and thereby avoid any
crashes. The functions now also have a new possible return code of -ENOTSUP
but no return type changes, so ABI is preserved.

As part of the patchset, some additional cleanup is performed. The two functions
in question, as well as the rx and tx burst functions actually have two copies in
the ethdev library - one in the header and a debug version in the C file. This
patchset removes this duplication by merging the debug version into the header
file version. Build-time and runtime behaviour was preserved as part of this
merge.

NOTE: This patchset depends on Stephen Hemminger's patch to make
rte_eth_dev_is_valid_port() public: http://dpdk.org/dev/patchwork/patch/5373/ 

Bruce Richardson (4):
  ethdev: rename macros to have RTE_ETH prefix
  ethdev: move RTE_ETH_FPTR_OR_ERR macros to header
  ethdev: remove duplicated debug functions
  ethdev: check support for rx_queue_count and descriptor_done fns

 lib/librte_ether/rte_ethdev.c | 626 ++++++++++++++++++------------------------
 lib/librte_ether/rte_ethdev.h | 112 +++++---
 2 files changed, 345 insertions(+), 393 deletions(-)

-- 
2.4.2

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

end of thread, other threads:[~2015-11-25 18:22 UTC | newest]

Thread overview: 55+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-12 11:28 [dpdk-dev] [PATCH 0/4] ethdev: Add checks for function support in driver Bruce Richardson
2015-06-12 11:28 ` [dpdk-dev] [PATCH 1/4] ethdev: rename macros to have RTE_ETH prefix Bruce Richardson
2015-06-12 11:28 ` [dpdk-dev] [PATCH 2/4] ethdev: move RTE_ETH_FPTR_OR_ERR macros to header Bruce Richardson
2015-06-12 11:28 ` [dpdk-dev] [PATCH 3/4] ethdev: remove duplicated debug functions Bruce Richardson
2015-06-12 11:28 ` [dpdk-dev] [PATCH 4/4] ethdev: check support for rx_queue_count and descriptor_done fns Bruce Richardson
2015-06-12 17:32   ` Roger B. Melton
2015-06-15 10:14     ` Bruce Richardson
2015-07-06 15:11       ` Thomas Monjalon
2015-07-26 20:44         ` Thomas Monjalon
2015-09-09 15:09 ` [dpdk-dev] [PATCH v2 0/4] ethdev: minor cleanup Bruce Richardson
2015-09-09 15:09   ` [dpdk-dev] [PATCH v2 1/4] ethdev: rename macros to have RTE_ETH prefix Bruce Richardson
2015-09-09 15:09   ` [dpdk-dev] [PATCH v2 2/4] ethdev: move error checking macros to header Bruce Richardson
2015-09-09 15:09   ` [dpdk-dev] [PATCH v2 3/4] ethdev: remove duplicated debug functions Bruce Richardson
2015-09-09 15:09   ` [dpdk-dev] [PATCH v2 4/4] ethdev: check driver support for functions Bruce Richardson
2015-09-28 10:23   ` [dpdk-dev] [PATCH v2 0/4] ethdev: minor cleanup Bruce Richardson
2015-11-03  1:11     ` Thomas Monjalon
2015-11-03 10:06       ` Bruce Richardson
2015-11-03 12:00   ` [dpdk-dev] [PATCH v3 " Bruce Richardson
2015-11-03 12:00     ` [dpdk-dev] [PATCH v3 1/4] ethdev: rename macros to have RTE_ETH prefix Bruce Richardson
2015-11-03 12:00     ` [dpdk-dev] [PATCH v3 2/4] ethdev: move error checking macros to header Bruce Richardson
2015-11-04  1:19       ` Thomas Monjalon
2015-11-04 10:24         ` Adrien Mazarguil
2015-11-04 14:10           ` Bruce Richardson
2015-11-04 15:25             ` Adrien Mazarguil
2015-11-04 18:39           ` Stephen Hemminger
2015-11-05 15:09             ` Adrien Mazarguil
2015-11-05 15:17               ` Bruce Richardson
2015-11-06 11:49               ` Bruce Richardson
2015-11-06 17:10               ` Bruce Richardson
2015-11-06 17:22                 ` Bruce Richardson
2015-11-09 13:39                   ` Adrien Mazarguil
2015-11-09 13:50                     ` Adrien Mazarguil
2015-11-09 14:02                     ` Richardson, Bruce
2015-11-10 10:31                       ` Declan Doherty
2015-11-10 16:08                       ` Adrien Mazarguil
2015-11-10 16:21                         ` Richardson, Bruce
2015-11-10 17:12                           ` Adrien Mazarguil
2015-11-11 10:51                             ` Bruce Richardson
2015-11-03 12:00     ` [dpdk-dev] [PATCH v3 3/4] ethdev: remove duplicated debug functions Bruce Richardson
2015-11-03 12:00     ` [dpdk-dev] [PATCH v3 4/4] ethdev: check driver support for functions Bruce Richardson
2015-11-03 22:00       ` Stephen Hemminger
2015-11-04 14:15         ` Bruce Richardson
2015-11-17 12:21     ` [dpdk-dev] [PATCH v4 0/2] ethdev: debug code cleanup Bruce Richardson
2015-11-17 12:21       ` [dpdk-dev] [PATCH v4 1/2] ethdev: remove duplicated debug functions Bruce Richardson
2015-11-17 12:21       ` [dpdk-dev] [PATCH v4 2/2] ethdev: add sanity checks to functions Bruce Richardson
2015-11-17 15:53         ` Stephen Hemminger
2015-11-24 14:56           ` Bruce Richardson
2015-11-24 15:29             ` Thomas Monjalon
2015-11-24 15:45               ` Bruce Richardson
2015-11-24 15:48                 ` Thomas Monjalon
2015-11-24 17:37       ` [dpdk-dev] [PATCH v5 0/2] ethdev: debug code cleanup Bruce Richardson
2015-11-24 17:37         ` [dpdk-dev] [PATCH v5 1/2] ethdev: remove duplicated debug functions Bruce Richardson
2015-11-25 18:14           ` Thomas Monjalon
2015-11-24 17:37         ` [dpdk-dev] [PATCH v5 2/2] ethdev: add sanity checks to functions Bruce Richardson
2015-11-25 18:21         ` [dpdk-dev] [PATCH v5 0/2] ethdev: debug code cleanup Thomas Monjalon

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