#include <sys/ioctl.h>
#include <ifaddrs.h>
-#include <rte_malloc.h>
-
/* This header declares the driver interface we implement */
#include <fman.h>
#include <of.h>
{
struct fman_if_bpool *bp, *tmpbp;
+ if (!__if)
+ return;
+
if (__if->__if.mac_type == fman_offline)
goto cleanup;
list_for_each_entry_safe(bp, tmpbp, &__if->__if.bpool_list, node) {
list_del(&bp->node);
- rte_free(bp);
+ free(bp);
}
cleanup:
- rte_free(__if);
+ free(__if);
}
static int
mprop = "fsl,fman-mac";
/* Allocate an object for this network interface */
- __if = rte_malloc(NULL, sizeof(*__if), RTE_CACHE_LINE_SIZE);
+ __if = malloc(sizeof(*__if));
if (!__if) {
FMAN_ERR(-ENOMEM, "malloc(%zu)\n", sizeof(*__if));
goto err;
uint64_t bpool_host[6] = {0};
const char *pname;
/* Allocate an object for the pool */
- bpool = rte_malloc(NULL, sizeof(*bpool), RTE_CACHE_LINE_SIZE);
+ bpool = malloc(sizeof(*bpool));
if (!bpool) {
FMAN_ERR(-ENOMEM, "malloc(%zu)\n", sizeof(*bpool));
goto err;
-errno, strerror(errno));
printf("Tearing down %s\n", __if->node_path);
list_del(&__if->__if.node);
- rte_free(__if);
+ free(__if);
}
close(fman_ccsr_map_fd);
/* reset bpool list, initialize bpool dynamically */
list_for_each_entry_safe(bp, tmp_bp, &cfg->fman_if->bpool_list, node) {
list_del(&bp->node);
- rte_free(bp);
+ free(bp);
}
/* Populate ethdev structure */