rte_pmd_cnxk_crypto.h(3)

๐Ÿ’– NAME ๐Ÿ’–

rte_pmd_cnxk_crypto.h โ€” bestie, this is the manual page for it, page 3 of the Library Functions Manual, and it's all about the Marvell CNXK Crypto PMD. โœจ


๐ŸŒธ SYNOPSIS ๐ŸŒธ

#include <stdbool.h>
#include <stdint.h>
#include <rte_compat.h>
#include <rte_crypto.h>
#include <rte_security.h>

๐ŸŽ€ Data Structures ๐ŸŽ€

  • struct rte_pmd_cnxk_crypto_qp_stats โ€” Crypto CNXK queue pair stats. ๐Ÿ“Š
  • struct rte_pmd_cnxk_crypto_sess โ€” Crypto CNXK PMD session structure. ๐Ÿ—‚๏ธ
  • struct rte_pmd_cnxk_crypto_ae_ec_group_params โ€” AE EC (Elliptic Curve) group parameters structure. ๐ŸŒ€

๐ŸŒˆ Enumerations ๐ŸŒˆ

  • enum rte_pmd_cnxk_ae_ec_id

๐Ÿ‘‘ Functions ๐Ÿ‘‘

__rte_experimental struct rte_pmd_cnxk_crypto_qptr *
    rte_pmd_cnxk_crypto_qptr_get (uint8_t dev_id, uint16_t qp_id)
__rte_experimental void rte_pmd_cnxk_crypto_submit (struct
    rte_pmd_cnxk_crypto_qptr *qptr, void *inst, uint16_t nb_inst)
__rte_experimental int rte_pmd_cnxk_crypto_cptr_flush (struct
    rte_pmd_cnxk_crypto_qptr *qptr, struct rte_pmd_cnxk_crypto_cptr
    *cptr, bool invalidate)
__rte_experimental struct rte_pmd_cnxk_crypto_cptr *
    rte_pmd_cnxk_crypto_cptr_get (struct rte_pmd_cnxk_crypto_sess
    *rte_sess)
__rte_experimental int rte_pmd_cnxk_crypto_cptr_read (struct
    rte_pmd_cnxk_crypto_qptr *qptr, struct rte_pmd_cnxk_crypto_cptr
    *cptr, void *data, uint32_t len)
__rte_experimental int rte_pmd_cnxk_crypto_cptr_write (struct
    rte_pmd_cnxk_crypto_qptr *qptr, struct rte_pmd_cnxk_crypto_cptr
    *cptr, void *data, uint32_t len)
__rte_experimental int rte_pmd_cnxk_crypto_qp_stats_get (struct
    rte_pmd_cnxk_crypto_qptr *qptr, struct rte_pmd_cnxk_crypto_qp_stats
    *stats)
__rte_experimental const uint64_t * rte_pmd_cnxk_ae_fpm_table_get
    (uint8_t dev_id)
__rte_experimental const struct rte_pmd_cnxk_crypto_ae_ec_group_params
    ** rte_pmd_cnxk_ae_ec_grp_table_get (uint8_t dev_id, uint16_t
    *nb_max_entries)

๐Ÿ’… Detailed Description ๐Ÿ’…

Marvell CNXK Crypto PMD specific functions. That's the whole vibe of this header, fr fr.

Definition in file rte_pmd_cnxk_crypto.h. ๐Ÿ“„


๐Ÿฆ‹ Enumeration Type Documentation ๐Ÿฆ‹

enum rte_pmd_cnxk_ae_ec_id

Enumerates supported elliptic curves. ๐ŸŒˆ

Definition at line 26 of file rte_pmd_cnxk_crypto.h.

โœจ Function Documentation โœจ

๐Ÿซถ __rte_experimental struct rte_pmd_cnxk_crypto_qptr * rte_pmd_cnxk_crypto_qptr_get (uint8_t dev_id, uint16_t qp_id)

