DPDK patches and discussions
 help / color / mirror / Atom feed
* [RFC 0/1] ring: add callback infrastructire to ring library
@ 2023-03-23 11:37 Rory Sexton
  2023-03-23 11:37 ` [RFC 1/1] ring: add infrastructure to allow callbacks within the " Rory Sexton
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Rory Sexton @ 2023-03-23 11:37 UTC (permalink / raw)
  To: honnappa.nagarahalli, konstantin.v.ananyev; +Cc: dev, Rory Sexton

This is an RFC proposing the addition of a callback infrastructure to the ring
library, particularly in the ring dequeue functions, but they could also be
added to the enqueue functions if desired.

Callbacks in the ring dequeue functions would be beneficial for a number of
reasons including but not limited to the following:
- would allow users to register specific functions to be called on dequeue of a
  ring avoiding the need to call the function within application code on several
  threads reading from said ring.
- would mirror the callback functionality offered by the ethdev library for
  threads that read exclusively from a ring and process packets based off that,
  thus allowing for the same threads to read from either a NIC i/f or directly
  from a ring without needing a different codepath.

The addition of callbacks wouldn't impact the reading of rings by more than 1
cycle when no callbacks are registered. They could also additionally be compiled
in/out as desired to give more confidence in maintaining performance when
callbacks are not required.

This RFC is to give a feel for what the additional APIs would be and how they
would be integrated within the ring dequeue functions. As such only function
declarations are present. If there is a willingness within the community to add
callback infrastructure to the ring library I will implement further code.

Rory Sexton (1):
  ring: add infrastructure to allow callbacks within the ring library

 lib/ring/rte_ring.h      | 133 ++++++++++++++++++++++++++++++++++++++-
 lib/ring/rte_ring_core.h |   3 +
 2 files changed, 135 insertions(+), 1 deletion(-)

-- 
2.34.1


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

end of thread, other threads:[~2023-10-31 21:41 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-23 11:37 [RFC 0/1] ring: add callback infrastructire to ring library Rory Sexton
2023-03-23 11:37 ` [RFC 1/1] ring: add infrastructure to allow callbacks within the " Rory Sexton
2023-10-31 21:41   ` Stephen Hemminger
2023-03-23 11:55 ` [RFC 0/1] ring: add callback infrastructire to " Morten Brørup
2023-04-05  0:46 ` Honnappa Nagarahalli
2023-04-05 14:44   ` Sexton, Rory
2023-04-05 15:49     ` Honnappa Nagarahalli

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