X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Figmp%2Figmp.c;h=30f167d483a6143e59dc387478c982783f5bbfae;hb=HEAD;hp=1e9f647cd11bb15db263511c1574bb7441aebbe9;hpb=097fa66b986f06281f603767d321ab13ab6c88c3;p=vpp.git diff --git a/src/plugins/igmp/igmp.c b/src/plugins/igmp/igmp.c index 1e9f647cd11..30f167d483a 100644 --- a/src/plugins/igmp/igmp.c +++ b/src/plugins/igmp/igmp.c @@ -35,7 +35,6 @@ igmp_main_t igmp_main; -/* *INDENT-OFF* */ /* General Query address */ const static mfib_prefix_t mpfx_general_query = { .fp_proto = FIB_PROTOCOL_IP4, @@ -57,7 +56,6 @@ const static mfib_prefix_t mpfx_report = { }, }, }; -/* *INDENT-ON* */ /** * @brief igmp send query (igmp_timer_function_t) @@ -282,7 +280,7 @@ igmp_listen (vlib_main_t * vm, } if (0 == igmp_group_n_srcs (group, mode)) - igmp_group_clear (group); + igmp_group_clear (&group); vec_free (added); vec_free (removed); @@ -303,13 +301,6 @@ error: return (rv); } -/** \brief igmp hardware interface link up down - @param vnm - vnet main - @param hw_if_index - interface hw_if_index - @param flags - hw interface flags - - If an interface goes down, remove its (S,G)s. -*/ static walk_rc_t igmp_sw_if_down (vnet_main_t * vnm, u32 sw_if_index, void *ctx) { @@ -325,6 +316,13 @@ igmp_sw_if_down (vnet_main_t * vnm, u32 sw_if_index, void *ctx) return (WALK_CONTINUE); } +/** \brief igmp hardware interface link up down + @param vnm - vnet main + @param hw_if_index - interface hw_if_index + @param flags - hw interface flags + + If an interface goes down, remove its (S,G)s. +*/ static clib_error_t * igmp_hw_interface_link_up_down (vnet_main_t * vnm, u32 hw_if_index, u32 flags) { @@ -345,7 +343,6 @@ igmp_enable_disable (u32 sw_if_index, u8 enable, igmp_mode_t mode) IGMP_DBG ("%s: %U", (enable ? "Enabled" : "Disabled"), format_vnet_sw_if_index_name, vnet_get_main (), sw_if_index); - /* *INDENT-OFF* */ fib_route_path_t via_itf_path = { .frp_proto = fib_proto_to_dpo (FIB_PROTOCOL_IP4), @@ -365,7 +362,6 @@ igmp_enable_disable (u32 sw_if_index, u8 enable, igmp_mode_t mode) .frp_mitf_flags = MFIB_ITF_FLAG_FORWARD, }; - /* *INDENT-ON* */ /* find configuration, if it doesn't exist, create new */ config = igmp_config_lookup (sw_if_index); mfib_index = mfib_table_get_index_for_sw_if_index (FIB_PROTOCOL_IP4, @@ -408,18 +404,19 @@ igmp_enable_disable (u32 sw_if_index, u8 enable, igmp_mode_t mode) { /* first config in this FIB */ mfib_table_lock (mfib_index, FIB_PROTOCOL_IP4, MFIB_SOURCE_IGMP); - mfib_table_entry_path_update (mfib_index, - &mpfx_general_query, - MFIB_SOURCE_IGMP, &for_us_path); - mfib_table_entry_path_update (mfib_index, - &mpfx_report, - MFIB_SOURCE_IGMP, &for_us_path); + mfib_table_entry_path_update (mfib_index, &mpfx_general_query, + MFIB_SOURCE_IGMP, + MFIB_ENTRY_FLAG_NONE, &for_us_path); + mfib_table_entry_path_update (mfib_index, &mpfx_report, + MFIB_SOURCE_IGMP, + MFIB_ENTRY_FLAG_NONE, &for_us_path); } - mfib_table_entry_path_update (mfib_index, - &mpfx_general_query, - MFIB_SOURCE_IGMP, &via_itf_path); + mfib_table_entry_path_update (mfib_index, &mpfx_general_query, + MFIB_SOURCE_IGMP, MFIB_ENTRY_FLAG_NONE, + &via_itf_path); mfib_table_entry_path_update (mfib_index, &mpfx_report, - MFIB_SOURCE_IGMP, &via_itf_path); + MFIB_SOURCE_IGMP, MFIB_ENTRY_FLAG_NONE, + &via_itf_path); } } else if (config && !enable) @@ -487,7 +484,6 @@ igmp_init (vlib_main_t * vm) return (0); } -/* *INDENT-OFF* */ VLIB_INIT_FUNCTION (igmp_init) = { .runs_after = VLIB_INITS("ip4_lookup_init"), @@ -497,7 +493,6 @@ VLIB_PLUGIN_REGISTER () = .version = VPP_BUILD_VER, .description = "Internet Group Management Protocol (IGMP)", }; -/* *INDENT-ON* */ /* * fd.io coding-style-patch-verification: ON