On Thu, 20 Feb 2025 13:06:30 +0800
"11" <caowe...@mucse.com> wrote:

> Hi Stephen,
> 
> For the release thing, that be ok.
> 
> But for Debian 12 with MUSDK it be failed, do I need to fixed it ,
> The ability when I used it that I had been memset it. But the compile-tool
> is warning it,
>  hw->phy_port_ids[idx] = ability.port_ids[idx];
> 
> Branch: master
> CommitID:968f7b6d7b6a7e60e6e551db430c4eecaccbbfd2
> 
> 151613-151639 --> testing issues
> 
> Upstream job id: Generic-DPDK-Compile-Meson#362983
> 
> Test environment and result as below:
> 
> +----------------------------------------+--------------------+
> |              Environment               | dpdk_meson_compile |
> +========================================+====================+
> | RHEL9 (ARM)                            | PASS               |
> +----------------------------------------+--------------------+
> | Ubuntu 20.04 ARM GCC Cross Compile     | PASS               |
> +----------------------------------------+--------------------+
> | Ubuntu 20.04 ARM SVE                   | PASS               |
> +----------------------------------------+--------------------+
> | Debian 12 with MUSDK                   | FAIL               |
> +----------------------------------------+--------------------+
> | Fedora 40 (ARM Clang)                  | PASS               |
> +----------------------------------------+--------------------+
> | Fedora 41 (ARM Clang)                  | PASS               |
> +----------------------------------------+--------------------+
> | Fedora 41 (ARM)                        | PASS               |
> +----------------------------------------+--------------------+
> | Fedora 40 (ARM)                        | PASS               |
> +----------------------------------------+--------------------+
> | Ubuntu 20.04 (ARM)                     | PASS               |
> +----------------------------------------+--------------------+
> | Ubuntu 22.04 (ARM)                     | PASS               |
> +----------------------------------------+--------------------+
> | Ubuntu 24.04 (ARM)                     | PASS               |
> +----------------------------------------+--------------------+
> | CentOS Stream 9 (ARM)                  | PASS               |
> +----------------------------------------+--------------------+
> | CentOS Stream 10 (ARM)                 | PASS               |
> +----------------------------------------+--------------------+
> | Debian 11 (Buster) (ARM)               | PASS               |
> +----------------------------------------+--------------------+
> | Ubuntu 20.04 ARM Clang Cross Compile   | PASS               |
> +----------------------------------------+--------------------+
> | Ubuntu 20.04 aarch32 GCC Cross Compile | PASS               |
> +----------------------------------------+--------------------+
> | Debian 12 (arm)                        | PASS               |
> +----------------------------------------+--------------------+
> 
> ==== 20 line log output for Debian 12 with MUSDK (dpdk_meson_compile): ====
> [888/1284] Linking static target drivers/libtmp_rte_net_r8169.a [889/1284]
> Generating rte_net_r8169.pmd.c with a custom command [890/1284] Compiling C
> object drivers/librte_net_r8169.a.p/meson-generated_.._rte_net_r8169.pmd.c.o
> [891/1284] Linking static target drivers/librte_net_r8169.a [892/1284]
> Compiling C object
> drivers/librte_net_r8169.so.25.1.p/meson-generated_.._rte_net_r8169.pmd.c.o
> [893/1284] Linking target drivers/librte_net_r8169.so.25.1 [894/1284]
> Compiling C object drivers/net/rnp/base/librnp_base.a.p/rnp_mbx.c.o
> [895/1284] Compiling C object
> drivers/net/rnp/base/librnp_base.a.p/rnp_fw_cmd.c.o
> [896/1284] Compiling C object
> drivers/net/rnp/base/librnp_base.a.p/rnp_mbx_fw.c.o
> FAILED: drivers/net/rnp/base/librnp_base.a.p/rnp_mbx_fw.c.o
> ccache aarch64-linux-gnu-gcc -Idrivers/net/rnp/base/librnp_base.a.p
> -Idrivers/net/rnp/base -I../drivers/net/rnp/base -I. -I.. -Iconfig
> -I../config -Ilib/eal/include -I../lib/eal/include -Ilib/eal/linux/include
> -I../lib/eal/linux/include -Ilib/eal/arm/include -I../lib/eal/arm/include
> -I../kernel/linux -Ilib/eal/common -I../lib/eal/common -Ilib/eal
> -I../lib/eal -Ilib/kvargs -I../lib/kvargs -Ilib/log -I../lib/log
> -Ilib/metrics -I../lib/metrics -Ilib/telemetry -I../lib/telemetry -Ilib/net
> -I../lib/net -Ilib/mbuf -I../lib/mbuf -Ilib/mempool -I../lib/mempool
> -Ilib/ring -I../lib/ring -Ilib/ethdev -I../lib/ethdev -Ilib/meter
> -I../lib/meter -fdiagnostics-color=always -pipe -D_FILE_OFFSET_BITS=64 -Wall
> -Winvalid-pch -Wextra -Werror -std=c11 -O3 -include rte_config.h -Wvla
> -Wcast-qual -Wdeprecated -Wformat -Wformat-nonliteral -Wformat-security
> -Wmissing-declarations -Wmissing-prototypes -Wnested-externs
> -Wold-style-definition -Wpointer-arith -Wsign-compare -Wstrict-prototypes
> -Wundef -Wwrite-st  rings -Wno-packed-not-aligned
> -Wno-missing-field-initializers -D_GNU_SOURCE -fPIC -mcpu=cortex-a72
> -DALLOW_EXPERIMENTAL_API -DALLOW_INTERNAL_API -Wno-format-truncation
> -Wno-address-of-packed-member -DRTE_LIBRTE_IXGBE_BYPASS -Wno-unused-value
> -Wno-unused-but-set-variable -Wno-unused-parameter -MD -MQ
> drivers/net/rnp/base/librnp_base.a.p/rnp_mbx_fw.c.o -MF
> drivers/net/rnp/base/librnp_base.a.p/rnp_mbx_fw.c.o.d -o
> drivers/net/rnp/base/librnp_base.a.p/rnp_mbx_fw.c.o -c
> ../drivers/net/rnp/base/rnp_mbx_fw.c
> ../drivers/net/rnp/base/rnp_mbx_fw.c: In function
> 'rnp_mbx_fw_get_capability':
> ../drivers/net/rnp/base/rnp_mbx_fw.c:257:65: error: 'ability' may be used
> uninitialized [-Werror=maybe-uninitialized]
> 257 |                         hw->phy_port_ids[idx] = ability.port_ids[idx];
> |                                                 ~~~~~~~~~~~~~~~~^~~~~
> ../drivers/net/rnp/base/rnp_mbx_fw.c:235:38: note: 'ability' declared here
> 235 |         struct rnp_phy_abilities_rep ability;
> |                                      ^~~~~~~
> cc1: all warnings being treated as errors
> ninja: build stopped: subcommand failed.
> ==== End log output ====

