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 2EFFA4609E; Thu, 16 Jan 2025 14:04:52 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D3CB14066A; Thu, 16 Jan 2025 14:04:51 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mails.dpdk.org (Postfix) with ESMTP id 85F3D40668 for ; Thu, 16 Jan 2025 14:04:50 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1737032690; 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=OpHTMw+qTH2sGABUJQ+DrA132vV8yvapy5py9+/40zE=; b=gQo6NvpjZf9pqiMFhKsjVo62tNp19NxVXKNJ9OPBChSPJJpBwkIpZqd4kVohlUn0dlwn1p V1zClcauNnrm8/u4uMO8vMyuiMW+OYureaB1fSS4IxWh4trqi+a2AhBgV2if3MM25YEAkI pCX1N6WLD5wIsQ1BwwAFQSo55g7F4us= Received: from mail-lj1-f199.google.com (mail-lj1-f199.google.com [209.85.208.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-125-MOGH07lDOj-3SPGCh5VonQ-1; Thu, 16 Jan 2025 08:04:48 -0500 X-MC-Unique: MOGH07lDOj-3SPGCh5VonQ-1 X-Mimecast-MFC-AGG-ID: MOGH07lDOj-3SPGCh5VonQ Received: by mail-lj1-f199.google.com with SMTP id 38308e7fff4ca-30729d93f5cso270081fa.2 for ; Thu, 16 Jan 2025 05:04:48 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1737032687; x=1737637487; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=OpHTMw+qTH2sGABUJQ+DrA132vV8yvapy5py9+/40zE=; b=MfQpfUradg1/pWHTs0bhvjjuWW6gSw0cFE9IE+uX2HjLgaCt0yJm8+z4UhQP178dLc qsRBtDbWPtgyEx6IkFu488FzvdQ0L8eUBvCBuQ4fHtMjudG16W6fbnPjz9R6ItXOmU5I 5EmGOUleBcHpaY3fotF+i86S8faR8cTBJkssbJmpHJDjM8x50FKPpRHeNNx6CC28nkYO 5/d/11dyy0AsCfJ3PTAJC/ewQexLqZaTNd+iefmVQ8VhiG0fdrrizGHx09b6uxelDCyQ QNG5AmzTM8EvwY7N49N3OWb3aeVFPwxFNQYAyYkutVlhQ7kJ22108zkktL/reoOTrRQ5 SR8Q== X-Gm-Message-State: AOJu0Yz5lwGtd6WGXnqbAbg7coVq0S8u/ANhYkXvRTZopkTsnoouBGIZ KHVJZnfzY2Z/tk3D8ToVG3f9XCXi+aUf+CTUWjxHI0KZILo4GZvQaL+zqmhKsS80EsPaUBPnL// LMWh/yF858yOouTVjywT0AErNAzaflS4aI9XC1fY4CH9RQ/RS/e0O7a1HQEUzTfP5hSAhKOL+o1 dDHrhesTPpg6745g8= X-Gm-Gg: ASbGncu4pOHv4hR9s1WgPRAsUQzTr6tqq5fhLOoxRZUm4xxH8TKXC4zXohs1+2nTLGz KKftY/hgnyfP99yxVaVyXq3MU3duxCWbb8+sS5FAC X-Received: by 2002:a05:651c:4006:b0:302:251a:bd21 with SMTP id 38308e7fff4ca-305f45747c9mr54349691fa.15.1737032687213; Thu, 16 Jan 2025 05:04:47 -0800 (PST) X-Google-Smtp-Source: AGHT+IHfOM4XgvmJpS8LKpIDMViQYZleFIowZF+kqdxPTh6N/1/sgoxR2No8fcwxWtkBzycdhishNnMaTIPfgDE2JKw= X-Received: by 2002:a05:651c:4006:b0:302:251a:bd21 with SMTP id 38308e7fff4ca-305f45747c9mr54349421fa.15.1737032685362; Thu, 16 Jan 2025 05:04:45 -0800 (PST) MIME-Version: 1.0 References: <20250110172725.540897-1-stephen@networkplumber.org> In-Reply-To: <20250110172725.540897-1-stephen@networkplumber.org> From: David Marchand Date: Thu, 16 Jan 2025 14:04:33 +0100 X-Gm-Features: AbW1kvaSz-WdZaG4e4CFM7IsdRMzlcNP1dtAa72B2wK2oUC4WNe-zhi-98LJh84 Message-ID: Subject: Re: [PATCH] base/thunderx: fix build with Gcc 15 To: Stephen Hemminger Cc: dev@dpdk.org, Jerin Jacob , Maciej Czekaj X-Mimecast-Spam-Score: 0 X-Mimecast-MFC-PROC-ID: hZqoOrCii5oO12JVWKOo0i__peQj39m2iwV18UuMzpo_1737032687 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Fri, Jan 10, 2025 at 6:27=E2=80=AFPM Stephen Hemminger wrote: > > 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 partial initialization of a union has changed. > > 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 =E2=80=98nicvf_mbox_send_msg_to_pf_raw=E2=80=99, > inlined from =E2=80=98nicvf_mbox_send_async_msg_to_pf=E2=80=99 at ../= drivers/net/thunderx/base/nicvf_mbox.c:70:2, > inlined from =E2=80=98nicvf_mbox_cfg_done=E2=80=99 at ../drivers/net/= thunderx/base/nicvf_mbox.c:468:2: > ../drivers/net/thunderx/base/nicvf_mbox.c:59:17: warning: =E2=80=98mbx=E2= =80=99 is used uninitialized [-Wuninitialized] > 59 | nicvf_reg_write(nic, mbx_addr, *mbx_data); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ../drivers/net/thunderx/base/nicvf_mbox.c: In function =E2=80=98nicvf_mbo= x_cfg_done=E2=80=99: > ../drivers/net/thunderx/base/nicvf_mbox.c:465:24: note: =E2=80=98mbx=E2= =80=99 declared here > 465 | struct nic_mbx mbx =3D { .msg =3D { 0 } }; > | ^~~ > In function =E2=80=98nicvf_mbox_send_msg_to_pf_raw=E2=80=99, > inlined from =E2=80=98nicvf_mbox_send_async_msg_to_pf=E2=80=99 at ../= drivers/net/thunderx/base/nicvf_mbox.c:70:2, > inlined from =E2=80=98nicvf_mbox_link_change=E2=80=99 at ../drivers/n= et/thunderx/base/nicvf_mbox.c:477:2: > ../drivers/net/thunderx/base/nicvf_mbox.c:59:17: warning: =E2=80=98mbx=E2= =80=99 is used uninitialized [-Wuninitialized] > 59 | nicvf_reg_write(nic, mbx_addr, *mbx_data); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ../drivers/net/thunderx/base/nicvf_mbox.c: In function =E2=80=98nicvf_mbo= x_link_change=E2=80=99: > ../drivers/net/thunderx/base/nicvf_mbox.c:474:24: note: =E2=80=98mbx=E2= =80=99 declared here > 474 | struct nic_mbx mbx =3D { .msg =3D { 0 } }; > > Signed-off-by: Stephen Hemminger > --- > drivers/net/thunderx/base/nicvf_mbox.c | 42 +++++++++++++------------- > 1 file changed, 21 insertions(+), 21 deletions(-) Commit title should be prefixed with: net/thunderx/base. This file already contains calls to dpdk API, so I guess it is ok to add more DPDK changes in this base driver source file. Acked-by: David Marchand This build issue is now visible in OBS builds for the main repo, btw. https://build.opensuse.org/package/live_build_log/home:bluca:dpdk/dpdk/Fedo= ra_Rawhide/ppc64le --=20 David Marchand