1 /* SPDX-License-Identifier: BSD-3-Clause
2 * Copyright 2020 Mellanox Technologies, Ltd
8 #include <rte_ethdev_driver.h>
9 #include <rte_interrupts.h>
11 #include <mlx5_glue.h>
12 #include <mlx5_devx_cmds.h>
13 #include <mlx5_common.h>
14 #include <mlx5_win_ext.h>
15 #include <mlx5_malloc.h>
19 * Get MAC address by querying netdevice.
22 * Pointer to Ethernet device.
24 * MAC address output buffer.
27 * 0 on success, a negative errno value otherwise and rte_errno is set.
30 mlx5_get_mac(struct rte_eth_dev *dev, uint8_t (*mac)[RTE_ETHER_ADDR_LEN])
32 struct mlx5_priv *priv;
33 mlx5_context_st *context_obj;
39 priv = dev->data->dev_private;
40 context_obj = (mlx5_context_st *)priv->sh->ctx;
41 memcpy(mac, context_obj->mlx5_dev.eth_mac, RTE_ETHER_ADDR_LEN);