aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/igmp/igmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/igmp/igmp.c')
-rw-r--r--src/plugins/igmp/igmp.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/plugins/igmp/igmp.c b/src/plugins/igmp/igmp.c
index 6499b5be466..15f6317c93c 100644
--- a/src/plugins/igmp/igmp.c
+++ b/src/plugins/igmp/igmp.c
@@ -74,7 +74,7 @@ igmp_clear_config (igmp_config_t * config)
pool_free (config->groups);
hash_free (config->igmp_group_by_key);
- hash_unset_mem (im->igmp_config_by_sw_if_index, &config->sw_if_index);
+ hash_unset (im->igmp_config_by_sw_if_index, config->sw_if_index);
pool_put (im->configs, config);
}
@@ -635,7 +635,7 @@ igmp_send_state_changed (vlib_main_t * vm, vlib_node_runtime_t * rt,
igmp_clear_group (config, group);
if (pool_elts (config->groups) == 0)
{
- hash_unset_mem (im->igmp_config_by_sw_if_index, &config->sw_if_index);
+ hash_unset (im->igmp_config_by_sw_if_index, config->sw_if_index);
pool_put (im->configs, config);
}
}
@@ -784,8 +784,8 @@ igmp_listen (vlib_main_t * vm, u8 enable, u32 sw_if_index,
config->adj_index =
adj_mcast_add_or_lock (FIB_PROTOCOL_IP4, VNET_LINK_IP4,
config->sw_if_index);
- hash_set_mem (im->igmp_config_by_sw_if_index,
- &config->sw_if_index, config - im->configs);
+ hash_set (im->igmp_config_by_sw_if_index,
+ config->sw_if_index, config - im->configs);
}
else if (config->cli_api_configured != cli_api_configured)
{
@@ -979,10 +979,8 @@ igmp_init (vlib_main_t * vm)
int i;
if ((error = vlib_call_init_function (vm, ip4_lookup_init)))
return error;
- im->igmp_config_by_sw_if_index =
- hash_create_mem (0, sizeof (u32), sizeof (uword));
- im->igmp_api_client_by_client_index =
- hash_create_mem (0, sizeof (u32), sizeof (uword));
+ im->igmp_config_by_sw_if_index = hash_create (0, sizeof (u32));
+ im->igmp_api_client_by_client_index = hash_create (0, sizeof (u32));
vec_validate_aligned (im->buffers, tm->n_vlib_mains - 1,
CLIB_CACHE_LINE_BYTES);
ip4_register_protocol (IP_PROTOCOL_IGMP, igmp_input_node.index);