From: luca.boccassi@gmail.com
To: Stephen Hemminger <stephen@networkplumber.org>
Cc: David Marchand <david.marchand@redhat.com>,
dpdk stable <stable@dpdk.org>
Subject: patch 'net/thunderx/base: fix build with GCC 15' has been queued to stable release 22.11.8
Date: Mon, 17 Feb 2025 17:03:38 +0000 [thread overview]
Message-ID: <20250217170456.1068278-5-luca.boccassi@gmail.com> (raw)
In-Reply-To: <20250217170456.1068278-1-luca.boccassi@gmail.com>
Hi,
FYI, your patch has been queued to stable release 22.11.8
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 02/19/25. So please
shout if anyone has objections.
Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.
Queued patches are on a temporary branch at:
https://github.com/bluca/dpdk-stable
This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/e7efa63569eafa7d129e40cf2e5c645ad35c0a1d
Thanks.
Luca Boccassi
---
From e7efa63569eafa7d129e40cf2e5c645ad35c0a1d Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen@networkplumber.org>
Date: Mon, 20 Jan 2025 15:23:39 -0800
Subject: [PATCH] net/thunderx/base: fix build with GCC 15
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit e7133f8fb39f506dc1eef02c2927acda949ca000 ]
Gcc 15 now produces warning with the base code of Thunderx driver.
The issue is that Gcc now defaults to C23 mode, and the standards
gods have decided that the result of partial initialization of a union
is not defined for other fields.
The fix is to use an empty initializer which forces full initialization.
[2377/3224] Compiling C object drivers/net/thunderx/base/libnicvf_base.a.p/nicvf_mbox.c.o
In function ‘nicvf_mbox_send_msg_to_pf_raw’,
inlined from ‘nicvf_mbox_send_async_msg_to_pf’ at ../drivers/net/thunderx/base/nicvf_mbox.c:70:2,
inlined from ‘nicvf_mbox_cfg_done’ at ../drivers/net/thunderx/base/nicvf_mbox.c:468:2:
../drivers/net/thunderx/base/nicvf_mbox.c:59:17: warning: ‘mbx’ is used uninitialized [-Wuninitialized]
59 | nicvf_reg_write(nic, mbx_addr, *mbx_data);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/net/thunderx/base/nicvf_mbox.c: In function ‘nicvf_mbox_cfg_done’:
../drivers/net/thunderx/base/nicvf_mbox.c:465:24: note: ‘mbx’ declared here
465 | struct nic_mbx mbx = { .msg = { 0 } };
| ^~~
In function ‘nicvf_mbox_send_msg_to_pf_raw’,
inlined from ‘nicvf_mbox_send_async_msg_to_pf’ at ../drivers/net/thunderx/base/nicvf_mbox.c:70:2,
inlined from ‘nicvf_mbox_link_change’ at ../drivers/net/thunderx/base/nicvf_mbox.c:477:2:
../drivers/net/thunderx/base/nicvf_mbox.c:59:17: warning: ‘mbx’ is used uninitialized [-Wuninitialized]
59 | nicvf_reg_write(nic, mbx_addr, *mbx_data);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../drivers/net/thunderx/base/nicvf_mbox.c: In function ‘nicvf_mbox_link_change’:
../drivers/net/thunderx/base/nicvf_mbox.c:474:24: note: ‘mbx’ declared here
474 | struct nic_mbx mbx = { .msg = { 0 } };
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Marchand <david.marchand@redhat.com>
---
drivers/net/thunderx/base/nicvf_mbox.c | 42 +++++++++++++-------------
1 file changed, 21 insertions(+), 21 deletions(-)
diff --git a/drivers/net/thunderx/base/nicvf_mbox.c b/drivers/net/thunderx/base/nicvf_mbox.c
index 0e0176974d..29407f75fa 100644
--- a/drivers/net/thunderx/base/nicvf_mbox.c
+++ b/drivers/net/thunderx/base/nicvf_mbox.c
@@ -212,7 +212,7 @@ int
nicvf_mbox_set_mac_addr(struct nicvf *nic,
const uint8_t mac[NICVF_MAC_ADDR_SIZE])
{
- struct nic_mbx mbx = { .msg = {0} };
+ struct nic_mbx mbx = { };
int i;
mbx.msg.msg = NIC_MBOX_MSG_SET_MAC;
@@ -226,7 +226,7 @@ nicvf_mbox_set_mac_addr(struct nicvf *nic,
int
nicvf_mbox_config_cpi(struct nicvf *nic, uint32_t qcnt)
{
- struct nic_mbx mbx = { .msg = { 0 } };
+ struct nic_mbx mbx = { };
mbx.msg.msg = NIC_MBOX_MSG_CPI_CFG;
mbx.cpi_cfg.vf_id = nic->vf_id;
@@ -239,7 +239,7 @@ nicvf_mbox_config_cpi(struct nicvf *nic, uint32_t qcnt)
int
nicvf_mbox_get_rss_size(struct nicvf *nic)
{
- struct nic_mbx mbx = { .msg = { 0 } };
+ struct nic_mbx mbx = { };
mbx.msg.msg = NIC_MBOX_MSG_RSS_SIZE;
mbx.rss_size.vf_id = nic->vf_id;
@@ -251,7 +251,7 @@ nicvf_mbox_get_rss_size(struct nicvf *nic)
int
nicvf_mbox_config_rss(struct nicvf *nic)
{
- struct nic_mbx mbx = { .msg = { 0 } };
+ struct nic_mbx mbx = { };
struct nicvf_rss_reta_info *rss = &nic->rss_info;
size_t tot_len = rss->rss_size;
size_t cur_len;
@@ -284,7 +284,7 @@ int
nicvf_mbox_rq_config(struct nicvf *nic, uint16_t qidx,
struct pf_rq_cfg *pf_rq_cfg)
{
- struct nic_mbx mbx = { .msg = { 0 } };
+ struct nic_mbx mbx = { };
mbx.msg.msg = NIC_MBOX_MSG_RQ_CFG;
mbx.rq.qs_num = nic->vf_id;
@@ -296,7 +296,7 @@ nicvf_mbox_rq_config(struct nicvf *nic, uint16_t qidx,
int
nicvf_mbox_sq_config(struct nicvf *nic, uint16_t qidx)
{
- struct nic_mbx mbx = { .msg = { 0 } };
+ struct nic_mbx mbx = { };
mbx.msg.msg = NIC_MBOX_MSG_SQ_CFG;
mbx.sq.qs_num = nic->vf_id;
@@ -309,7 +309,7 @@ nicvf_mbox_sq_config(struct nicvf *nic, uint16_t qidx)
int
nicvf_mbox_qset_config(struct nicvf *nic, struct pf_qs_cfg *qs_cfg)
{
- struct nic_mbx mbx = { .msg = { 0 } };
+ struct nic_mbx mbx = { };
#if NICVF_BYTE_ORDER == NICVF_BIG_ENDIAN
qs_cfg->be = 1;
@@ -325,7 +325,7 @@ nicvf_mbox_qset_config(struct nicvf *nic, struct pf_qs_cfg *qs_cfg)
int
nicvf_mbox_request_sqs(struct nicvf *nic)
{
- struct nic_mbx mbx = { .msg = { 0 } };
+ struct nic_mbx mbx = { };
size_t i;
assert_primary(nic);
@@ -346,7 +346,7 @@ nicvf_mbox_request_sqs(struct nicvf *nic)
int
nicvf_mbox_rq_drop_config(struct nicvf *nic, uint16_t qidx, bool enable)
{
- struct nic_mbx mbx = { .msg = { 0 } };
+ struct nic_mbx mbx = { };
struct pf_rq_drop_cfg *drop_cfg;
/* Enable CQ drop to reserve sufficient CQEs for all tx packets */
@@ -365,7 +365,7 @@ nicvf_mbox_rq_drop_config(struct nicvf *nic, uint16_t qidx, bool enable)
int
nicvf_mbox_update_hw_max_frs(struct nicvf *nic, uint16_t mtu)
{
- struct nic_mbx mbx = { .msg = { 0 } };
+ struct nic_mbx mbx = { };
mbx.msg.msg = NIC_MBOX_MSG_SET_MAX_FRS;
mbx.frs.max_frs = mtu;
@@ -376,7 +376,7 @@ nicvf_mbox_update_hw_max_frs(struct nicvf *nic, uint16_t mtu)
int
nicvf_mbox_rq_sync(struct nicvf *nic)
{
- struct nic_mbx mbx = { .msg = { 0 } };
+ struct nic_mbx mbx = { };
/* Make sure all packets in the pipeline are written back into mem */
mbx.msg.msg = NIC_MBOX_MSG_RQ_SW_SYNC;
@@ -387,7 +387,7 @@ nicvf_mbox_rq_sync(struct nicvf *nic)
int
nicvf_mbox_rq_bp_config(struct nicvf *nic, uint16_t qidx, bool enable)
{
- struct nic_mbx mbx = { .msg = { 0 } };
+ struct nic_mbx mbx = { };
mbx.msg.msg = NIC_MBOX_MSG_RQ_BP_CFG;
mbx.rq.qs_num = nic->vf_id;
@@ -401,7 +401,7 @@ nicvf_mbox_rq_bp_config(struct nicvf *nic, uint16_t qidx, bool enable)
int
nicvf_mbox_loopback_config(struct nicvf *nic, bool enable)
{
- struct nic_mbx mbx = { .msg = { 0 } };
+ struct nic_mbx mbx = { };
mbx.lbk.msg = NIC_MBOX_MSG_LOOPBACK;
mbx.lbk.vf_id = nic->vf_id;
@@ -414,7 +414,7 @@ nicvf_mbox_reset_stat_counters(struct nicvf *nic, uint16_t rx_stat_mask,
uint8_t tx_stat_mask, uint16_t rq_stat_mask,
uint16_t sq_stat_mask)
{
- struct nic_mbx mbx = { .msg = { 0 } };
+ struct nic_mbx mbx = { };
mbx.reset_stat.msg = NIC_MBOX_MSG_RESET_STAT_COUNTER;
mbx.reset_stat.rx_stat_mask = rx_stat_mask;
@@ -427,7 +427,7 @@ nicvf_mbox_reset_stat_counters(struct nicvf *nic, uint16_t rx_stat_mask,
int
nicvf_mbox_set_link_up_down(struct nicvf *nic, bool enable)
{
- struct nic_mbx mbx = { .msg = { 0 } };
+ struct nic_mbx mbx = { };
mbx.lbk.msg = NIC_MBOX_MSG_SET_LINK;
mbx.lbk.vf_id = nic->vf_id;
@@ -439,7 +439,7 @@ nicvf_mbox_set_link_up_down(struct nicvf *nic, bool enable)
int
nicvf_mbox_change_mode(struct nicvf *nic, struct change_link_mode *cfg)
{
- struct nic_mbx mbx = { .msg = { 0 } };
+ struct nic_mbx mbx = { };
mbx.mode.msg = NIC_MBOX_MSG_CHANGE_MODE;
mbx.mode.vf_id = nic->vf_id;
@@ -453,7 +453,7 @@ nicvf_mbox_change_mode(struct nicvf *nic, struct change_link_mode *cfg)
void
nicvf_mbox_shutdown(struct nicvf *nic)
{
- struct nic_mbx mbx = { .msg = { 0 } };
+ struct nic_mbx mbx = { };
mbx.msg.msg = NIC_MBOX_MSG_SHUTDOWN;
nicvf_mbox_send_msg_to_pf(nic, &mbx);
@@ -462,7 +462,7 @@ nicvf_mbox_shutdown(struct nicvf *nic)
void
nicvf_mbox_cfg_done(struct nicvf *nic)
{
- struct nic_mbx mbx = { .msg = { 0 } };
+ struct nic_mbx mbx = { };
mbx.msg.msg = NIC_MBOX_MSG_CFG_DONE;
nicvf_mbox_send_async_msg_to_pf(nic, &mbx);
@@ -471,7 +471,7 @@ nicvf_mbox_cfg_done(struct nicvf *nic)
void
nicvf_mbox_link_change(struct nicvf *nic)
{
- struct nic_mbx mbx = { .msg = { 0 } };
+ struct nic_mbx mbx = { };
mbx.msg.msg = NIC_MBOX_MSG_BGX_LINK_CHANGE;
nicvf_mbox_send_async_msg_to_pf(nic, &mbx);
@@ -480,7 +480,7 @@ nicvf_mbox_link_change(struct nicvf *nic)
void
nicvf_mbox_reset_xcast(struct nicvf *nic)
{
- struct nic_mbx mbx = { .msg = { 0 } };
+ struct nic_mbx mbx = { };
mbx.msg.msg = NIC_MBOX_MSG_RESET_XCAST;
nicvf_mbox_send_msg_to_pf(nic, &mbx);
@@ -489,7 +489,7 @@ nicvf_mbox_reset_xcast(struct nicvf *nic)
int
nicvf_mbox_set_xcast(struct nicvf *nic, uint8_t mode, uint64_t mac)
{
- struct nic_mbx mbx = { .msg = { 0 } };
+ struct nic_mbx mbx = { };
mbx.xcast.msg = NIC_MBOX_MSG_SET_XCAST;
mbx.xcast.mode = mode;
--
2.47.2
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-02-17 16:13:17.086302602 +0000
+++ 0005-net-thunderx-base-fix-build-with-GCC-15.patch 2025-02-17 16:13:16.786441593 +0000
@@ -1 +1 @@
-From e7133f8fb39f506dc1eef02c2927acda949ca000 Mon Sep 17 00:00:00 2001
+From e7efa63569eafa7d129e40cf2e5c645ad35c0a1d Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit e7133f8fb39f506dc1eef02c2927acda949ca000 ]
+
@@ -36,2 +37,0 @@
-
-Cc: stable@dpdk.org
next prev parent reply other threads:[~2025-02-17 17:05 UTC|newest]
Thread overview: 79+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-17 17:03 patch 'test/ring: fix init with custom number of lcores' " luca.boccassi
2025-02-17 17:03 ` patch 'vhost: clear ring addresses when getting vring base' " luca.boccassi
2025-02-17 17:03 ` patch 'vhost: check GSO size validity' " luca.boccassi
2025-02-17 17:03 ` patch 'crypto/cnxk: fix build with GCC 15' " luca.boccassi
2025-02-17 17:03 ` luca.boccassi [this message]
2025-02-17 17:03 ` patch 'eal/x86: fix some intrinsics header include for Windows' " luca.boccassi
2025-02-17 17:03 ` patch 'net/bonding: fix dedicated queue setup' " luca.boccassi
2025-02-17 17:03 ` patch 'net/hns3: fix mbuf freeing in simple Tx path' " luca.boccassi
2025-02-17 17:03 ` patch 'net/hns3: remove PVID info dump for VF' " luca.boccassi
2025-02-17 17:03 ` patch 'net/hns3: rename RAS module' " luca.boccassi
2025-02-17 17:03 ` patch 'net/sfc: remove unnecessary assignment' " luca.boccassi
2025-02-17 17:03 ` patch 'net/mlx5: fix polling CQEs' " luca.boccassi
2025-02-17 17:03 ` patch 'net/iavf: remove reset of Tx prepare function pointer' " luca.boccassi
2025-02-17 17:03 ` patch 'net/ice: fix memory leak in scalar Rx' " luca.boccassi
2025-02-17 17:03 ` patch 'common/cnxk: fix atomic load in batch ops' " luca.boccassi
2025-02-17 17:03 ` patch 'common/cnxk: fix DPI mailbox structure' " luca.boccassi
2025-02-17 17:03 ` patch 'crypto/virtio: fix redundant queue free' " luca.boccassi
2025-02-17 17:03 ` patch 'crypto/openssl: fix CMAC auth context update' " luca.boccassi
2025-02-17 17:03 ` patch 'crypto/virtio: fix data queues iteration' " luca.boccassi
2025-02-17 17:03 ` patch 'net/enetfec: remove useless assignment' " luca.boccassi
2025-02-17 17:03 ` patch 'net/cnxk: fix NIX send header L3 type' " luca.boccassi
2025-02-17 17:03 ` patch 'eal/linux: fix memseg length in legacy mem init' " luca.boccassi
2025-02-17 17:03 ` patch 'use Python raw string notation' " luca.boccassi
2025-02-17 17:03 ` patch 'net/af_packet: fix socket close on device stop' " luca.boccassi
2025-02-17 17:03 ` patch 'ethdev: fix functions available in new device event' " luca.boccassi
2025-02-17 17:03 ` patch 'vhost: add null callback checks' " luca.boccassi
2025-02-17 17:04 ` patch 'build: force GCC 15 to initialize padding bits' " luca.boccassi
2025-02-17 17:04 ` patch 'net/bnxt: fix indication of allocation' " luca.boccassi
2025-02-17 17:04 ` patch 'net/bnxt: fix crash when representor is re-attached' " luca.boccassi
2025-02-17 17:04 ` patch 'net/mlx5: fix Netlink socket leak' " luca.boccassi
2025-02-17 17:04 ` patch 'net/mlx5: adjust actions per rule limitation' " luca.boccassi
2025-02-17 17:04 ` patch 'net/mlx5: fix flush of non-template flow rules' " luca.boccassi
2025-02-17 17:04 ` patch 'net/mlx5: fix GRE flow match with SWS' " luca.boccassi
2025-02-17 17:04 ` patch 'net/igc/base: fix deadlock when writing i225 register' " luca.boccassi
2025-02-17 17:04 ` patch 'net/igc/base: fix infinite loop' " luca.boccassi
2025-02-17 17:04 ` patch 'net/igc/base: fix bitwise operation type' " luca.boccassi
2025-02-17 17:04 ` patch 'net/igc/base: increase PHY power up delay' " luca.boccassi
2025-02-17 17:04 ` patch 'net/igc/base: reset loop variable' " luca.boccassi
2025-02-17 17:04 ` patch 'net/igc/base: fix LTR for i225' " luca.boccassi
2025-02-17 17:04 ` patch 'net/igc/base: fix typo in LTR calculation' " luca.boccassi
2025-02-17 17:04 ` patch 'net/igc/base: fix unused value' " luca.boccassi
2025-02-17 17:04 ` patch 'net/igc/base: fix semaphore timeout " luca.boccassi
2025-02-17 17:04 ` patch 'net/igc/base: fix iterator type' " luca.boccassi
2025-02-17 17:04 ` patch 'net/igc/base: fix MAC address hash bit shift' " luca.boccassi
2025-02-17 17:04 ` patch 'net/igc/base: fix data type in MAC hash' " luca.boccassi
2025-02-17 17:04 ` patch 'net/igc/base: fix NVM data type in bit shift' " luca.boccassi
2025-02-17 17:04 ` patch 'net/e1000/base: fix semaphore timeout value' " luca.boccassi
2025-02-17 17:04 ` patch 'net/e1000/base: correct mPHY access logic' " luca.boccassi
2025-02-17 17:04 ` patch 'net/e1000/base: fix iterator type' " luca.boccassi
2025-02-17 17:04 ` patch 'net/e1000/base: fix MAC address hash bit shift' " luca.boccassi
2025-02-17 17:04 ` patch 'net/e1000/base: fix data type in MAC hash' " luca.boccassi
2025-02-17 17:04 ` patch 'net/e1000/base: fix uninitialized variable' " luca.boccassi
2025-02-17 17:04 ` patch 'net/e1000/base: fix bitwise operation type' " luca.boccassi
2025-02-17 17:04 ` patch 'net/e1000/base: fix NVM data type in bit shift' " luca.boccassi
2025-02-17 17:04 ` patch 'net/e1000/base: fix reset for 82580' " luca.boccassi
2025-02-17 17:04 ` patch 'net/e1000/base: fix unchecked return' " luca.boccassi
2025-02-17 17:04 ` patch 'net/e1000/base: skip management check for 82575' " luca.boccassi
2025-02-17 17:04 ` patch 'common/idpf: fix void function returning a value' " luca.boccassi
2025-02-17 17:04 ` patch 'net/intel: fix void functions " luca.boccassi
2025-02-17 17:04 ` patch 'net/intel: fix build with icx' " luca.boccassi
2025-02-17 17:04 ` patch 'net/hns3: fix copper port initialization' " luca.boccassi
2025-02-17 17:04 ` patch 'net/hns3: fix reset timeout' " luca.boccassi
2025-02-17 17:04 ` patch 'raw/cnxk_gpio: fix file descriptor leak' " luca.boccassi
2025-02-17 17:04 ` patch 'net/i40e: remove duplicate code' " luca.boccassi
2025-02-17 17:04 ` patch 'eal: fix devargs layers parsing out of bounds' " luca.boccassi
2025-02-17 17:04 ` patch 'net/qede: fix debug messages array' " luca.boccassi
2025-02-17 17:04 ` patch 'examples/ptpclient: fix message parsing' " luca.boccassi
2025-02-17 17:04 ` patch 'net/hinic: fix flow type bitmask overflow' " luca.boccassi
2025-02-17 17:04 ` patch 'crypto/dpaa2_sec: fix bitmask truncation' " luca.boccassi
2025-02-17 17:04 ` patch 'crypto/dpaa_sec: " luca.boccassi
2025-02-17 17:04 ` patch 'event/dpaa: " luca.boccassi
2025-02-17 17:04 ` patch 'net/dpaa: " luca.boccassi
2025-02-17 17:04 ` patch 'net/dpaa2: " luca.boccassi
2025-02-17 17:04 ` patch 'net/qede: fix nested loops' " luca.boccassi
2025-02-17 17:04 ` patch 'examples/l3fwd: fix socket ID check' " luca.boccassi
2025-02-17 17:04 ` patch 'common/cnxk: fix null " luca.boccassi
2025-02-17 17:04 ` patch 'eal/linux: remove useless assignments' " luca.boccassi
2025-02-17 17:04 ` patch 'mempool: fix errno in empty create' " luca.boccassi
2025-02-17 17:04 ` patch 'ethdev: convert string initialization' " luca.boccassi
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=20250217170456.1068278-5-luca.boccassi@gmail.com \
--to=luca.boccassi@gmail.com \
--cc=david.marchand@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).