Skip to content

Commit

Permalink
ipsec: fix C++ include
Browse files Browse the repository at this point in the history
[ upstream commit e82470e ]

C++ does not have automatic casting to/from void pointers, so need
explicit cast if header is to be included in C++ code

Fixes: f901d9c ("ipsec: add helpers to group completed crypto-ops")

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
  • Loading branch information
bruce-richardson authored and bluca committed Feb 17, 2022
1 parent 04eb6ce commit 97f298e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/librte_ipsec/rte_ipsec_group.h
Expand Up @@ -49,10 +49,10 @@ rte_ipsec_ses_from_crypto(const struct rte_crypto_op *cop)

if (cop->sess_type == RTE_CRYPTO_OP_SECURITY_SESSION) {
ss = cop->sym[0].sec_session;
return (void *)(uintptr_t)ss->opaque_data;
return (struct rte_ipsec_session *)(uintptr_t)ss->opaque_data;
} else if (cop->sess_type == RTE_CRYPTO_OP_WITH_SESSION) {
cs = cop->sym[0].session;
return (void *)(uintptr_t)cs->opaque_data;
return (struct rte_ipsec_session *)(uintptr_t)cs->opaque_data;
}
return NULL;
}
Expand Down

0 comments on commit 97f298e

Please sign in to comment.