DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] net/virtio: fix MAC table update
@ 2024-05-30 17:40 skoteshwar
  2024-06-12 11:20 ` Maxime Coquelin
  2024-06-12 13:14 ` Maxime Coquelin
  0 siblings, 2 replies; 3+ messages in thread
From: skoteshwar @ 2024-05-30 17:40 UTC (permalink / raw)
  To: Maxime Coquelin, Chenbo Xia, Changchun Ouyang, Stephen Hemminger,
	Huawei Xie
  Cc: dev, Satha Rao, stable

From: Satha Rao <skoteshwar@marvell.com>

Don't send NULL MAC addresses in MAC table update.

Fixes: 1b306359e58 ("virtio: suport multiple MAC addresses")
Cc: stephen@networkplumber.org
Cc: stable@dpdk.org

Signed-off-by: Satha Rao <skoteshwar@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);
 	}
 
-- 
1.8.3.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net/virtio: fix MAC table update
  2024-05-30 17:40 [PATCH] net/virtio: fix MAC table update skoteshwar
@ 2024-06-12 11:20 ` Maxime Coquelin
  2024-06-12 13:14 ` Maxime Coquelin
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2024-06-12 11:20 UTC (permalink / raw)
  To: skoteshwar, Chenbo Xia, Changchun Ouyang, Stephen Hemminger, Huawei Xie
  Cc: dev, stable



On 5/30/24 19:40, skoteshwar@marvell.com wrote:
> From: Satha Rao <skoteshwar@marvell.com>
> 
> Don't send NULL MAC addresses in MAC table update.
> 
> Fixes: 1b306359e58 ("virtio: suport multiple MAC addresses")
> Cc: stephen@networkplumber.org
> Cc: stable@dpdk.org
> 
> Signed-off-by: Satha Rao <skoteshwar@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);
>   	}
>   

Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Thanks,
Maxime


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] net/virtio: fix MAC table update
  2024-05-30 17:40 [PATCH] net/virtio: fix MAC table update skoteshwar
  2024-06-12 11:20 ` Maxime Coquelin
@ 2024-06-12 13:14 ` Maxime Coquelin
  1 sibling, 0 replies; 3+ messages in thread
From: Maxime Coquelin @ 2024-06-12 13:14 UTC (permalink / raw)
  To: skoteshwar, Chenbo Xia, Changchun Ouyang, Stephen Hemminger, Huawei Xie
  Cc: dev, stable



On 5/30/24 19:40, skoteshwar@marvell.com wrote:
> From: Satha Rao <skoteshwar@marvell.com>
> 
> Don't send NULL MAC addresses in MAC table update.
> 
> Fixes: 1b306359e58 ("virtio: suport multiple MAC addresses")
> Cc: stephen@networkplumber.org
> Cc: stable@dpdk.org
> 
> Signed-off-by: Satha Rao <skoteshwar@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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-06-12 13:14 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-30 17:40 [PATCH] net/virtio: fix MAC table update skoteshwar
2024-06-12 11:20 ` Maxime Coquelin
2024-06-12 13:14 ` Maxime Coquelin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).