[V3,2/2] ethdev: document default and non-default MAC address
Checks
Commit Message
From: Huisong Li <lihuisong@huawei.com>
The rte_eth_dev_data::mac_addrs is a MAC address array. The index zero of
this array is as the default address index, and other indexes can't be the
same as the address corresponding to index 0. If we break it, may cause
following problems:
1) waste of MAC address spaces.
2) a fake MAC address in the MAC list, isn't in hardware MAC entries.
3) a MAC address is assigned to diffent pool.
Signed-off-by: Huisong Li <lihuisong@huawei.com>
Signed-off-by: Min Hu <humin29@huawei.com>
---
lib/ethdev/ethdev_driver.h | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
@@ -115,7 +115,12 @@ struct rte_eth_dev_data {
uint64_t rx_mbuf_alloc_failed; /**< Rx ring mbuf allocation failures */
- /** Device Ethernet link address. @see rte_eth_dev_release_port() */
+ /**
+ * Device Ethernet link address. The index zero of the array is as the
+ * index of the default address, and other indexes can't be the same
+ * as the address corresponding to index 0.
+ * @see rte_eth_dev_release_port()
+ */
struct rte_ether_addr *mac_addrs;
/** Bitmap associating MAC addresses to pools */
uint64_t mac_pool_sel[RTE_ETH_NUM_RECEIVE_MAC_ADDR];