History log of /dpdk/lib/eventdev/rte_event_crypto_adapter.c (Results 1 – 25 of 28)
Revision Date Author Comments
# ad12d08f 06-Jun-2024 Ganapati Kundapura <ganapati.kundapura@intel.com>

eventdev/crypto: fix opaque field handling

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 res

eventdev/crypto: fix opaque field handling

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: stable@dpdk.org

Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>

show more ...


# c6552d9a 04-Mar-2024 Tyler Retzlaff <roretzla@linux.microsoft.com>

lib: move alignment attribute on types for MSVC

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 to

lib: move alignment attribute on types for MSVC

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 <roretzla@linux.microsoft.com>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@huawei.com>
Acked-by: Chengwen Feng <fengchengwen@huawei.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>

show more ...


# f5d48ed5 28-Feb-2024 Ganapati Kundapura <ganapati.kundapura@intel.com>

eventdev/crypto: fix enqueueing

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 t

eventdev/crypto: fix enqueueing

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: stable@dpdk.org

Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>

show more ...


# ae282b06 17-Nov-2023 David Marchand <david.marchand@redhat.com>

lib: remove redundant newline from logs

Fix places where two newline characters may be logged.

Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemmi

lib: remove redundant newline from logs

Fix places where two newline characters may be logged.

Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>

show more ...


# 6c3c8886 03-Aug-2023 Ganapati Kundapura <ganapati.kundapura@intel.com>

eventdev/crypto: fix circular buffer full case

crypto ops from the circular buffer are not getting flushed
to crypto dev when crypto dev becomes busy and circular buffer
gets full.

Fix it by flushi

eventdev/crypto: fix circular buffer full case

crypto ops from the circular buffer are not getting flushed
to crypto dev when crypto dev becomes busy and circular buffer
gets full.

Fix it by flushing ops from circular buffer when circular buffer
is full instead of returning without flushing.

Fixes: 2ae84b39ae7b ("eventdev/crypto: store operations in circular buffer")
Cc: stable@dpdk.org

Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>

show more ...


# 22505558 18-Apr-2023 Ganapati Kundapura <ganapati.kundapura@intel.com>

eventdev/crypto: refactor circular buffer size

In case of CRYPTO_ADAPTER_OPS_BUFFER_SZ is modified,
eca_circular_buffer_space_for_batch() also needs to be updated
to check maximum number of crypto o

eventdev/crypto: refactor circular buffer size

In case of CRYPTO_ADAPTER_OPS_BUFFER_SZ is modified,
eca_circular_buffer_space_for_batch() also needs to be updated
to check maximum number of crypto ops can be accommodated in
circular buffer when CPM becomes busy.

Defined MAX_OPS_IN_BUFFER which contains size for batch of dequeued events
and redefined CRYPTO_ADAPTER_OPS_BUFFER_SZ in terms of MAX_OPS_IN_BUFFER.

This patch makes eca_circular_buffer_space_for_batch() independent of
circular buffer changes.

Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>

show more ...


# 04ed18cd 10-Feb-2023 Naga Harish K S V <s.v.naga.harish.k@intel.com>

eventdev/crypto: support runtime set/get parameters

The adapter runtime configuration parameters defined in the
struct rte_event_crypto_adapter_runtime_params can be configured
and retrieved using r

eventdev/crypto: support runtime set/get parameters

The adapter runtime configuration parameters defined in the
struct rte_event_crypto_adapter_runtime_params can be configured
and retrieved using rte_event_crypto_adapter_runtime_params_set()
and rte_event_crypto_adapter_runtime_params_get() respectively.

Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>

show more ...


# 7f2d9df6 02-Feb-2023 Amit Prakash Shukla <amitprakashs@marvell.com>

eventdev: add trace points

Add trace points for eventdev functions.

Signed-off-by: Amit Prakash Shukla <amitprakashs@marvell.com>
Acked-by: Shijith Thotton <sthotton@marvell.com>


# e55d9dca 12-Jan-2023 Naga Harish K S V <s.v.naga.harish.k@intel.com>

eventdev/crypto: update reconfigure logic

When rte_event_crypto_adapter_create() is used for creating adapter
instance, eventdev is reconfigured with additional
``rte_event_dev_config::nb_event_port

eventdev/crypto: update reconfigure logic

When rte_event_crypto_adapter_create() is used for creating adapter
instance, eventdev is reconfigured with additional
``rte_event_dev_config::nb_event_ports`` parameter.

This eventdev reconfig logic is enhanced to increment the
``rte_event_dev_config::nb_single_link_event_port_queues``
parameter if the adapter event port config is of type
``RTE_EVENT_PORT_CFG_SINGLE_LINK``.

With this change the application is no longer need to configure the
eventdev with ``rte_event_dev_config::nb_single_link_event_port_queues``
parameter required for crypto adapter when the adapter is created
using above mentioned API.

Signed-off-by: Naga Harish K S V <s.v.naga.harish.k@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>

show more ...


# 4b04134c 07-Dec-2022 Ganapati Kundapura <ganapati.kundapura@intel.com>

eventdev/crypto: fix failed events

