[PATCH v4 2/2] ethdev: document default and non-default MAC address
Andrew Rybchenko
andrew.rybchenko at oktetlabs.ru
Wed Jun 1 19:49:43 CEST 2022
On 6/1/22 09:39, Min Hu (Connor) wrote:
> From: Huisong Li <lihuisong at 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 at huawei.com>
> Signed-off-by: Min Hu <humin29 at huawei.com>
> ---
> lib/ethdev/ethdev_driver.h | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/lib/ethdev/ethdev_driver.h b/lib/ethdev/ethdev_driver.h
> index 69d9dc21d8..d49e9138c6 100644
> --- a/lib/ethdev/ethdev_driver.h
> +++ b/lib/ethdev/ethdev_driver.h
> @@ -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];
The patch itself does not make sense since it documents what happens
in the first patch of the series. So, it should be a part of the first
patch.
More information about the dev
mailing list