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 781554624E for ; Mon, 17 Feb 2025 18:05:07 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 7031F400D6; Mon, 17 Feb 2025 18:05:07 +0100 (CET) Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) by mails.dpdk.org (Postfix) with ESMTP id 6F161402C9 for ; Mon, 17 Feb 2025 18:05:05 +0100 (CET) Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4398c8c8b2cso8157145e9.2 for ; Mon, 17 Feb 2025 09:05:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1739811905; x=1740416705; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=fwiVsmTx36Uo9JFbDkoSW4nYAp8H/jgeLK1zeymIAgU=; b=DSC6BHK9d1Q+3ShQ0F3V/HWRHkr2YbP1kufwk64CcXtKTo2nBB6jFh9ZOPlHY4nJ1+ Hgj1DEPB1+Dr3+1YVTuEBpCrLO2VRF8c3MQGzYMvntAbvDcWe7y0l5k8XcFWqAHnUvun 7mItoU6aHD2ZWnhzbGFcVx3Q6M7dJ4oPHwGLuoIJVX2tk2v2VyyySFKOIueHdkz7mDsM Cj91JAMDIFrVQGOuz19AvR2TMGbbQ85pQuzxr26USNP+r8ugYhonrYQn/HOpWe9M1noI PXT3Xz08h+6jVVbGeBiwy7mFcVX26uD4nps01r5aB0H+lNVdlawfeFmJe4jlo2QXF8s3 cGzw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1739811905; x=1740416705; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=fwiVsmTx36Uo9JFbDkoSW4nYAp8H/jgeLK1zeymIAgU=; b=uZ0I/QEKAFIpD5mM+Bk6VhNIaKynemFjhzrBqdyAzAB2vt9NM1v0GbyA3NaShLGrzz V+LsBi7pA8mfo4XJh3kHkod3t/iiXhKNOV9DWbRe+Jo2V9PpmvR5W+Ny0mZgHeTwVyGg f20c7UEgRJXQk2QwatR9+I4tYoNdjYXGzMqunGd7VxiUTSSL+GTduT4k1gk1ezRdz9CL WtCHZh8Q9tZwiES1WuJgKGxHhHDXe+TnK2899irEZ17nKJBvaR2npDMhwI0I4CDQUefh Sj9SY/9c+eHUJfKu33MsiR3+IuKd0nbDwO3dcC6q3lPIM9Gn9M6x4sI+y/J4u8ePJU7x inuA== X-Forwarded-Encrypted: i=1; AJvYcCWIRa+dt4bkiezJ2M9Rn8oAnfKSeYePQsC0h+AMhGB8+gSEePTTGRE5wRXXoQh9q4UinGgwmJA=@dpdk.org X-Gm-Message-State: AOJu0YwiVww4EtoITcflJ/H4YA6xE1C/+2426VcSDX6HH4JkzX+bD/Fz 4L3hi7vyvqn9IWvb0ml08iRDjXy0re/wgJqYc5Y3QrVHJ3d/E6pLW3Ddo+4tK4E= X-Gm-Gg: ASbGncvlGr9rOFQyFea0ciYDxyp49u9dyVGaXvZeTW5ygENghJLriperASDMuiLucQD uw1hXnKJginJR8zxAMhcZnm+ekhK/G7I3TFSYJn3IBrC3k/LEXur29zq0Kn5iCSC/nXyiEAljhq FX5cmx0T7hLxoizaUTTywe4Voidh9jSPb8PPW21Rkml/hqL2QA7atuqNrb+JPuv4xB3HJBOkzCI o368se0PQiH2xM65mvj5lIxPUuINOnr8ItPsilFIavE5ZAmHhiz8KNp1ccRwOe5mAPBk0LUhBnH jBn5Ldo6BRriQnI/Sdnaeg== X-Google-Smtp-Source: AGHT+IH+gXMzJS6L70aj7txZwkfXo9Aw3FtqjTKXfjUd6ptUJQAieICBndLPM0XgOa4bOhsk03AtKw== X-Received: by 2002:a5d:47c3:0:b0:38f:3c6c:28ff with SMTP id ffacd0b85a97d-38f3c6c2ce0mr6764702f8f.23.1739811904568; Mon, 17 Feb 2025 09:05:04 -0800 (PST) Received: from localhost ([2a01:4b00:d036:ae00:f83c:95e7:29fd:a997]) by smtp.gmail.com with UTF8SMTPSA id 5b1f17b1804b1-4398e84efb9sm9548815e9.10.2025.02.17.09.05.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Feb 2025 09:05:04 -0800 (PST) From: luca.boccassi@gmail.com To: Stephen Hemminger Cc: David Marchand , dpdk stable 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 Message-ID: <20250217170456.1068278-5-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250217170456.1068278-1-luca.boccassi@gmail.com> References: <20250217170456.1068278-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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 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 Acked-by: David Marchand --- 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