> +
> +/**
> + * Security context for crypto/eth devices
> + *
> + * Security instance for each driver to register security operations.
> + * The application can get the security context from the crypto/eth device id
> + * using the APIs rte_cryptodev_get_sec_ctx()/rte_eth_dev_get_sec_ctx()
> + * This structure is used to identify the device(crypto/eth) for which the
> + * security operations need to be performed.
> + */
> +struct rte_security_ctx {
> +     enum {
> +             RTE_SECURITY_INSTANCE_INVALID,
> +             /**< Security context is invalid */
> +             RTE_SECURITY_INSTANCE_VALID
> +             /**< Security context is valid */
> +     } state;

As a nit - why do you need state now?
As I understand if device doesn't have its security context setup properly,
then rte_eth_dev_get_sec_ctx() would just return 0.
Konstantin 

> +     /**< Current state of security context */
> +     void *device;
> +     /**< Crypto/ethernet device attached */
> +     struct rte_security_ops *ops;
> +     /**< Pointer to security ops for the device */
> +     uint16_t sess_cnt;
> +     /**< Number of sessions attached to this context */
> +};

Reply via email to