Circular buffer stores events failed to enqueue to eventdev for
retrying later. Current implementation adds the same crypto op
to circular buffer instead of pointi

eventdev/crypto: fix failed events

Circular buffer stores events failed to enqueue to eventdev for
retrying later. Current implementation adds the same crypto op
to circular buffer instead of pointing all the ops in a batch.

This fix updates the pointer to pointing to correct ops in the batch.

Fixes: 7901eac3409a ("eventdev: add crypto adapter implementation")
Cc: stable@dpdk.org

Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>

show more ...


# f442c040 07-Dec-2022 Ganapati Kundapura <ganapati.kundapura@intel.com>

eventdev/crypto: fix overflow in circular buffer

In case of crypto enqueue failures, even though back pressure
flag is set to stop further dequeue from eventdev, the current
logic does not stop dequ

eventdev/crypto: fix overflow in circular buffer

In case of crypto enqueue failures, even though back pressure
flag is set to stop further dequeue from eventdev, the current
logic does not stop dequeueing events for max_nb events.

This is fixed by checking the back pressure just before
dequeuing events from event device.

Fixes: 7901eac3409a ("eventdev: add crypto adapter implementation")
Cc: stable@dpdk.org

Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>

show more ...


# da73a2a0 07-Dec-2022 Ganapati Kundapura <ganapati.kundapura@intel.com>

eventdev/crypto: fix offset used while flushing events

Events enqueued to eventdev from the beginning of the circular buffer.
This leads to invalid or already freed events getting enqueued to eventd

eventdev/crypto: fix offset used while flushing events

Events enqueued to eventdev from the beginning of the circular buffer.
This leads to invalid or already freed events getting enqueued to eventdev
from the circular buffer.

Fixed by enqueuing the events to eventdev from the head pointer of
circular buffer.

Fixes: 7901eac3409a ("eventdev: add crypto adapter implementation")
Cc: stable@dpdk.org

Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>

show more ...


# 04dac736 07-Dec-2022 Ganapati Kundapura <ganapati.kundapura@intel.com>

eventdev/crypto: fix enqueue count

crypto_enq_count is updated on failure to enqueue ops to cryptodev.
Updated crypto_enq_count on successful enqueue of ops to cryptodev.

