From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B419A44114 for ; Thu, 30 May 2024 19:40:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AB2C1402F0; Thu, 30 May 2024 19:40:58 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 1BACE40289; Thu, 30 May 2024 19:40:56 +0200 (CEST) Received: from pps.filterd (m0045851.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 44U9ZvK0025771; Thu, 30 May 2024 10:40:53 -0700 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h= cc:content-type:date:from:message-id:mime-version:subject:to; s= pfpt0220; bh=i0e2esh2q1UcU6eIBpb+iOrWsxTm5p+rua2ssvUFuwk=; b=N6A sVc6gexq0n9qc7PMXwQ5VuM7OgyEuMrlHhlXh+Kd/AbptQdStS8idFOEI//2bwX9 g6JovIX/IXrr7hwYNHVmmIfpTwBcyZVNSQA9u8pGMnnFsNgb0kItjScxn9dl0Svu yKyRrcGswcZAuucdmkHfhT5l6lEZVt0tHDd9rUVq2ec+rSIzGbvW/co++UJs1Eb9 yNO6B8Ja/Vrn1edG+n4E39dTDiB1viBaZGtykGf0ovUdeMljusqb71wFS/s7EXqm RYptYLX/Bgyv2cc1vhSk8WW3KhidsbPhxNGfkP5gFEd2L+7JCkoELz3xUpZ6e/ih ZNIhNnT+7DxGr+FzyHQ== Received: from dc6wp-exch02.marvell.com ([4.21.29.225]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 3yegkn3262-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 30 May 2024 10:40:53 -0700 (PDT) Received: from DC6WP-EXCH02.marvell.com (10.76.176.209) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.4; Thu, 30 May 2024 10:40:52 -0700 Received: from maili.marvell.com (10.69.176.80) by DC6WP-EXCH02.marvell.com (10.76.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend Transport; Thu, 30 May 2024 10:40:52 -0700 Received: from Cavium-PET630-BM22.localdomain (unknown [10.28.34.26]) by maili.marvell.com (Postfix) with ESMTP id 282B95B6923; Thu, 30 May 2024 10:40:49 -0700 (PDT) From: To: Maxime Coquelin , Chenbo Xia , Changchun Ouyang , "Stephen Hemminger" , Huawei Xie CC: , Satha Rao , Subject: [PATCH] net/virtio: fix MAC table update Date: Thu, 30 May 2024 13:40:39 -0400 Message-ID: <1717090840-12170-1-git-send-email-skoteshwar@marvell.com> X-Mailer: git-send-email 1.8.3.1 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-ORIG-GUID: 2rg9d8ubpYfcflmyrHLCnHoNvPh61rzL X-Proofpoint-GUID: 2rg9d8ubpYfcflmyrHLCnHoNvPh61rzL X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.650,FMLib:17.12.28.16 definitions=2024-05-30_13,2024-05-30_01,2024-05-17_01 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org From: Satha Rao 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 --- 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