#include <locale.h>
#include <unistd.h>
-#include <rte_ethdev.h>
+#include <rte_ethdev_driver.h>
#include <rte_malloc.h>
#include "ark_pktchkr.h"
struct ark_pkt_chkr_inst *inst =
rte_malloc("ark_pkt_chkr_inst",
sizeof(struct ark_pkt_chkr_inst), 0);
+ if (inst == NULL) {
+ PMD_DRV_LOG(ERR, "Failed to malloc ark_pkt_chkr_inst.\n");
+ return inst;
+ }
inst->sregs = (struct ark_pkt_chkr_stat_regs *)addr;
inst->cregs =
(struct ark_pkt_chkr_ctl_regs *)(((uint8_t *)addr) + 0x100);