Fixes: 7901eac3409a ("even

eventdev/crypto: fix enqueue count

crypto_enq_count is updated on failure to enqueue ops to cryptodev.
Updated crypto_enq_count on successful enqueue of ops to cryptodev.

Fixes: 7901eac3409a ("eventdev: add crypto adapter implementation")
Cc: stable@dpdk.org

Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>

show more ...


# 2bbaeada 07-Dec-2022 Ganapati Kundapura <ganapati.kundapura@intel.com>

eventdev/crypto: check implicit release for enqueue mode

In the current implementation adapter queries event device's capability for
implicit release support.

This information is used to decide whe

eventdev/crypto: check implicit release for enqueue mode

In the current implementation adapter queries event device's capability for
implicit release support.

This information is used to decide whether events are enqueued back as
NEW or FWD events.

This patch updates the adapter to query the port caps for implicit release
to decide on events enqueuing back as NEW/FWD events.

Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>

show more ...


# 8f4ff7de 18-Oct-2022 Ganapati Kundapura <ganapati.kundapura@intel.com>

eventdev/crypto: fix multi-process

Secondary process is not able to call the crypto adapter
APIs stats get/reset as crypto adapter memzone memory
is not accessible by secondary process.

Added memzo

eventdev/crypto: fix multi-process

Secondary process is not able to call the crypto adapter
APIs stats get/reset as crypto adapter memzone memory
is not accessible by secondary process.

Added memzone lookup so that secondary process can call the
crypto adapter APIs(stats_get etc)

Fixes: 7901eac3409a ("eventdev: add crypto adapter implementation")
Cc: stable@dpdk.org

Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>

show more ...


# 34d78557 10-Oct-2022 Mattias Rönnblom <mattias.ronnblom@ericsson.com>

eventdev/crypto: support appropriately report idle

Update the event crypto adapter's service function to report as idle
(i.e., return -EAGAIN) in case no crypto operations were performed.

Signed-of

eventdev/crypto: support appropriately report idle

Update the event crypto adapter's service function to report as idle
(i.e., return -EAGAIN) in case no crypto operations were performed.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>

show more ...


# c1749bc5 01-Oct-2022 Volodymyr Fialko <vfialko@marvell.com>

eventdev: introduce event cryptodev vector type

Introduce ability to aggregate crypto operations processed by event
crypto adapter into single event containing rte_event_vector whose event
type is R

eventdev: introduce event cryptodev vector type

Introduce ability to aggregate crypto operations processed by event
crypto adapter into single event containing rte_event_vector whose event
type is RTE_EVENT_TYPE_CRYPTODEV_VECTOR.

Application should set RTE_EVENT_CRYPTO_ADAPTER_EVENT_VECTOR in
rte_event_crypto_adapter_queue_conf::flag and provide vector configuration
with respect of rte_event_crypto_adapter_vector_limits, which could be
obtained by calling rte_event_crypto_adapter_vector_limits_get, to enable
vectorization.

The event crypto adapter would be responsible for vectorizing the crypto
operations based on provided response information in
rte_event_crypto_metadata::response_info.

Updated drivers and tests accordingly to new API.

Signed-off-by: Volodymyr Fialko <vfialko@marvell.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>

show more ...


# 1acb7f54 28-Jul-2022 David Marchand <david.marchand@redhat.com>

dev: hide driver object

Make rte_driver opaque for non internal users.
This will make extending this object possible without breaking the ABI.

Introduce a new driver header and move rte_driver defi

dev: hide driver object

Make rte_driver opaque for non internal users.
This will make extending this object possible without breaking the ABI.

Introduce a new driver header and move rte_driver definition.
Update drivers and library to use the internal header.

Some applications may have been dereferencing rte_driver objects, mark
this object's accessors as stable.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>

show more ...


# 8f1d23ec 23-Aug-2022 David Marchand <david.marchand@redhat.com>

eal: deprecate RTE_FUNC_PTR_* macros

Those macros have no real value and are easily replaced with a simple
if() block.

Existing users have been converted using a new cocci script.
Deprecate them.

eal: deprecate RTE_FUNC_PTR_* macros

Those macros have no real value and are easily replaced with a simple
if() block.

Existing users have been converted using a new cocci script.
Deprecate them.

Signed-off-by: David Marchand <david.marchand@redhat.com>

show more ...


# b8c8a6dd 12-May-2022 Akhil Goyal <gakhil@marvell.com>

eventdev: use new API to get event crypto metadata

For getting event crypto metadata from crypto_op,
the new API rte_cryptodev_get_session_event_mdata is used
instead of getting userdata inside PMD.

eventdev: use new API to get event crypto metadata

For getting event crypto metadata from crypto_op,
the new API rte_cryptodev_get_session_event_mdata is used
instead of getting userdata inside PMD.

Signed-off-by: Akhil Goyal <gakhil@marvell.com>
Acked-by: Fan Zhang <roy.fan.zhang@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>
Acked-by: Anoob Joseph <anoobj@marvell.com>

show more ...


# cc08c0b0 23-Feb-2022 Ganapati Kundapura <ganapati.kundapura@intel.com>

eventdev/crypto: remove useless check

eca_cryptodev_cdev_flush() is internal function and called with
valid range of cdevs.

crypto_cdev_info structure is allocated at adapter creation time
and retr

eventdev/crypto: remove useless check

eca_cryptodev_cdev_flush() is internal function and called with
valid range of cdevs.

crypto_cdev_info structure is allocated at adapter creation time
and retrieved from the adapter for a valid cdevs which cannot be NULL
and hence no need for NULL check.

Fixes: 2ae84b39ae7b ("eventdev/crypto: store operations in circular buffer")

Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>

show more ...


# 2ae84b39 10-Feb-2022 Ganapati Kundapura <ganapati.kundapura@intel.com>

eventdev/crypto: store operations in circular buffer

Move crypto ops to circular buffer to retain crypto
ops when cryptodev/eventdev are temporarily full.

Signed-off-by: Ganapati Kundapura <ganapat

eventdev/crypto: store operations in circular buffer

Move crypto ops to circular buffer to retain crypto
ops when cryptodev/eventdev are temporarily full.

Signed-off-by: Ganapati Kundapura <ganapati.kundapura@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>

show more ...


# 578402f2 01-Nov-2021 Mattias Rönnblom <mattias.ronnblom@ericsson.com>

eventdev: support device maintenance in adapters

Introduce support for event devices requiring calls to
rte_event_maintain() in the Ethernet RX, Timer and Crypto Eventdev
adapters.

Signed-off-by: M

eventdev: support device maintenance in adapters

Introduce support for event devices requiring calls to
rte_event_maintain() in the Ethernet RX, Timer and Crypto Eventdev
adapters.

Signed-off-by: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
Tested-by: Richard Eklycke <richard.eklycke@ericsson.com>

show more ...


# f26f2ca6 18-Oct-2021 Pavan Nikhilesh <pbhagavatula@marvell.com>

eventdev: make trace API internal

Slowpath trace APIs are only used in rte_eventdev.c so make them
as internal.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jay Jayatheerthan

eventdev: make trace API internal

Slowpath trace APIs are only used in rte_eventdev.c so make them
as internal.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>

show more ...


# a256a743 18-Oct-2021 Pavan Nikhilesh <pbhagavatula@marvell.com>

eventdev: remove rte prefix for internal structs

Remove rte_ prefix from rte_eth_event_enqueue_buffer,
rte_event_eth_rx_adapter and rte_event_crypto_adapter
as they are only used in rte_event_eth_rx

eventdev: remove rte prefix for internal structs

Remove rte_ prefix from rte_eth_event_enqueue_buffer,
rte_event_eth_rx_adapter and rte_event_crypto_adapter
as they are only used in rte_event_eth_rx_adapter.c and
rte_event_crypto_adapter.c

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jay Jayatheerthan <jay.jayatheerthan@intel.com>
Acked-by: Abhinandan Gujjar <abhinandan.gujjar@intel.com>

show more ...


12