#include <stdint.h>
#include <unistd.h>
-
-/*
- * Not needed by this file; included to work around the lack of off_t
- * definition for mlx5dv.h with unpatched rdma-core versions.
- */
-#include <sys/types.h>
-
-/* Verbs headers do not support -pedantic. */
-#ifdef PEDANTIC
-#pragma GCC diagnostic ignored "-Wpedantic"
-#endif
-#include <infiniband/mlx5dv.h>
-#include <infiniband/verbs.h>
-#ifdef PEDANTIC
-#pragma GCC diagnostic error "-Wpedantic"
-#endif
-
#include <rte_ethdev_driver.h>
#include <rte_common.h>
#include <rte_malloc.h>
#include <mlx5_glue.h>
#include <mlx5_devx_cmds.h>
#include <mlx5_nl.h>
+#include <mlx5_malloc.h>
#include "mlx5.h"
#include "mlx5_autoconf.h"
*/
return NULL;
}
- vmwa = rte_zmalloc(__func__, sizeof(*vmwa), sizeof(uint32_t));
+ vmwa = mlx5_malloc(MLX5_MEM_ZERO, sizeof(*vmwa), sizeof(uint32_t),
+ SOCKET_ID_ANY);
if (!vmwa) {
DRV_LOG(WARNING,
"Can not allocate memory"
DRV_LOG(WARNING,
"Can not create Netlink socket"
" for VLAN workaround context");
- rte_free(vmwa);
+ mlx5_free(vmwa);
return NULL;
}
vmwa->vf_ifindex = ifindex;
}
if (vmwa->nl_socket >= 0)
close(vmwa->nl_socket);
- rte_free(vmwa);
+ mlx5_free(vmwa);
}