net/ixgbe: fix possible uninitialized variable
PATCH 1/1 net/ixgbe: fix possible uninitialized variable
The uninitialized field 'extra_flag' of hash parameter may enable certain feature silently. Typically, if bit0 of 'extra_flag' set, the hardware transactional memory support will be enabled unexpectedly.
Signed-off-by Haiyang Tan <[email protected]>
--- drivers/net/ixgbe/ixgbe_ethdev.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
drivers/net/ixgbe/ixgbe_ethdev.c +8 -8
@@ -1426,14 +1426,14 @@ static int ixgbe_fdir_filter_init(struct rte_eth_dev *eth_dev)struct ixgbe_hw_fdir_info *fdir_info =IXGBE_DEV_PRIVATE_TO_FDIR_INFO (eth_dev->data->dev_private);char fdir_hash_name[RTE_HASH_NAMESIZE ]; -struct rte_hash_parameters fdir_hash_params = { - .name = fdir_hash_name, - .entries =IXGBE_MAX_FDIR_FILTER_NUM , - .key_len =sizeof (union ixgbe_atr_input ), - .hash_func = rte_hash_crc, - .hash_func_init_val =0 , - .socket_id =rte_socket_id (), - }; +struct rte_hash_parameters fdir_hash_params = {0 }; + + fdir_hash_params.name = fdir_hash_name; + fdir_hash_params.entries =IXGBE_MAX_FDIR_FILTER_NUM ; + fdir_hash_params.key_len =sizeof (union ixgbe_atr_input ); + fdir_hash_params.hash_func = rte_hash_crc; + fdir_hash_params.hash_func_init_val =0 ; + fdir_hash_params.socket_id =rte_socket_id ();TAILQ_INIT (&fdir_info->fdir_list); snprintf(fdir_hash_name, RTE_HASH_NAMESIZE,
Signature · 1 line
2.14.1