patches for DPDK stable branches
 help / color / mirror / Atom feed
From: <skoteshwar@marvell.com>
To: Maxime Coquelin <maxime.coquelin@redhat.com>,
	Chenbo Xia <chenbox@nvidia.com>,
	Changchun Ouyang <changchun.ouyang@intel.com>,
	"Stephen Hemminger" <stephen@networkplumber.org>,
	Huawei Xie <huawei.xhw@alibaba-inc.com>
Cc: <dev@dpdk.org>, Satha Rao <skoteshwar@marvell.com>, <stable@dpdk.org>
Subject: [PATCH] net/virtio: fix MAC table update
Date: Thu, 30 May 2024 13:40:39 -0400	[thread overview]
Message-ID: <1717090840-12170-1-git-send-email-skoteshwar@marvell.com> (raw)

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


             reply	other threads:[~2024-05-30 17:40 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-30 17:40 skoteshwar [this message]
2024-06-12 11:20 ` Maxime Coquelin
2024-06-12 13:14 ` Maxime Coquelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1717090840-12170-1-git-send-email-skoteshwar@marvell.com \
    --to=skoteshwar@marvell.com \
    --cc=changchun.ouyang@intel.com \
    --cc=chenbox@nvidia.com \
    --cc=dev@dpdk.org \
    --cc=huawei.xhw@alibaba-inc.com \
    --cc=maxime.coquelin@redhat.com \
    --cc=stable@dpdk.org \
    --cc=stephen@networkplumber.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).