X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fstn%2Fstn.c;h=cab2cf10e011a420ddf81ef9c51391e6ac851207;hb=2a6642e95dc18d7c56f87b74a70658b8312b8c08;hp=2838c4bea0ba931b7d510608d0beb0582a9d8da3;hpb=260de8684d48c1a69e169112fa053d2df1b4871f;p=vpp.git diff --git a/src/plugins/stn/stn.c b/src/plugins/stn/stn.c index 2838c4bea0b..cab2cf10e01 100644 --- a/src/plugins/stn/stn.c +++ b/src/plugins/stn/stn.c @@ -63,8 +63,8 @@ format_stn_ip46_punt_trace (u8 * s, va_list * args, u8 is_ipv4) stn_ip46_punt_trace_t *t = va_arg (*args, stn_ip46_punt_trace_t *); u32 indent = format_get_indent (s); - format (s, "dst_address: %U\n", format_ip46_address, - (ip46_address_t *)&t->kv.key, IP46_TYPE_ANY); + s = format (s, "dst_address: %U\n", format_ip46_address, + (ip46_address_t *)t->kv.key, IP46_TYPE_ANY); if (t->kv.value == ~(0L)) { @@ -141,13 +141,13 @@ stn_ip46_punt_fn (vlib_main_t * vm, vlib_buffer_advance(p0, -sizeof(*eth)); eth = (ethernet_header_t *) vlib_buffer_get_current(p0); if (is_ipv4) - clib_memcpy(eth, &stn_ip4_ethernet_header, sizeof(*eth)); + clib_memcpy_fast(eth, &stn_ip4_ethernet_header, sizeof(*eth)); else - clib_memcpy(eth, &stn_ip6_ethernet_header, sizeof(*eth)); + clib_memcpy_fast(eth, &stn_ip6_ethernet_header, sizeof(*eth)); } else { - vnet_feature_next (0, &next0, p0); + vnet_feature_next (&next0, p0); } if (PREDICT_FALSE (p0->flags & VLIB_BUFFER_IS_TRACED)) @@ -261,12 +261,12 @@ stn_init (vlib_main_t * vm) clib_bihash_init_16_8(&stn->rule_by_address_table, "stn addresses", 1024, 1<<20); - clib_memcpy(stn_ip4_ethernet_header.dst_address, stn_hw_addr_dst, 6); - clib_memcpy(stn_ip4_ethernet_header.src_address, stn_hw_addr_local, 6); + clib_memcpy_fast(stn_ip4_ethernet_header.dst_address, stn_hw_addr_dst, 6); + clib_memcpy_fast(stn_ip4_ethernet_header.src_address, stn_hw_addr_local, 6); stn_ip4_ethernet_header.type = clib_host_to_net_u16(ETHERNET_TYPE_IP4); - clib_memcpy(stn_ip6_ethernet_header.dst_address, stn_hw_addr_dst, 6); - clib_memcpy(stn_ip6_ethernet_header.src_address, stn_hw_addr_local, 6); + clib_memcpy_fast(stn_ip6_ethernet_header.dst_address, stn_hw_addr_dst, 6); + clib_memcpy_fast(stn_ip6_ethernet_header.src_address, stn_hw_addr_local, 6); stn_ip6_ethernet_header.type = clib_host_to_net_u16(ETHERNET_TYPE_IP6); return stn_api_init (vm, stn); @@ -279,7 +279,7 @@ VLIB_INIT_FUNCTION (stn_init); /* *INDENT-OFF* */ VLIB_PLUGIN_REGISTER () = { .version = VPP_BUILD_VER, - .description = "VPP Steals the NIC for Container integration", + .description = "VPP Steals the NIC (STN) for Container Integration", }; /* *INDENT-ON* */