#include <rte_debug.h>
#include <rte_memory.h>
#include <rte_memzone.h>
-#include <rte_tailq.h>
#include <rte_ether.h>
#include <rte_malloc.h>
#include <rte_launch.h>
*
*/
#define PACKET_DATA_START_PHYS(p) \
- ((p)->buf_physaddr + ((char *)p->data - (char *)p->buf_addr))
+ ((p)->buf_physaddr + (p)->data_off)
/*
* A fixed offset to where the crypto is to be performed, which is the first
}
pLocalInstanceHandles = rte_malloc("pLocalInstanceHandles",
- sizeof(CpaInstanceHandle) * numInstances, CACHE_LINE_SIZE);
+ sizeof(CpaInstanceHandle) * numInstances, RTE_CACHE_LINE_SIZE);
if (NULL == pLocalInstanceHandles) {
return CPA_STATUS_FAIL;
crypto_encrypt(struct rte_mbuf *rte_buff, enum cipher_alg c, enum hash_alg h)
{
CpaCySymDpOpData *opData =
- (CpaCySymDpOpData *) ((char *) (rte_buff->data)
+ (CpaCySymDpOpData *) (rte_pktmbuf_mtod(rte_buff, char *)
+ CRYPTO_OFFSET_TO_OPDATA);
uint32_t lcore_id;
crypto_decrypt(struct rte_mbuf *rte_buff, enum cipher_alg c, enum hash_alg h)
{
- CpaCySymDpOpData *opData = (void*) (((char *) rte_buff->data)
+ CpaCySymDpOpData *opData = (void*) (rte_pktmbuf_mtod(rte_buff, char *)
+ CRYPTO_OFFSET_TO_OPDATA);
uint32_t lcore_id;