From: "Renyong Wan" <wanry@yunsilicon.com>
To: <dev@dpdk.org>
Cc: <thomas@monjalon.net>, <stephen@networkplumber.org>,
<qianr@yunsilicon.com>, <nana@yunsilicon.com>,
<zhangxx@yunsilicon.com>, <xudw@yunsilicon.com>,
<jacky@yunsilicon.com>, <weihg@yunsilicon.com>,
<zhenghy@yunsilicon.com>
Subject: [PATCH 13/14] net/xsc: fix uninitialized value
Date: Fri, 29 Aug 2025 16:24:37 +0800 [thread overview]
Message-ID: <20250829082436.24369-14-wanry@yunsilicon.com> (raw)
In-Reply-To: <20250829082406.24369-1-wanry@yunsilicon.com>
Coverity reported this issue: Using uninitialized value mac when calling
xsc_ethdev_mac_addr_add.
Coverity issue: 456592
Fixes: 0b0f9c161e ("net/xsc: initialize representors")
Signed-off-by: Rong Qian <qianr@yunsilicon.com>
Signed-off-by: Renyong Wan <wanry@yunsilicon.com>
---
drivers/net/xsc/xsc_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/xsc/xsc_ethdev.c b/drivers/net/xsc/xsc_ethdev.c
index 6102c158e8..988d734b5b 100644
--- a/drivers/net/xsc/xsc_ethdev.c
+++ b/drivers/net/xsc/xsc_ethdev.c
@@ -886,7 +886,7 @@ xsc_ethdev_init_one_representor(struct rte_eth_dev *eth_dev, void *init_params)
struct xsc_repr_port *repr_port = (struct xsc_repr_port *)init_params;
struct xsc_ethdev_priv *priv = TO_XSC_ETHDEV_PRIV(eth_dev);
struct xsc_dev_config *config = &priv->config;
- struct rte_ether_addr mac;
+ struct rte_ether_addr mac = priv->mac[0];
priv->repr_port = repr_port;
repr_port->drv_data = eth_dev;
--
2.25.1
next prev parent reply other threads:[~2025-08-29 8:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-29 8:24 [PATCH 00/14] net/xsc: PMD updates Renyong Wan
2025-08-29 8:24 ` [PATCH 01/14] net/xsc: add FW version get support Renyong Wan
2025-08-29 8:24 ` [PATCH 02/14] net/xsc: add TSO support Renyong Wan
2025-08-29 8:24 ` [PATCH 03/14] net/xsc: support module EEPROM dump Renyong Wan
2025-08-29 8:24 ` [PATCH 04/14] net/xsc: support promiscuous mode Renyong Wan
2025-08-29 8:24 ` [PATCH 05/14] net/xsc: add link status support Renyong Wan
2025-08-29 8:24 ` [PATCH 06/14] net/xsc: add link status event support Renyong Wan
2025-08-29 8:24 ` [PATCH 07/14] net/xsc: add FEC get and set support Renyong Wan
2025-08-29 8:24 ` [PATCH 08/14] net/xsc: optimize RSS queue creation Renyong Wan
2025-08-29 8:24 ` [PATCH 09/14] net/xsc: optimize QP and CQ memory allocation Renyong Wan
2025-08-29 8:24 ` [PATCH 10/14] net/xsc: optimize Rx path Renyong Wan
2025-08-29 8:24 ` [PATCH 11/14] net/xsc: optimize stop and close Renyong Wan
2025-08-29 8:24 ` [PATCH 12/14] net/xsc: support per port for multi-process Renyong Wan
2025-08-29 8:24 ` Renyong Wan [this message]
2025-08-29 8:24 ` [PATCH 14/14] net/xsc: update release notes for xsc PMD Renyong Wan
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=20250829082436.24369-14-wanry@yunsilicon.com \
--to=wanry@yunsilicon.com \
--cc=dev@dpdk.org \
--cc=jacky@yunsilicon.com \
--cc=nana@yunsilicon.com \
--cc=qianr@yunsilicon.com \
--cc=stephen@networkplumber.org \
--cc=thomas@monjalon.net \
--cc=weihg@yunsilicon.com \
--cc=xudw@yunsilicon.com \
--cc=zhangxx@yunsilicon.com \
--cc=zhenghy@yunsilicon.com \
/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).