OpenDataPlane / odp

The ODP project is an open-source, cross-platform set of application programming interfaces (APIs) for the networking data plane
https://opendataplane.org
Other
177 stars 134 forks source link

API: crypto: return value of `odp_crypto_cipher_capability`/`odp_crypto_auth_capability` #652

Open lumag opened 6 years ago

lumag commented 6 years ago

Currently we enforce that crypto capabilities retrieval functions always return same value for 'number of capability structures'. This helps one to use following code sequence easily:

int num_caps = odp_crypto_cipher_capability(ODP_CIPHER_ALG_AES_CBC, NULL, 0);
odp_crypto_cipher_capability_t capa[num_caps];
int ret = odp_crypto_cipher_capability(ODP_CIPHER_ALG_AES_CBC, capa, num_caps);
int i;

for (i = 0; i < num_capa; i++)
    do_something(&capa[i]);

For ODP-DPDK this might lead to inclusion of duplicate or overlapping entries in capabilties structure. Options to consider:

Bill-Fischofer-Linaro commented 6 years ago

@lumag is this issue still current?

lumag commented 6 years ago

@Bill-Fischofer-Linaro sure it is.