Yes, it looks like a compiler bug.  Unfortunately, DPDK has to workaround
issues with buggy compilers 

some times.
Maybe just do this instead

diff --git a/drivers/net/rnp/base/rnp_mbx_fw.c 
b/drivers/net/rnp/base/rnp_mbx_fw.c
index 4f351ce960..185bf4dee8 100644
--- a/drivers/net/rnp/base/rnp_mbx_fw.c
+++ b/drivers/net/rnp/base/rnp_mbx_fw.c
@@ -232,7 +232,7 @@ rnp_fw_get_phy_capability(struct rnp_eth_port *port,
 
 int rnp_mbx_fw_get_capability(struct rnp_eth_port *port)
 {
-       struct rnp_phy_abilities_rep ability;
+       struct rnp_phy_abilities_rep ability = { };
        struct rnp_hw *hw = port->hw;
        u32 is_sgmii_bits = 0;
        bool is_sgmii = false;
@@ -243,7 +243,6 @@ int rnp_mbx_fw_get_capability(struct rnp_eth_port *port)
        u8 lane_idx;
        u32 idx;
 
-       memset(&ability, 0, sizeof(ability));
        err = rnp_fw_get_phy_capability(port, &ability);
        if (!err) {
                hw->lane_mask = ability.lane_mask;



Reply via email to