Get queue pointer of a specific queue in a cryptodev. like, the pointer you need to do anything. ๐Ÿ”‘

Parameters

  • dev_id โ€” Device identifier of cryptodev device.
  • qp_id โ€” Index of the queue pair.

Returns

  • On success, pointer to queue pair structure that would be the input to submit APIs. ๐ŸŽ‰
  • NULL on error. ๐Ÿ˜ญ

๐Ÿ’œ __rte_experimental void rte_pmd_cnxk_crypto_submit (struct rte_pmd_cnxk_crypto_qptr * qptr, void * inst, uint16_t nb_inst)

Submit CPT instruction (cpt_inst_s) to hardware (CPT). ๐Ÿš€

The qp is a pointer obtained from rte_pmd_cnxk_crypto_qp_get. Application should make sure it doesn't overflow the internal hardware queues. It may do so by making sure the inflight packets are not more than the number of descriptors configured.

This API may be called only after the cryptodev and queue pair is configured and is started. โš ๏ธ

Parameters

  • qptr โ€” Pointer obtained with rte_pmd_cnxk_crypto_qptr_get.
  • inst โ€” Pointer to an array of instructions prepared by application.
  • nb_inst โ€” Number of instructions.

๐ŸŒธ __rte_experimental int rte_pmd_cnxk_crypto_cptr_flush (struct rte_pmd_cnxk_crypto_qptr * qptr, struct rte_pmd_cnxk_crypto_cptr * cptr, bool invalidate)

Flush the CPTR from CPT CTX cache. ๐Ÿงน

This API must be called only after the cryptodev and queue pair is configured and is started.

Parameters

  • qptr โ€” Pointer obtained with rte_pmd_cnxk_crypto_qptr_get.
  • cptr โ€” Pointer obtained with rte_pmd_cnxk_crypto_cptr_get or any valid CPTR address that can be used with CPT CTX cache.
  • invalidate โ€” If true, invalidate the CTX cache entry. If false, flush the CTX cache entry.

Returns

  • 0 on success. โœ…
  • Negative value on error. ๐Ÿ’€
    • -EINVAL if the input parameters are invalid.
    • -ENOTSUP if the operation is not supported.
    • -EAGAIN if the operation is not successful.
    • -EFAULT if the operation failed.

๐Ÿงš __rte_experimental struct rte_pmd_cnxk_crypto_cptr * rte_pmd_cnxk_crypto_cptr_get (struct rte_pmd_cnxk_crypto_sess * rte_sess)

Get the HW CPTR pointer from the rte_crypto/rte_security session. ๐ŸŽŸ๏ธ

Parameters

  • rte_sess โ€” Pointer to the structure holding rte_cryptodev or rte_security session.

Returns

  • On success, pointer to the HW CPTR. ๐ŸŒŸ
  • NULL on error. ๐Ÿ˜ญ

๐Ÿ“ __rte_experimental int rte_pmd_cnxk_crypto_cptr_read (struct rte_pmd_cnxk_crypto_qptr * qptr, struct rte_pmd_cnxk_crypto_cptr * cptr, void * data, uint32_t len)

Read HW context (CPTR). ๐Ÿ“–

Parameters

  • qptr โ€” Pointer obtained with rte_pmd_cnxk_crypto_qptr_get.
  • cptr โ€” Pointer obtained with rte_pmd_cnxk_crypto_cptr_get or any valid CPTR address that can be used with CPT CTX cache.
  • data โ€” Destination pointer to copy CPTR context for application.
  • len โ€” Length of CPTR context to copy into data parameter.

Returns

  • 0 On success. โœ…
  • Negative value on error. ๐Ÿ’€
    • -EINVAL if the input parameters are invalid.
    • -ENOTSUP if the operation is not supported.
    • -EAGAIN if the operation is not successful.
    • -EFAULT if the operation failed.

