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 2650046211 for ; Thu, 13 Feb 2025 11:00:09 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2280040287; Thu, 13 Feb 2025 11:00:09 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mails.dpdk.org (Postfix) with ESMTP id BEACE40287 for ; Thu, 13 Feb 2025 11:00:07 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1739440807; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=8t///ql52GAW4M7OgIQR8odlcfXB9rdzBJMZKnNwn1A=; b=I3ZyZhj5OkEM8TqVS2+/wpSScj+qyW8iTKLZeIu5Bk3aix311NgX6JBkN+OChCBPb/tihn HJgePwpveULBGehcCdwsXF2mwwild6wjIYe4S/XK13D1Te2oqh+yXFfdPFtJG1XMlAqnK5 sLkj0tXDDfcWYIlTEvtkWm3qX2UzX1c= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-572-_65KD5JSPp2vN1SWBzPUrQ-1; Thu, 13 Feb 2025 05:00:05 -0500 X-MC-Unique: _65KD5JSPp2vN1SWBzPUrQ-1 X-Mimecast-MFC-AGG-ID: _65KD5JSPp2vN1SWBzPUrQ Received: from mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.93]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 6FF1E1801A10; Thu, 13 Feb 2025 10:00:04 +0000 (UTC) Received: from rh.Home (unknown [10.45.224.21]) by mx-prod-int-06.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id E96CD1800874; Thu, 13 Feb 2025 10:00:02 +0000 (UTC) From: Kevin Traynor To: Stephen Hemminger Cc: David Marchand , dpdk stable Subject: patch 'net/thunderx/base: fix build with GCC 15' has been queued to stable release 24.11.2 Date: Thu, 13 Feb 2025 09:57:35 +0000 Message-ID: <20250213095933.362078-8-ktraynor@redhat.com> In-Reply-To: <20250213095933.362078-1-ktraynor@redhat.com> References: <20250213095933.362078-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.93 X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: hyKbyuxTiOMh70tUnpqQwrGH-a9q3Ua7NUehnfk3Rqo_1739440804 X-Mimecast-Originator: redhat.com 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 24.11.2 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/17/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/kevintraynor/dpdk-stable This queued commit can be viewed at: https://github.com/kevintraynor/dpdk-stable/commit/ee7a18ee163429aeaf0a78b627c5274ff01be11d Thanks. Kevin --- >From ee7a18ee163429aeaf0a78b627c5274ff01be11d 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 @@ -213,5 +213,5 @@ 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; @@ -227,5 +227,5 @@ 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; @@ -240,5 +240,5 @@ 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; @@ -252,5 +252,5 @@ 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; @@ -285,5 +285,5 @@ 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; @@ -297,5 +297,5 @@ 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; @@ -310,5 +310,5 @@ 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 @@ -326,5 +326,5 @@ int nicvf_mbox_request_sqs(struct nicvf *nic) { - struct nic_mbx mbx = { .msg = { 0 } }; + struct nic_mbx mbx = { }; size_t i; @@ -347,5 +347,5 @@ 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; @@ -366,5 +366,5 @@ 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; @@ -377,5 +377,5 @@ 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 */ @@ -388,5 +388,5 @@ 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; @@ -402,5 +402,5 @@ 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; @@ -415,5 +415,5 @@ nicvf_mbox_reset_stat_counters(struct nicvf *nic, uint16_t rx_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; @@ -428,5 +428,5 @@ 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; @@ -440,5 +440,5 @@ 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; @@ -454,5 +454,5 @@ void nicvf_mbox_shutdown(struct nicvf *nic) { - struct nic_mbx mbx = { .msg = { 0 } }; + struct nic_mbx mbx = { }; mbx.msg.msg = NIC_MBOX_MSG_SHUTDOWN; @@ -463,5 +463,5 @@ 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; @@ -472,5 +472,5 @@ 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; @@ -481,5 +481,5 @@ 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; @@ -490,5 +490,5 @@ 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; -- 2.48.1 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2025-02-12 17:29:35.488014849 +0000 +++ 0008-net-thunderx-base-fix-build-with-GCC-15.patch 2025-02-12 17:29:34.138944665 +0000 @@ -1 +1 @@ -From e7133f8fb39f506dc1eef02c2927acda949ca000 Mon Sep 17 00:00:00 2001 +From ee7a18ee163429aeaf0a78b627c5274ff01be11d Mon Sep 17 00:00:00 2001 @@ -8,0 +9,2 @@ +[ upstream commit e7133f8fb39f506dc1eef02c2927acda949ca000 ] + @@ -36,2 +37,0 @@ - -Cc: stable@dpdk.org