[dpdk-dev] [PATCH v4 01/12] lib/rte_security: add security library
Akhil Goyal
akhil.goyal at nxp.com
Sat Oct 21 17:54:34 CEST 2017
On 10/19/2017 3:00 PM, Ananyev, Konstantin wrote:
>
>
>> +
>> +/**
>> + * 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
Ok would remove it in v5.
>
>> + /**< 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 */
>> +};
>
More information about the dev
mailing list