We need to differentiate between crypto and ethernet security
context as they belong to different devices.
Fixes:
d82d6ac64338 ("app/procinfo: add crypto security context info")
Cc: stable@dpdk.org
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
#include <stdio.h>
#include <string.h>
#include <stdint.h>
+#include <stdbool.h>
#include <errno.h>
#include <stdarg.h>
#include <inttypes.h>
}
static void
-show_security_context(uint16_t portid)
+show_security_context(uint16_t portid, bool inline_offload)
{
- void *p_ctx = rte_eth_dev_get_sec_ctx(portid);
+ void *p_ctx;
const struct rte_security_capability *s_cap;
+ if (inline_offload)
+ p_ctx = rte_eth_dev_get_sec_ctx(portid);
+ else
+ p_ctx = rte_cryptodev_get_sec_ctx(portid);
+
if (p_ctx == NULL)
return;
}
#ifdef RTE_LIB_SECURITY
- show_security_context(i);
+ show_security_context(i, true);
#endif
}
}
}
#ifdef RTE_LIB_SECURITY
- show_security_context(i);
+ show_security_context(i, false);
#endif
}
}