Hi guys,
> -----Original Message-----
> From: Akhil Goyal [mailto:[email protected]]
> Sent: Saturday, October 14, 2017 11:17 PM
> To: [email protected]
> Cc: Doherty, Declan <[email protected]>; De Lara Guarch, Pablo
> <[email protected]>; [email protected];
> Nicolau, Radu <[email protected]>; [email protected];
> [email protected]; [email protected];
> [email protected]; [email protected]; Mcnamara, John
> <[email protected]>; Ananyev, Konstantin
> <[email protected]>; [email protected]; [email protected]
> Subject: [PATCH v4 06/12] ethdev: support security APIs
>
> From: Declan Doherty <[email protected]>
>
> rte_flow_action type and ethdev updated to support rte_security
> sessions for crypto offload to ethernet device.
>
> Signed-off-by: Boris Pismenny <[email protected]>
> Signed-off-by: Aviad Yehezkel <[email protected]>
> Signed-off-by: Radu Nicolau <[email protected]>
> Signed-off-by: Declan Doherty <[email protected]>
> ---
> lib/librte_ether/rte_ethdev.c | 11 +++++++++++
> lib/librte_ether/rte_ethdev.h | 18 ++++++++++++++++--
> lib/librte_ether/rte_ethdev_version.map | 1 +
> 3 files changed, 28 insertions(+), 2 deletions(-)
>
> diff --git a/lib/librte_ether/rte_ethdev.c b/lib/librte_ether/rte_ethdev.c
> index 0b1e928..9520f1e 100644
> --- a/lib/librte_ether/rte_ethdev.c
> +++ b/lib/librte_ether/rte_ethdev.c
> @@ -301,6 +301,17 @@ rte_eth_dev_socket_id(uint16_t port_id)
> return rte_eth_devices[port_id].data->numa_node;
> }
>
> +void *
> +rte_eth_dev_get_sec_ctx(uint8_t port_id)
> +{
> + RTE_ETH_VALID_PORTID_OR_ERR_RET(port_id, NULL);
> +
> + if (rte_eth_devices[port_id].data->dev_flags & RTE_ETH_DEV_SECURITY)
As you don't currently support MP, it is probably worth to add somewhere
(here or at PMD layer) check for process type.
Something like:
if (rte_eal_process_type() != RTE_PROC_PRIMARY)
return NULL;
or so.
Konstantin