1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728
|
/* SPDX-License-Identifier: BSD-3-Clause
* Copyright(c) 2015-2020 Intel Corporation.
*/
#ifndef _CRYPTODEV_PMD_H_
#define _CRYPTODEV_PMD_H_
/** @file
* RTE Crypto PMD APIs
*
* @note
* These API are from crypto PMD only and user applications should not call
* them directly.
*/
#include <string.h>
#include <dev_driver.h>
#include <rte_compat.h>
#include <rte_malloc.h>
#include <rte_log.h>
#include <rte_common.h>
#include "rte_crypto.h"
#include "rte_cryptodev.h"
#ifdef __cplusplus
extern "C" {
#endif
#define RTE_CRYPTODEV_PMD_DEFAULT_MAX_NB_QUEUE_PAIRS 8
#define RTE_CRYPTODEV_PMD_NAME_ARG ("name")
#define RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG ("max_nb_queue_pairs")
#define RTE_CRYPTODEV_PMD_SOCKET_ID_ARG ("socket_id")
static const char * const cryptodev_pmd_valid_params[] = {
RTE_CRYPTODEV_PMD_NAME_ARG,
RTE_CRYPTODEV_PMD_MAX_NB_QP_ARG,
RTE_CRYPTODEV_PMD_SOCKET_ID_ARG,
NULL
};
/**
* @internal
* Initialisation parameters for crypto devices
*/
struct rte_cryptodev_pmd_init_params {
char name[RTE_CRYPTODEV_NAME_MAX_LEN];
size_t private_data_size;
int socket_id;
unsigned int max_nb_queue_pairs;
};
/**
* @internal
* The data part, with no function pointers, associated with each device.
*
* This structure is safe to place in shared memory to be common among
* different processes in a multi-process configuration.
*/
struct __rte_cache_aligned rte_cryptodev_data {
/** Device ID for this instance */
uint8_t dev_id;
/** Socket ID where memory is allocated */
int socket_id;
/** Unique identifier name */
char name[RTE_CRYPTODEV_NAME_MAX_LEN];
__extension__
/** Device state: STARTED(1)/STOPPED(0) */
uint8_t dev_started : 1;
/** Session memory pool */
struct rte_mempool *session_pool;
/** Array of pointers to queue pairs. */
void **queue_pairs;
/** Number of device queue pairs. */
uint16_t nb_queue_pairs;
/** PMD-specific private data */
void *dev_private;
};
/** @internal The data structure associated with each crypto device. */
struct __rte_cache_aligned rte_cryptodev {
/** Pointer to PMD dequeue function. */
dequeue_pkt_burst_t dequeue_burst;
/** Pointer to PMD enqueue function. */
enqueue_pkt_burst_t enqueue_burst;
/** Pointer to device data */
struct rte_cryptodev_data *data;
/** Functions exported by PMD */
struct rte_cryptodev_ops *dev_ops;
/** Feature flags exposes HW/SW features for the given device */
uint64_t feature_flags;
/** Backing device */
struct rte_device *device;
/** Crypto driver identifier*/
uint8_t driver_id;
/** User application callback for interrupts if present */
struct rte_cryptodev_cb_list link_intr_cbs;
/** Context for security ops */
void *security_ctx;
__extension__
/** Flag indicating the device is attached */
uint8_t attached : 1;
/** User application callback for pre enqueue processing */
struct rte_cryptodev_cb_rcu *enq_cbs;
/** User application callback for post dequeue processing */
struct rte_cryptodev_cb_rcu *deq_cbs;
/** Pointer to PMD function to get used queue pair depth */
crypto_qp_depth_used_t qp_depth_used;
};
/** Global structure used for maintaining state of allocated crypto devices */
struct rte_cryptodev_global {
struct rte_cryptodev *devs; /**< Device information array */
struct rte_cryptodev_data *data[RTE_CRYPTO_MAX_DEVS];
/**< Device private data */
uint8_t nb_devs; /**< Number of devices found */
};
/* Cryptodev driver, containing the driver ID */
struct cryptodev_driver {
RTE_TAILQ_ENTRY(cryptodev_driver) next; /**< Next in list. */
const struct rte_driver *driver;
uint8_t id;
};
/** Cryptodev symmetric crypto session
* Each session is derived from a fixed xform chain. Therefore each session
* has a fixed algo, key, op-type, digest_len etc.
*/
struct rte_cryptodev_sym_session {
uint64_t opaque_data;
/**< Can be used for external metadata */
uint32_t sess_data_sz;
/**< Pointer to the user data stored after sess data */
uint16_t user_data_sz;
/**< Session user data will be placed after sess data */
uint8_t driver_id;
/**< Driver id to get the session priv */
rte_iova_t driver_priv_data_iova;
/**< Session driver data IOVA address */
alignas(RTE_CACHE_LINE_MIN_SIZE)
/**< Second cache line - start of the driver session data */
uint8_t driver_priv_data[];
/**< Driver specific session data, variable size */
};
/**
* Helper macro to get driver private data
*/
#define CRYPTODEV_GET_SYM_SESS_PRIV(s) \
((void *)(((struct rte_cryptodev_sym_session *)s)->driver_priv_data))
#define CRYPTODEV_GET_SYM_SESS_PRIV_IOVA(s) \
(((struct rte_cryptodev_sym_session *)s)->driver_priv_data_iova)
/**
* Get the rte_cryptodev structure device pointer for the device. Assumes a
* valid device index.
*
* @param dev_id Device ID value to select the device structure.
*
* @return
* - The rte_cryptodev structure pointer for the given device ID.
*/
__rte_internal
struct rte_cryptodev *
rte_cryptodev_pmd_get_dev(uint8_t dev_id);
/**
* Get the rte_cryptodev structure device pointer for the named device.
*
* @param name device name to select the device structure.
*
* @return
* - The rte_cryptodev structure pointer for the given device ID.
*/
__rte_internal
struct rte_cryptodev *
rte_cryptodev_pmd_get_named_dev(const char *name);
/**
* Definitions of all functions exported by a driver through the
* generic structure of type *crypto_dev_ops* supplied in the
* *rte_cryptodev* structure associated with a device.
*/
/**
* Function used to configure device.
*
* @param dev Crypto device pointer
* @param config Crypto device configurations
*
* @return Returns 0 on success
*/
typedef int (*cryptodev_configure_t)(struct rte_cryptodev *dev,
struct rte_cryptodev_config *config);
/**
* Function used to start a configured device.
*
* @param dev Crypto device pointer
*
* @return Returns 0 on success
*/
typedef int (*cryptodev_start_t)(struct rte_cryptodev *dev);
/**
* Function used to stop a configured device.
*
* @param dev Crypto device pointer
*/
typedef void (*cryptodev_stop_t)(struct rte_cryptodev *dev);
/**
* Function used to close a configured device.
*
* @param dev Crypto device pointer
* @return
* - 0 on success.
* - EAGAIN if can't close as device is busy
*/
typedef int (*cryptodev_close_t)(struct rte_cryptodev *dev);
/**
* Function used to get statistics of a device.
*
* @param dev Crypto device pointer
* @param stats Pointer to crypto device stats structure to populate
*/
typedef void (*cryptodev_stats_get_t)(struct rte_cryptodev *dev,
struct rte_cryptodev_stats *stats);
/**
* Function used to reset statistics of a device.
*
* @param dev Crypto device pointer
*/
typedef void (*cryptodev_stats_reset_t)(struct rte_cryptodev *dev);
/**
* Function used to get specific information of a device.
*
* @param dev Crypto device pointer
* @param dev_info Pointer to infos structure to populate
*/
typedef void (*cryptodev_info_get_t)(struct rte_cryptodev *dev,
struct rte_cryptodev_info *dev_info);
/**
* Setup a queue pair for a device.
*
* @param dev Crypto device pointer
* @param qp_id Queue Pair Index
* @param qp_conf Queue configuration structure
* @param socket_id Socket Index
*
* @return Returns 0 on success.
*/
typedef int (*cryptodev_queue_pair_setup_t)(struct rte_cryptodev *dev,
uint16_t qp_id, const struct rte_cryptodev_qp_conf *qp_conf,
int socket_id);
/**
* Release memory resources allocated by given queue pair.
*
* @param dev Crypto device pointer
* @param qp_id Queue Pair Index
*
* @return
* - 0 on success.
* - EAGAIN if can't close as device is busy
*/
typedef int (*cryptodev_queue_pair_release_t)(struct rte_cryptodev *dev,
uint16_t qp_id);
/**
* Reset or reconfigure a queue pair for a device.
*
* @param dev Crypto device pointer
* @param qp_id Queue pair index
* @param qp_conf Queue configuration structure
* @param socket_id Socket index
*
* @return
* - 0: on success.
* - ENOTSUP: if crypto device does not support the operation.
*/
typedef int (*cryptodev_queue_pair_reset_t)(struct rte_cryptodev *dev,
uint16_t qp_id, const struct rte_cryptodev_qp_conf *qp_conf,
int socket_id);
/**
* Create a session mempool to allocate sessions from
*
* @param dev Crypto device pointer
* @param nb_objs number of sessions objects in mempool
* @param obj_cache_size l-core object cache size, see *rte_ring_create*
* @param socket_id Socket Id to allocate mempool on.
*
* @return
* - On success returns a pointer to a rte_mempool
* - On failure returns a NULL pointer
*/
typedef int (*cryptodev_sym_create_session_pool_t)(
struct rte_cryptodev *dev, unsigned nb_objs,
unsigned obj_cache_size, int socket_id);
/**
* Get the size of a cryptodev session
*
* @param dev Crypto device pointer
*
* @return
* - On success returns the size of the session structure for device
* - On failure returns 0
*/
typedef unsigned (*cryptodev_sym_get_session_private_size_t)(
struct rte_cryptodev *dev);
/**
* Get the size of a asymmetric cryptodev session
*
* @param dev Crypto device pointer
*
* @return
* - On success returns the size of the session structure for device
* - On failure returns 0
*/
typedef unsigned int (*cryptodev_asym_get_session_private_size_t)(
struct rte_cryptodev *dev);
/**
* Configure a Crypto session on a device.
*
* @param dev Crypto device pointer
* @param xform Single or chain of crypto xforms
* @param session Pointer to cryptodev's private session structure
*
* @return
* - Returns 0 if private session structure have been created successfully.
* - Returns -EINVAL if input parameters are invalid.
* - Returns -ENOTSUP if crypto device does not support the crypto transform.
* - Returns -ENOMEM if the private session could not be allocated.
*/
typedef int (*cryptodev_sym_configure_session_t)(struct rte_cryptodev *dev,
struct rte_crypto_sym_xform *xform,
struct rte_cryptodev_sym_session *session);
/**
* Configure a Crypto asymmetric session on a device.
*
* @param dev Crypto device pointer
* @param xform Single or chain of crypto xforms
* @param session Pointer to cryptodev's private session structure
*
* @return
* - Returns 0 if private session structure have been created successfully.
* - Returns -EINVAL if input parameters are invalid.
* - Returns -ENOTSUP if crypto device does not support the crypto transform.
* - Returns -ENOMEM if the private session could not be allocated.
*/
typedef int (*cryptodev_asym_configure_session_t)(struct rte_cryptodev *dev,
struct rte_crypto_asym_xform *xform,
struct rte_cryptodev_asym_session *session);
/**
* Free driver private session data.
*
* @param dev Crypto device pointer
* @param sess Cryptodev session structure
*/
typedef void (*cryptodev_sym_free_session_t)(struct rte_cryptodev *dev,
struct rte_cryptodev_sym_session *sess);
/**
* Clear asymmetric session private data.
*
* @param dev Crypto device pointer
* @param sess Cryptodev session structure
*/
typedef void (*cryptodev_asym_clear_session_t)(struct rte_cryptodev *dev,
struct rte_cryptodev_asym_session *sess);
/**
* Perform actual crypto processing (encrypt/digest or auth/decrypt)
* on user provided data.
*
* @param dev Crypto device pointer
* @param sess Cryptodev session structure
* @param ofs Start and stop offsets for auth and cipher operations
* @param vec Vectorized operation descriptor
*
* @return
* - Returns number of successfully processed packets.
*/
typedef uint32_t (*cryptodev_sym_cpu_crypto_process_t)
(struct rte_cryptodev *dev, struct rte_cryptodev_sym_session *sess,
union rte_crypto_sym_ofs ofs, struct rte_crypto_sym_vec *vec);
/**
* Typedef that the driver provided to get service context private date size.
*
* @param dev Crypto device pointer.
*
* @return
* - On success return the size of the device's service context private data.
* - On failure return negative integer.
*/
typedef int (*cryptodev_sym_get_raw_dp_ctx_size_t)(struct rte_cryptodev *dev);
/**
* Typedef that the driver provided to configure raw data-path context.
*
* @param dev Crypto device pointer.
* @param qp_id Crypto device queue pair index.
* @param ctx The raw data-path context data.
* @param sess_type session type.
* @param session_ctx Session context data. If NULL the driver
* shall only configure the drv_ctx_data in
* ctx buffer. Otherwise the driver shall only
* parse the session_ctx to set appropriate
* function pointers in ctx.
* @param is_update Set 0 if it is to initialize the ctx.
* Set 1 if ctx is initialized and only to update
* session context data.
* @return
* - On success return 0.
* - On failure return negative integer.
*/
typedef int (*cryptodev_sym_configure_raw_dp_ctx_t)(
struct rte_cryptodev *dev, uint16_t qp_id,
struct rte_crypto_raw_dp_ctx *ctx,
enum rte_crypto_op_sess_type sess_type,
union rte_cryptodev_session_ctx session_ctx, uint8_t is_update);
/**
* Typedef that the driver provided to set event crypto meta data.
*
* @param dev Crypto device pointer.
* @param sess Crypto or security session.
* @param op_type Operation type.
* @param sess_type Session type.
* @param ev_mdata Pointer to the event crypto meta data
* (aka *union rte_event_crypto_metadata*)
* @return
* - On success return 0.
* - On failure return negative integer.
*/
typedef int (*cryptodev_session_event_mdata_set_t)(
struct rte_cryptodev *dev, void *sess,
enum rte_crypto_op_type op_type,
enum rte_crypto_op_sess_type sess_type,
void *ev_mdata);
/**
* @internal Query queue pair error interrupt event.
* @see rte_cryptodev_queue_pair_event_error_query()
*/
typedef int (*cryptodev_queue_pair_event_error_query_t)(struct rte_cryptodev *dev,
uint16_t qp_id);
/** Crypto device operations function pointer table */
struct rte_cryptodev_ops {
cryptodev_configure_t dev_configure; /**< Configure device. */
cryptodev_start_t dev_start; /**< Start device. */
cryptodev_stop_t dev_stop; /**< Stop device. */
cryptodev_close_t dev_close; /**< Close device. */
cryptodev_info_get_t dev_infos_get; /**< Get device info. */
cryptodev_stats_get_t stats_get;
/**< Get device statistics. */
cryptodev_stats_reset_t stats_reset;
/**< Reset device statistics. */
cryptodev_queue_pair_setup_t queue_pair_setup;
/**< Set up a device queue pair. */
cryptodev_queue_pair_release_t queue_pair_release;
/**< Release a queue pair. */
cryptodev_queue_pair_reset_t queue_pair_reset;
/**< Reset a queue pair. */
cryptodev_sym_get_session_private_size_t sym_session_get_size;
/**< Return private session. */
cryptodev_asym_get_session_private_size_t asym_session_get_size;
/**< Return asym session private size. */
cryptodev_sym_configure_session_t sym_session_configure;
/**< Configure a Crypto session. */
cryptodev_asym_configure_session_t asym_session_configure;
/**< Configure asymmetric Crypto session. */
cryptodev_sym_free_session_t sym_session_clear;
/**< Clear a Crypto sessions private data. */
cryptodev_asym_clear_session_t asym_session_clear;
/**< Clear a Crypto sessions private data. */
union {
cryptodev_sym_cpu_crypto_process_t sym_cpu_process;
/**< process input data synchronously (cpu-crypto). */
__extension__
struct {
cryptodev_sym_get_raw_dp_ctx_size_t
sym_get_raw_dp_ctx_size;
/**< Get raw data path service context data size. */
cryptodev_sym_configure_raw_dp_ctx_t
sym_configure_raw_dp_ctx;
/**< Initialize raw data path context data. */
};
};
cryptodev_session_event_mdata_set_t session_ev_mdata_set;
/**< Set a Crypto or Security session even meta data. */
cryptodev_queue_pair_event_error_query_t queue_pair_event_error_query;
/**< Query queue error interrupt event */
};
/**
* Function for internal use by dummy drivers primarily, e.g. ring-based
* driver.
* Allocates a new cryptodev slot for an crypto device and returns the pointer
* to that slot for the driver to use.
*
* @param name Unique identifier name for each device
* @param socket_id Socket to allocate resources on.
* @return
* - Slot in the rte_dev_devices array for a new device;
*/
__rte_internal
struct rte_cryptodev *
rte_cryptodev_pmd_allocate(const char *name, int socket_id);
/**
* Function for internal use by dummy drivers primarily, e.g. ring-based
* driver.
* Release the specified cryptodev device.
*
* @param cryptodev
* The *cryptodev* pointer is the address of the *rte_cryptodev* structure.
* @return
* - 0 on success, negative on error
*/
__rte_internal
int
rte_cryptodev_pmd_release_device(struct rte_cryptodev *cryptodev);
/**
* @internal
*
* PMD assist function to parse initialisation arguments for crypto driver
* when creating a new crypto PMD device instance.
*
* PMD should set default values for that PMD before calling function,
* these default values will be over-written with successfully parsed values
* from args string.
*
* @param params parsed PMD initialisation parameters
* @param args input argument string to parse
*
* @return
* - 0 on success
* - errno on failure
*/
__rte_internal
int
rte_cryptodev_pmd_parse_input_args(
struct rte_cryptodev_pmd_init_params *params,
const char *args);
/**
* @internal
*
* PMD assist function to provide boiler plate code for crypto driver to create
* and allocate resources for a new crypto PMD device instance.
*
* @param name crypto device name.
* @param device base device instance
* @param params PMD initialisation parameters
*
* @return
* - crypto device instance on success
* - NULL on creation failure
*/
__rte_internal
struct rte_cryptodev *
rte_cryptodev_pmd_create(const char *name,
struct rte_device *device,
struct rte_cryptodev_pmd_init_params *params);
/**
* @internal
*
* PMD assist function to provide boiler plate code for crypto driver to
* destroy and free resources associated with a crypto PMD device instance.
*
* @param cryptodev crypto device handle.
*
* @return
* - 0 on success
* - errno on failure
*/
__rte_internal
int
rte_cryptodev_pmd_destroy(struct rte_cryptodev *cryptodev);
/**
* Executes all the user application registered callbacks for the specific
* device.
* *
* @param dev Pointer to cryptodev struct
* @param event Crypto device interrupt event type.
*
* @return
* void
*/
__rte_internal
void rte_cryptodev_pmd_callback_process(struct rte_cryptodev *dev,
enum rte_cryptodev_event_type event);
/**
* @internal
* Create unique device name
*/
__rte_internal
int
rte_cryptodev_pmd_create_dev_name(char *name, const char *dev_name_prefix);
/**
* @internal
* Allocate Cryptodev driver.
*
* @param crypto_drv
* Pointer to cryptodev_driver.
* @param drv
* Pointer to rte_driver.
*
* @return
* The driver type identifier
*/
__rte_internal
uint8_t rte_cryptodev_allocate_driver(struct cryptodev_driver *crypto_drv,
const struct rte_driver *drv);
/**
* @internal
* This is the last step of device probing. It must be called after a
* cryptodev is allocated and initialized successfully.
*
* @param dev Pointer to cryptodev struct
*
* @return
* void
*/
__rte_internal
void
rte_cryptodev_pmd_probing_finish(struct rte_cryptodev *dev);
#define RTE_PMD_REGISTER_CRYPTO_DRIVER(crypto_drv, drv, driver_id)\
RTE_INIT(init_ ##driver_id)\
{\
driver_id = rte_cryptodev_allocate_driver(&crypto_drv, &(drv));\
}
/* Reset crypto device fastpath APIs to dummy values. */
__rte_internal
void
cryptodev_fp_ops_reset(struct rte_crypto_fp_ops *fp_ops);
/* Setup crypto device fastpath APIs. */
__rte_internal
void
cryptodev_fp_ops_set(struct rte_crypto_fp_ops *fp_ops,
const struct rte_cryptodev *dev);
/**
* Get session event meta data (aka *union rte_event_crypto_metadata*)
*
* @param op pointer to *rte_crypto_op* structure.
*
* @return
* - On success, pointer to event crypto metadata
* - On failure, NULL.
*/
__rte_internal
void *
rte_cryptodev_session_event_mdata_get(struct rte_crypto_op *op);
/**
* @internal
* Cryptodev asymmetric crypto session.
*/
struct rte_cryptodev_asym_session {
uint8_t driver_id;
/**< Session driver ID. */
uint16_t max_priv_data_sz;
/**< Size of private data used when creating mempool */
uint16_t user_data_sz;
/**< Session user data will be placed after sess_data */
uint8_t padding[3];
void *event_mdata;
/**< Event metadata (aka *union rte_event_crypto_metadata*) */
uint8_t sess_private_data[];
};
/**
* Helper macro to get session private data
*/
#define CRYPTODEV_GET_ASYM_SESS_PRIV(s) \
((void *)(((struct rte_cryptodev_asym_session *)s)->sess_private_data))
#ifdef __cplusplus
}
#endif
#endif /* _CRYPTODEV_PMD_H_ */
|