| Age | Commit message (Collapse) | Author |
|
If the number of interrupts is zero, then indexing an array by
"nb_rx_intr - 1" will cause an out-of-bounds write Fix this by putting
in a check that nb_rx_intr > 0 before doing the array write.
Coverity issue: 448870
Fixes: 3810ae435783 ("eventdev: add interrupt driven queues to Rx adapter")
Cc: [email protected]
Signed-off-by: Bruce Richardson <[email protected]>
Acked-by: Jerin Jacob <[email protected]>
|
|
Remove the single event enqueue and dequeue, since they did not
provide any noticeable performance benefits.
This is a change of the ABI, previously announced as a deprecation
notice. These functions were not directly invoked by the application,
so the API remains unaffected.
Signed-off-by: Mattias Rönnblom <[email protected]>
|
|
Add a new eventdev API to provide a hint to the eventdev PMD to
pre-schedule the next event into the event port, without releasing
the current flow context.
Event device that support this feature advertises the capability
using the RTE_EVENT_DEV_CAP_PRESCHEDULE_EXPLICIT capability flag.
Application can invoke `rte_event_port_preschedule` to hint the PMD,
if event device does not support this feature it is treated as a no-op.
Signed-off-by: Pavan Nikhilesh <[email protected]>
Acked-by: Jerin Jacob <[email protected]>
|
|
Some event devices allow pre-schedule types to be modified at
runtime on an event port.
Add `RTE_EVENT_DEV_CAP_PER_PORT_PRESCHEDULE` capability
to indicate that the event device supports this feature.
Add `rte_event_port_preschedule_modify()` API to modify the
pre-schedule type at runtime.
To avoid fastpath capability checks, the API reports -ENOTSUP
if the event device does not support this feature.
Signed-off-by: Pavan Nikhilesh <[email protected]>
Acked-by: Jerin Jacob <[email protected]>
|
|
Event pre-scheduling improves scheduling performance by assigning events
to event ports in advance when dequeues are issued.
The dequeue operation initiates the pre-schedule operation, which completes
in parallel without affecting the dequeued event flow contexts and
dequeue latency.
Event devices can indicate pre-scheduling capabilities using
`RTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE` and
`RTE_EVENT_DEV_CAP_EVENT_PRESCHEDULE_ADAPTIVE` via the event device info
function `info.event_dev_cap`.
Applications can select the pre-schedule type and configure it through
`rte_event_dev_config.preschedule_type` during `rte_event_dev_configure`.
The supported pre-schedule types are:
* `RTE_EVENT_PRESCHEDULE_NONE` - No pre-scheduling.
* `RTE_EVENT_PRESCHEDULE` - Always issue a pre-schedule on dequeue.
* `RTE_EVENT_PRESCHEDULE_ADAPTIVE` - Delay issuing pre-schedule until
there are no forward progress constraints with the held flow contexts.
Signed-off-by: Pavan Nikhilesh <[email protected]>
Acked-by: Jerin Jacob <[email protected]>
|
|
Support for independent enqueue feature and updates Event Device
and PMD feature list.
A new capability RTE_EVENT_DEV_CAP_INDEPENDENT_ENQ is introduced. It
allows out-of-order enqueuing of RTE_EVENT_OP_FORWARD or RELEASE type
events on an event port where this capability is enabled.
To use this capability applications need to set flag
RTE_EVENT_PORT_CFG_INDEPENDENT_ENQ during port setup only if the
capability RTE_EVENT_DEV_CAP_INDEPENDENT_ENQ exists.
Signed-off-by: Abdullah Sevincer <[email protected]>
Acked-by: Mattias Rönnblom <[email protected]>
Acked-by: Jerin Jacob <[email protected]>
|
|
Assure that 'extern "C" { /../ }' do not cover files included from a
particular header file, and address minor issues resulting from this
change of order.
Dealing with C++ should delegate to the individual include file level,
rather than being imposed by the user of that file. For example,
forcing C linkage prevents __Generic macros being replaced with
overloaded static inline functions in C++ translation units.
Eliminate 'extern "C"' from files which do not declare any symbols
(e.g., only macros or struct types).
On the other hand, the headers check is too naive in assuming that all
headers must contain a 'extern "C"'. Such a check was added in commit
1ee492bdc4ff ("buildtools/chkincs: check missing C++ guards").
Since this current change results in many headers not containing such
a token, remove the check for 'extern "C"' until we have a better
implementation.
Signed-off-by: Mattias Rönnblom <[email protected]>
Acked-by: Morten Brørup <[email protected]>
Signed-off-by: David Marchand <[email protected]>
|
|
Zero length array's are a GNU C extension and should be replaced
by use of flexible arrays. This has been fixed almost everywhere
in DPDK 24.07 but looks like some event code got missed.
Generated by devtools/cocci/zero_length_array.cocci
Signed-off-by: Stephen Hemminger <[email protected]>
|
|
Start a new release cycle with empty release notes.
The ABI version becomes 25.0.
The map files are updated to the new ABI major number (25).
The ABI exceptions are dropped and CI ABI checks are disabled because
compatibility is not preserved.
Signed-off-by: David Marchand <[email protected]>
Acked-by: Thomas Monjalon <[email protected]>
|
|
When in OP_FWD mode the DMA completion response should
use the rte_event_dma_adapter_op::event_meta to inject
the completion event.
Bugzilla ID: 1469
Fixes: 588dcac23610 ("eventdev/dma: reorganize event DMA ops")
Signed-off-by: Pavan Nikhilesh <[email protected]>
Acked-by: Amit Prakash Shukla <[email protected]>
Tested-by: Song Jiale <[email protected]>
|
|
Re-organize event DMA ops structure to allow holding
source and destination pointers without the need for
additional memory, the mempool allocating memory for
rte_event_dma_adapter_ops can size the structure to
accommodate all the needed source and destination
pointers.
Add multiple words for holding user metadata, adapter
implementation specific metadata and event metadata.
Signed-off-by: Pavan Nikhilesh <[email protected]>
Acked-by: Amit Prakash Shukla <[email protected]>
|
|
For session-less crypto operations, event info is contained in
crypto op metadata for each event which is restored in event
from the crypto op metadata response info.
For session based crypto operations, crypto op contains per session
based event info in crypto op metadata. If any PMD passes any
implementation specific data in "struct rte_event::impl_opaque"
on each event, it's not getting restored.
This patch stores "struct rte_event::impl_opaque" in mbuf dynamic
field before enqueueing to cryptodev and restores
"struct rte_event::impl_opaque" from mbuf dynamic field after
dequeueing crypto op from cryptodev for session based crypto operations.
Fixes: 7901eac3409a ("eventdev: add crypto adapter implementation")
Cc: [email protected]
Signed-off-by: Ganapati Kundapura <[email protected]>
Acked-by: Abhinandan Gujjar <[email protected]>
|
|
The current location used for __rte_aligned(a) for alignment of types
is not compatible with MSVC. There is only a single location accepted
by both toolchains.
The standard offers no alignment facility that compatibly interoperates
with C and C++ but it may be achieved by relocating the placement of
__rte_aligned(a) to the aforementioned location accepted by all currently
supported toolchains.
To allow alignment for both compilers, do the following:
* Expand __rte_aligned(a) to __declspec(align(a)) when building
with MSVC.
* Move __rte_aligned from the end of {struct,union} definitions to
be between {struct,union} and tag.
The placement between {struct,union} and the tag allows the desired
alignment to be imparted on the type regardless of the toolchain being
used for all of GCC, LLVM, MSVC compilers building both C and C++.
Note: this move has an additional benefit as Doxygen is not confused
anymore like for the rte_event_vector struct definition.
Signed-off-by: Tyler Retzlaff <[email protected]>
Acked-by: Morten Brørup <[email protected]>
Acked-by: Bruce Richardson <[email protected]>
Acked-by: Konstantin Ananyev <[email protected]>
Acked-by: Chengwen Feng <[email protected]>
Reviewed-by: Maxime Coquelin <[email protected]>
Signed-off-by: David Marchand <[email protected]>
|
|
The current location used for __rte_aligned(a) for alignment of
variables is not compatible with MSVC.
For variables, standard C11 offers alignas(a) supported by conformant
compilers i.e. both MSVC and GCC.
Replace use of __rte_aligned(a) on variables/fields with alignas(a).
Signed-off-by: Tyler Retzlaff <[email protected]>
Acked-by: Morten Brørup <[email protected]>
Acked-by: Bruce Richardson <[email protected]>
Acked-by: Konstantin Ananyev <[email protected]>
Signed-off-by: David Marchand <[email protected]>
|
|
When tail pointer of circular buffer rolls over as the circular buffer
becomes full, crypto adapter is enqueueing ops beyond the size of the
circular buffer leading to segfault due to invalid ops access.
Fixed by enqueueing ops from head pointer to (size-head) number of ops
when circular buffer becomes full and the remaining ops will be flushed
in next iteration.
Fixes: 6c3c888656fc ("eventdev/crypto: fix circular buffer full case")
Cc: [email protected]
Signed-off-by: Ganapati Kundapura <[email protected]>
Acked-by: Abhinandan Gujjar <[email protected]>
|
|
The event vector struct was missing comments on two members, and also
was inadvertently creating a local variable called "__rte_aligned" in
the doxygen output.
Correct the comment markers to fix the former issue, and fix the latter
by putting "#ifdef __DOXYGEN" around the alignment constraint.
Fixes: 1cc44d409271 ("eventdev: introduce event vector capability")
Fixes: 3c838062b91f ("eventdev: introduce event vector Rx capability")
Fixes: 699155f2d4e2 ("eventdev: fix clang C++ include")
Cc: [email protected]
Signed-off-by: Bruce Richardson <[email protected]>
Acked-by: Pavan Nikhilesh <[email protected]>
Acked-by: Jerin Jacob <[email protected]>
|
|
Make the comments on the unnamed unions in the rte_event structure
regular comments rather than doxygen ones. The comments do not add
anything meaningful to the doxygen output.
Signed-off-by: Bruce Richardson <[email protected]>
Acked-by: Pavan Nikhilesh <[email protected]>
Acked-by: Jerin Jacob <[email protected]>
|
|
Clarify the meaning of the NEW, FORWARD and RELEASE event types.
For the fields in "rte_event" struct, enhance the comments on each to
clarify the field's use, and whether it is preserved between enqueue and
dequeue, and it's role, if any, in scheduling.
Signed-off-by: Bruce Richardson <[email protected]>
Acked-by: Pavan Nikhilesh <[email protected]>
Acked-by: Jerin Jacob <[email protected]>
|
|
The description of ordered and atomic scheduling given in the eventdev
doxygen documentation was not always clear. Try and simplify this so
that it is clearer for the end-user of the application
Signed-off-by: Bruce Richardson <[email protected]>
Acked-by: Pavan Nikhilesh <[email protected]>
Acked-by: Jerin Jacob <[email protected]>
|
|
The doxygen comments for the port attributes, start and stop (and
related functions) are improved.
Signed-off-by: Bruce Richardson <[email protected]>
Acked-by: Pavan Nikhilesh <[email protected]>
Acked-by: Jerin Jacob <[email protected]>
|
|
Improve the documentation text for the configuration functions and
structures for configuring an eventdev, as well as ports and queues.
Clarify text where possible, and ensure references come through as links
in the html output.
Signed-off-by: Bruce Richardson <[email protected]>
Acked-by: Pavan Nikhilesh <[email protected]>
Acked-by: Jerin Jacob <[email protected]>
|
|
General rewording and cleanup on the rte_event_dev_config structure.
Improved the wording of some sentences and created linked
cross-references out of the existing references to the dev_info
structure.
As part of the rework, fix issue with how single-link port-queue pairs
were counted in the rte_event_dev_config structure. This did not match
the actual implementation and, if following the documentation, certain
valid port/queue configurations would have been impossible to configure.
Fix this by changing the documentation to match the implementation
Bugzilla ID: 1368
Fixes: 75d113136f38 ("eventdev: express DLB/DLB2 PMD constraints")
Cc: [email protected]
Signed-off-by: Bruce Richardson <[email protected]>
Acked-by: Pavan Nikhilesh <[email protected]>
Acked-by: Jerin Jacob <[email protected]>
|
|
General improvements to the doxygen docs for eventdev functions for
querying basic information:
* number of devices
* id for a particular device
* socket id of device
* capability information for a device
Signed-off-by: Bruce Richardson <[email protected]>
Acked-by: Pavan Nikhilesh <[email protected]>
Acked-by: Jerin Jacob <[email protected]>
|
|
Some small rewording changes to the doxygen comments on struct
rte_event_dev_info.
Signed-off-by: Bruce Richardson <[email protected]>
Acked-by: Pavan Nikhilesh <[email protected]>
Acked-by: Jerin Jacob <[email protected]>
|
|
Update the device capability docs, to:
* include more cross-references
* split longer text into paragraphs, in most cases with each flag having
a single-line summary at the start of the doc block
* general comment rewording and clarification as appropriate
Signed-off-by: Bruce Richardson <[email protected]>
Acked-by: Pavan Nikhilesh <[email protected]>
Acked-by: Jerin Jacob <[email protected]>
|
|
Inside the doxygen introduction text, some internal details of how
eventdev works was mixed in with application-relevant details. Move
these details on probing etc. to the driver-relevant section.
Signed-off-by: Bruce Richardson <[email protected]>
Acked-by: Pavan Nikhilesh <[email protected]>
Acked-by: Jerin Jacob <[email protected]>
|
|
Make some textual improvements to the introduction to eventdev and event
devices in the eventdev header file. This text appears in the doxygen
output for the header file, and introduces the key concepts, for
example: events, event devices, queues, ports and scheduling.
This patch makes the following improvements:
* small textual fixups, e.g. correcting use of singular/plural
* rewrites of some sentences to improve clarity
* using doxygen markdown to split the whole large block up into
sections, thereby making it easier to read.
No large-scale changes are made, and blocks are not reordered
Signed-off-by: Bruce Richardson <[email protected]>
Acked-by: Pavan Nikhilesh <[email protected]>
Acked-by: Jerin Jacob <[email protected]>
|
|
Use RTE_LOG_LINE_PREFIX instead of RTE_LOG_LINE in macro expansions
which allows a prefix and arguments to be inserted into the log line
without the need to use the ## args variadic argument pack extension.
Signed-off-by: Tyler Retzlaff <[email protected]>
Acked-by: Morten Brørup <[email protected]>
Acked-by: Stephen Hemminger <[email protected]>
Acked-by: Konstantin Ananyev <[email protected]>
|
|
Rather than requiring that any device advertising the
RTE_EVENT_DEV_CAP_QUEUE_ALL_TYPES flag support all of atomic, ordered
and parallel scheduling, we can redefine the field so that it basically
means that you don't need to specify the queue scheduling type at config
time. Instead all types of supported events can be sent to all queues.
Suggested-by: Mattias Rönnblom <[email protected]>
Signed-off-by: Bruce Richardson <[email protected]>
Acked-by: Jerin Jacob <[email protected]>
|
|
Not all eventdev's support all scheduling types, for example, some may
only support atomic scheduling or others only support ordered
scheduling. There is currently no clear indication for each driver what
sched types it supports, so add capability flags to be indicated on
return from rte_event_dev_info_get() API.
Similarly add the possible scheduling types to the capabilities table in
the docs.
Signed-off-by: Bruce Richardson <[email protected]>
Acked-by: Jerin Jacob <[email protected]>
|
|
gcc [1] generates warning [2] about calloc usage, because calloc
parameter order is wrong, fixing it by replacing parameters.
[1]
gcc (GCC) 14.0.1 20240124 (experimental)
[2]
Compiling C object lib/librte_eventdev.a.p/eventdev_rte_eventdev.c.o
../lib/eventdev/rte_eventdev.c: In function ‘handle_dev_dump’:
../lib/eventdev/rte_eventdev.c:2005:29:
warning: ‘calloc’ sizes specified with ‘sizeof’ in the earlier
argument and not in the later argument [-Wcalloc-transposed-args]
2005 | buf = calloc(sizeof(char), RTE_TEL_MAX_SINGLE_STRING_LEN);
| ^~~~
Fixes: a3b7b476d723 ("eventdev: support telemetry dump eventdev")
Cc: [email protected]
Signed-off-by: Ferruh Yigit <[email protected]>
Acked-by: Morten Brørup <[email protected]>
Reviewed-by: Chengwen Feng <[email protected]>
|
|
Replace use of __alignof__(e) (resp. __alignof__(T) with C11
alignof(typeof(e)) (resp. alignof(T)) to improve portability
between toolchains.
Signed-off-by: Tyler Retzlaff <[email protected]>
Acked-by: Morten Brørup <[email protected]>
Acked-by: Chengwen Feng <[email protected]>
Acked-by: Anoob Joseph <[email protected]>
Acked-by: Volodymyr Fialko <[email protected]>
Acked-by: Akhil Goyal <[email protected]>
Acked-by: Ajit Khaparde <[email protected]>
|
|
With a little setup in eventdev_pmd.h, the eventdev drivers
and API can be converted to dynamic log type.
Signed-off-by: Stephen Hemminger <[email protected]>
|
|
Use RTE_LOG_LINE in existing macros that append a \n.
This will help catching unwanted newline character or multilines
in log messages.
Signed-off-by: David Marchand <[email protected]>
Reviewed-by: Chengwen Feng <[email protected]>
Reviewed-by: Andrew Rybchenko <[email protected]>
|
|
Fix places where two newline characters may be logged.
Cc: [email protected]
Signed-off-by: David Marchand <[email protected]>
Acked-by: Stephen Hemminger <[email protected]>
Reviewed-by: Chengwen Feng <[email protected]>
Acked-by: Mattias Rönnblom <[email protected]>
|
|
No printf!
When a dedicated log helper exists, use it.
And no usurpation please: a library should log under its logtype
(see the eventdev rx adapter update for example).
Note: the RTE_ETH_VALID_PORTID_OR_GOTO_ERR_RET macro is renamed for
consistency with the rest of eventdev (private) macros.
Cc: [email protected]
Signed-off-by: David Marchand <[email protected]>
Reviewed-by: Stephen Hemminger <[email protected]>
Reviewed-by: Tyler Retzlaff <[email protected]>
Reviewed-by: Andrew Rybchenko <[email protected]>
|
|
All API's in eventdev up to 22.11 release should be made stable.
Signed-off-by: Stephen Hemminger <[email protected]>
Acked-by: Jerin Jacob <[email protected]>
|
|
Rather than relying on the individual drivers to always populated the
driver name field in the info structure - something missed by some
drivers, we can do so in the eventdev rte_event_dev_info_get() function.
This fixes issues
Fixes: bbbb929da5e6 ("event/skeleton: add skeleton eventdev driver")
Fixes: 0ce3ce7c275c ("event/dpaa2: add configuration functions")
Cc: [email protected]
Suggested-by: David Marchand <[email protected]>
Signed-off-by: Bruce Richardson <[email protected]>
|
|
The eventdevs based on vdevs, rather than on e.g. HW PCI devices, were,
as a rule, not setting the ".dev" pointer in the eventdev structure.
This caused issues as a NULL pointer was returned in calls to info_get,
triggering crashes if the pointer is passed unchecked to e.g.
rte_dev_name() to print out the name of an event device.
Most effective, and future-proofed fix, is to not rely on the eventdev
drivers to set the pointer themselves, but to change the vdev init
function to take the vdev struct as parameter, and set the "dev" pointer
centrally on init. This allows us to fix all drivers in one go, enforced
by compiler error if the parameter is missing.
Fixes: aaa4a221da26 ("event/sw: add new software-only eventdev driver")
Fixes: 46a186b1f0c5 ("event/dsw: add device registration and build system")
Fixes: bbbb929da5e6 ("event/skeleton: add skeleton eventdev driver")
Fixes: 3c7f3dcfb099 ("event/opdl: add PMD main body and helper function")
Fixes: 9caac5dd1e7f ("event/dpaa: introduce PMD")
Fixes: 8a5d7a8ec74b ("event/dpaa2: initialize device")
Fixes: 34498de6000f ("event/octeontx: add octeontx eventdev driver")
Cc: [email protected]
Signed-off-by: Bruce Richardson <[email protected]>
Acked-by: David Marchand <[email protected]>
|
|
Replace the use of gcc builtin __atomic_xxx intrinsics with
corresponding rte_atomic_xxx optional stdatomic API
Signed-off-by: Tyler Retzlaff <[email protected]>
Acked-by: David Marchand <[email protected]>
|
|
The eventdev library doesn't need to put in place its own defines for
Linux and BSD. There are already defines for the OS environment in
rte_config.h that can be re-used, but since these are just for
identifying Linux/non-Linux, we can just check for the standard define
'__linux__' instead.
Signed-off-by: Bruce Richardson <[email protected]>
Acked-by: Jerin Jacob <[email protected]>
|
|
A collection of event queues linked to an event port can be
associated with a unique identifier called as a link profile, multiple
such profiles can be created based on the event device capability
using the function `rte_event_port_profile_links_set` which takes
arguments similar to `rte_event_port_link` in addition to the profile
identifier.
The maximum link profiles that are supported by an event device
is advertised through the structure member
`rte_event_dev_info::max_profiles_per_port`.
By default, event ports are configured to use the link profile 0
on initialization.
Once multiple link profiles are set up and the event device is started,
the application can use the function `rte_event_port_profile_switch`
to change the currently active profile on an event port. This effects
the next `rte_event_dequeue_burst` call, where the event queues
associated with the newly active link profile will participate in
scheduling.
An unlink function `rte_event_port_profile_unlink` is provided
to modify the links associated to a profile, and
`rte_event_port_profile_links_get` can be used to retrieve the
links associated with a profile.
Using Link profiles can reduce the overhead of linking/unlinking and
waiting for unlinks in progress in fast-path and gives applications
the ability to switch between preset profiles on the fly.
Signed-off-by: Pavan Nikhilesh <[email protected]>
Acked-by: Jerin Jacob <[email protected]>
|
|
Added support for DMA adapter event port get.
Signed-off-by: Amit Prakash Shukla <[email protected]>
|
|
Added API support to enqueue a DMA operation to the DMA driver.
Signed-off-by: Amit Prakash Shukla <[email protected]>
|
|
Added DMA adapter stats API support to get and reset stats.
DMA SW adapter stats and eventdev driver supported stats for
enqueue and dequeue are reported by get API.
Signed-off-by: Amit Prakash Shukla <[email protected]>
|
|
Added support to set and get runtime params for DMA adapter.
The parameters that can be set/get are defined in
struct rte_event_dma_adapter_runtime_params.
Signed-off-by: Amit Prakash Shukla <[email protected]>
|
|
Added API support to get DMA adapter service ID. Service ID
returned in the variable by the API call shall be used by
application to map a service core.
Signed-off-by: Amit Prakash Shukla <[email protected]>
|
|
Added API support to start and stop DMA adapter.
Signed-off-by: Amit Prakash Shukla <[email protected]>
|
|
Added support for DMA adapter service function for event devices.
Enqueue and dequeue of event from eventdev and DMA device are done
based on the adapter mode and the supported HW capabilities.
Signed-off-by: Amit Prakash Shukla <[email protected]>
|
|
Added API support to add and delete vchan's from the DMA adapter.
DMA devid and vchan are added to the adapter instance by calling
rte_event_dma_adapter_vchan_add() and deleted using
rte_event_dma_adapter_vchan_del().
Signed-off-by: Amit Prakash Shukla <[email protected]>
|