efd: fix uninitialized structure
authorPablo de Lara <pablo.de.lara.guarch@intel.com>
Fri, 25 Feb 2022 09:27:45 +0000 (09:27 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 27 Feb 2022 17:58:47 +0000 (18:58 +0100)
Coverity flags that both elements of efd_online_group_entry
are used uninitialized. This is OK because this structure
is initially used for starting values, so any value is OK.

Coverity ID: 375868
Fixes: 56b6ef874f80 ("efd: new Elastic Flow Distributor library")
Cc: stable@dpdk.org
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
Acked-by: Yipeng Wang <yipeng1.wang@intel.com>
lib/efd/rte_efd.c

index 560cd78..bbc6fc5 100644 (file)
@@ -1162,7 +1162,7 @@ rte_efd_update(struct rte_efd_table * const table, const unsigned int socket_id,
 {
        uint32_t chunk_id = 0, group_id = 0, bin_id = 0;
        uint8_t new_bin_choice = 0;
-       struct efd_online_group_entry entry;
+       struct efd_online_group_entry entry = {{0}};
 
        int status = efd_compute_update(table, socket_id, key, value,
                        &chunk_id, &group_id, &bin_id,