[PATCH] net/virtio: fix MAC table update
Maxime Coquelin
maxime.coquelin at redhat.com
Wed Jun 12 15:14:26 CEST 2024
On 5/30/24 19:40, skoteshwar at marvell.com wrote:
> From: Satha Rao <skoteshwar at marvell.com>
>
> Don't send NULL MAC addresses in MAC table update.
>
> Fixes: 1b306359e58 ("virtio: suport multiple MAC addresses")
> Cc: stephen at networkplumber.org
> Cc: stable at dpdk.org
>
> Signed-off-by: Satha Rao <skoteshwar at marvell.com>
> ---
> drivers/net/virtio/virtio_ethdev.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/drivers/net/virtio/virtio_ethdev.c b/drivers/net/virtio/virtio_ethdev.c
> index 5175857..70d4839 100644
> --- a/drivers/net/virtio/virtio_ethdev.c
> +++ b/drivers/net/virtio/virtio_ethdev.c
> @@ -913,6 +913,8 @@ static int virtio_dev_xstats_get_names(struct rte_eth_dev *dev,
> struct virtio_net_ctrl_mac *tbl
> = rte_is_multicast_ether_addr(addr) ? mc : uc;
>
> + if (rte_is_zero_ether_addr(addr))
> + break;
> memcpy(&tbl->macs[tbl->entries++], addr, RTE_ETHER_ADDR_LEN);
> }
>
Applied to next-virtio/for-next-net.
Thanks,
Maxime
More information about the dev
mailing list