X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Fip%2Fip6_hop_by_hop.c;h=38cdbfffeaad059d65f18ccf83e9197ba0f5e370;hb=2af0e3a;hp=90a4d21d3a60c854052f0ce2b29b3417de3b8361;hpb=ce07412a54f06900b377a7f4966f6a26e19b8f2b;p=vpp.git diff --git a/src/vnet/ip/ip6_hop_by_hop.c b/src/vnet/ip/ip6_hop_by_hop.c index 90a4d21d3a6..38cdbfffeaa 100644 --- a/src/vnet/ip/ip6_hop_by_hop.c +++ b/src/vnet/ip/ip6_hop_by_hop.c @@ -103,7 +103,7 @@ ip6_hbh_add_register_option (u8 option, { ip6_hop_by_hop_ioam_main_t *hm = &ip6_hop_by_hop_ioam_main; - ASSERT (option < ARRAY_LEN (hm->add_options)); + ASSERT ((u32) option < ARRAY_LEN (hm->add_options)); /* Already registered */ if (hm->add_options[option]) @@ -120,7 +120,7 @@ ip6_hbh_add_unregister_option (u8 option) { ip6_hop_by_hop_ioam_main_t *hm = &ip6_hop_by_hop_ioam_main; - ASSERT (option < ARRAY_LEN (hm->add_options)); + ASSERT ((u32) option < ARRAY_LEN (hm->add_options)); /* Not registered */ if (!hm->add_options[option]) @@ -138,7 +138,7 @@ ip6_hbh_config_handler_register (u8 option, { ip6_hop_by_hop_ioam_main_t *hm = &ip6_hop_by_hop_ioam_main; - ASSERT (option < ARRAY_LEN (hm->config_handler)); + ASSERT ((u32) option < ARRAY_LEN (hm->config_handler)); /* Already registered */ if (hm->config_handler[option]) @@ -154,7 +154,7 @@ ip6_hbh_config_handler_unregister (u8 option) { ip6_hop_by_hop_ioam_main_t *hm = &ip6_hop_by_hop_ioam_main; - ASSERT (option < ARRAY_LEN (hm->config_handler)); + ASSERT ((u32) option < ARRAY_LEN (hm->config_handler)); /* Not registered */ if (!hm->config_handler[option]) @@ -171,7 +171,7 @@ ip6_hbh_flow_handler_register (u8 option, { ip6_hop_by_hop_ioam_main_t *hm = &ip6_hop_by_hop_ioam_main; - ASSERT (option < ARRAY_LEN (hm->flow_handler)); + ASSERT ((u32) option < ARRAY_LEN (hm->flow_handler)); /* Already registered */ if (hm->flow_handler[option]) @@ -187,7 +187,7 @@ ip6_hbh_flow_handler_unregister (u8 option) { ip6_hop_by_hop_ioam_main_t *hm = &ip6_hop_by_hop_ioam_main; - ASSERT (option < ARRAY_LEN (hm->flow_handler)); + ASSERT ((u32) option < ARRAY_LEN (hm->flow_handler)); /* Not registered */ if (!hm->flow_handler[option]) @@ -321,8 +321,8 @@ ip6_add_hop_by_hop_node_fn (vlib_main_t * vm, hbh0 = (ip6_hop_by_hop_header_t *) (ip0 + 1); hbh1 = (ip6_hop_by_hop_header_t *) (ip1 + 1); /* $$$ tune, rewrite_length is a multiple of 8 */ - clib_memcpy (hbh0, rewrite, rewrite_length); - clib_memcpy (hbh1, rewrite, rewrite_length); + clib_memcpy_fast (hbh0, rewrite, rewrite_length); + clib_memcpy_fast (hbh1, rewrite, rewrite_length); /* Patch the protocol chain, insert the h-b-h (type 0) header */ hbh0->protocol = ip0->protocol; hbh1->protocol = ip1->protocol; @@ -399,7 +399,7 @@ ip6_add_hop_by_hop_node_fn (vlib_main_t * vm, hbh0 = (ip6_hop_by_hop_header_t *) (ip0 + 1); /* $$$ tune, rewrite_length is a multiple of 8 */ - clib_memcpy (hbh0, rewrite, rewrite_length); + clib_memcpy_fast (hbh0, rewrite, rewrite_length); /* Patch the protocol chain, insert the h-b-h (type 0) header */ hbh0->protocol = ip0->protocol; ip0->protocol = 0; @@ -484,7 +484,7 @@ ip6_hbh_pop_register_option (u8 option, { ip6_hop_by_hop_ioam_main_t *hm = &ip6_hop_by_hop_ioam_main; - ASSERT (option < ARRAY_LEN (hm->pop_options)); + ASSERT ((u32) option < ARRAY_LEN (hm->pop_options)); /* Already registered */ if (hm->pop_options[option]) @@ -500,7 +500,7 @@ ip6_hbh_pop_unregister_option (u8 option) { ip6_hop_by_hop_ioam_main_t *hm = &ip6_hop_by_hop_ioam_main; - ASSERT (option < ARRAY_LEN (hm->pop_options)); + ASSERT ((u32) option < ARRAY_LEN (hm->pop_options)); /* Not registered */ if (!hm->pop_options[option]) @@ -809,9 +809,9 @@ ip6_hop_by_hop_ioam_init (vlib_main_t * vm) hm->unix_time_0 = (u32) time (0); /* Store starting time */ hm->vlib_time_0 = vlib_time_now (vm); hm->ioam_flag = IOAM_HBYH_MOD; - memset (hm->add_options, 0, sizeof (hm->add_options)); - memset (hm->pop_options, 0, sizeof (hm->pop_options)); - memset (hm->options_size, 0, sizeof (hm->options_size)); + clib_memset (hm->add_options, 0, sizeof (hm->add_options)); + clib_memset (hm->pop_options, 0, sizeof (hm->pop_options)); + clib_memset (hm->options_size, 0, sizeof (hm->options_size)); vnet_classify_register_unformat_opaque_index_fn (unformat_opaque_ioam);