๐ŸŒŸ __rte_experimental int rte_pmd_cnxk_crypto_cptr_write (struct rte_pmd_cnxk_crypto_qptr * qptr, struct rte_pmd_cnxk_crypto_cptr * cptr, void * data, uint32_t len)

Write HW context (CPTR). โœ๏ธ

Parameters

  • qptr โ€” Pointer obtained with rte_pmd_cnxk_crypto_qptr_get.
  • cptr โ€” Pointer obtained with rte_pmd_cnxk_crypto_cptr_get or any valid CPTR address that can be used with CPT CTX cache.
  • data โ€” Source pointer to copy CPTR context from application.
  • len โ€” Length of CPTR context to copy from data parameter.

Returns

  • 0 On success. โœ…
  • Negative value on error. ๐Ÿ’€
    • -EINVAL if the input parameters are invalid.
    • -ENOTSUP if the operation is not supported.
    • -EAGAIN if the operation is not successful.
    • -EFAULT if the operation failed.

๐Ÿ“Š __rte_experimental int rte_pmd_cnxk_crypto_qp_stats_get (struct rte_pmd_cnxk_crypto_qptr * qptr, struct rte_pmd_cnxk_crypto_qp_stats * stats)

Get the HW Queue Pair (LF) stats. ๐Ÿ‘€

Parameters

  • qptr โ€” Pointer obtained with rte_pmd_cnxk_crypto_qptr_get.
  • stats โ€” Pointer to the structure where stats will be copied.

Returns

  • 0 On success. โœ…
  • Negative value on error. ๐Ÿ’€
    • -EINVAL if the input parameters are invalid.

๐ŸŒ€ __rte_experimental const uint64_t * rte_pmd_cnxk_ae_fpm_table_get (uint8_t dev_id)

Retrieves the addresses of the AE FPM (Finite Precision Math) tables. ๐Ÿงฎ

This API should be called only after the cryptodev device has been successfully configured. The returned pointer reference memory that is valid as long as the device remains configured and is not destroyed or reconfigured. If the device is reconfigured or destroyed, the memory referenced by the returned pointer becomes invalid and must not be used. ๐Ÿ’€โš ๏ธ

bestie, that last sentence is not a drill โ€” that pointer goes stale the second the device gets reconfigured or destroyed.

Parameters

  • dev_id โ€” Device identifier of cryptodev device.

Returns

  • On success pointer to the AE FPM table addresses. ๐ŸŽ‰
  • NULL on error. ๐Ÿ˜ญ

๐Ÿงธ __rte_experimental const struct rte_pmd_cnxk_crypto_ae_ec_group_params ** rte_pmd_cnxk_ae_ec_grp_table_get (uint8_t dev_id, uint16_t * nb_max_entries)

Retrieves the addresses of the AE EC group table. ๐Ÿ—บ๏ธ

This API should be called only after the cryptodev device has been successfully configured. The returned pointer reference memory that is valid as long as the device remains configured and is not destroyed or reconfigured. If the device is reconfigured or destroyed, the memory referenced by the returned pointer becomes invalid and must not be used. ๐Ÿ’€โš ๏ธ

same energy as above, no cap โ€” stale pointer, do not touch.

Parameters

  • dev_id โ€” Device identifier of cryptodev device.
  • nb_max_entries โ€” Pointer to store the maximum number of entries in the EC group table. This value is set by the function to indicate how many entries can be retrieved from the table.

Returns

  • On success, pointer to the AE EC group table structure address. ๐ŸŒŸ
  • NULL on error. ๐Ÿ˜ญ

๐ŸŽ€ Author ๐ŸŽ€

Generated automatically by Doxygen for DPDK from the source code. ๐Ÿค–โœจ


okay that's the whole page, bestie, you ate it ๐Ÿ’… this was DPDK, Version 25.11.3, for the rte_pmd_cnxk_crypto.h(3) page โ€” go be the main character of your own cryptodev now ๐Ÿฆ‹๐Ÿ‘‘๐Ÿ’–

๐Ÿ“ฆ where this page comes from