diff options
Diffstat (limited to 'vnet')
-rw-r--r-- | vnet/vnet/cdp/cdp_input.c | 16 | ||||
-rw-r--r-- | vnet/vnet/cdp/cdp_node.c | 18 | ||||
-rw-r--r-- | vnet/vnet/cdp/cdp_periodic.c | 14 | ||||
-rw-r--r-- | vnet/vnet/cdp/cdp_protocol.h | 12 | ||||
-rw-r--r-- | vnet/vnet/ethernet/arp.c | 28 | ||||
-rw-r--r-- | vnet/vnet/ethernet/ethernet.h | 6 | ||||
-rw-r--r-- | vnet/vnet/ethernet/init.c | 2 | ||||
-rw-r--r-- | vnet/vnet/ethernet/interface.c | 4 | ||||
-rw-r--r-- | vnet/vnet/ethernet/mac_swap.c | 8 | ||||
-rw-r--r-- | vnet/vnet/ethernet/node.c | 14 | ||||
-rw-r--r-- | vnet/vnet/ipsec/ikev2_cli.c | 30 | ||||
-rw-r--r-- | vnet/vnet/ipsec/ipsec.c | 4 | ||||
-rw-r--r-- | vnet/vnet/l2tp/l2tp.c | 34 | ||||
-rw-r--r-- | vnet/vnet/l2tp/packet.h | 6 | ||||
-rw-r--r-- | vnet/vnet/map/ip4_map.c | 4 | ||||
-rw-r--r-- | vnet/vnet/map/ip6_map.c | 2 | ||||
-rw-r--r-- | vnet/vnet/map/map.c | 16 | ||||
-rw-r--r-- | vnet/vnet/sr/sr.c | 96 | ||||
-rw-r--r-- | vnet/vnet/sr/sr.h | 2 | ||||
-rw-r--r-- | vnet/vnet/sr/sr_packet.h | 4 |
20 files changed, 160 insertions, 160 deletions
diff --git a/vnet/vnet/cdp/cdp_input.c b/vnet/vnet/cdp/cdp_input.c index 0a4fb773..3574de68 100644 --- a/vnet/vnet/cdp/cdp_input.c +++ b/vnet/vnet/cdp/cdp_input.c @@ -325,9 +325,9 @@ cdp_input (vlib_main_t * vm, vlib_buffer_t * b0, u32 bi0) n = pool_elt_at_index (cm->neighbors, p[0]); } - /* + /* * typical clib idiom. Don't repeatedly allocate and free - * the per-neighbor rx buffer. Reset its apparent length to zero + * the per-neighbor rx buffer. Reset its apparent length to zero * and reuse it. */ @@ -338,20 +338,20 @@ cdp_input (vlib_main_t * vm, vlib_buffer_t * b0, u32 bi0) if (n->disabled) return CDP_ERROR_DISABLED; - /* + /* * Make sure the per-neighbor rx buffer is big enough to hold * the data we're about to copy */ vec_validate (n->last_rx_pkt, vlib_buffer_length_in_chain (vm, b0) - 1); - /* + /* * Coalesce / copy e the buffer chain into the per-neighbor - * rx buffer + * rx buffer */ nbytes = vlib_buffer_contents (vm, bi0, n->last_rx_pkt); ASSERT (nbytes <= vec_len (n->last_rx_pkt)); - /* + /* * Compute Jenkins hash of the new packet, decide if we need to * actually parse through the TLV's. CDP packets are all identical, * so unless we time out the peer, we don't need to process the packet. @@ -422,9 +422,9 @@ format_cdp_neighbors (u8 * s, va_list * va) pool_foreach (n, cm->neighbors, ({ hw = vnet_get_sup_hw_interface (vnm, n->sw_if_index); - + if (n->disabled == 0) - s = format (s, "%=25s %=15s %=25s %=10.1f\n", + s = format (s, "%=25s %=15s %=25s %=10.1f\n", hw->name, n->device_name, n->port_id, n->last_heard); })); diff --git a/vnet/vnet/cdp/cdp_node.c b/vnet/vnet/cdp/cdp_node.c index de62d4c7..39ac4a90 100644 --- a/vnet/vnet/cdp/cdp_node.c +++ b/vnet/vnet/cdp/cdp_node.c @@ -31,7 +31,7 @@ static vlib_node_registration_t cdp_process_node; /* * packet counter strings - * Dump these counters via the "show error" CLI command + * Dump these counters via the "show error" CLI command */ static char *cdp_error_strings[] = { #define _(sym,string) string, @@ -51,8 +51,8 @@ typedef enum } cdp_next_t; /* - * Process a frame of cdp packets - * Expect 1 packet / frame + * Process a frame of cdp packets + * Expect 1 packet / frame */ static uword cdp_node_fn (vlib_main_t * vm, @@ -100,7 +100,7 @@ cdp_node_fn (vlib_main_t * vm, } /* - * cdp input graph node declaration + * cdp input graph node declaration */ /* *INDENT-OFF* */ VLIB_REGISTER_NODE (cdp_input_node, static) = { @@ -108,12 +108,12 @@ VLIB_REGISTER_NODE (cdp_input_node, static) = { .name = "cdp-input", .vector_size = sizeof (u32), .type = VLIB_NODE_TYPE_INTERNAL, - + .n_errors = CDP_N_ERROR, .error_strings = cdp_error_strings, - + .format_trace = cdp_input_format_trace, - + .n_next_nodes = CDP_INPUT_N_NEXT, .next_nodes = { [CDP_INPUT_NEXT_NORMAL] = "error-drop", @@ -122,7 +122,7 @@ VLIB_REGISTER_NODE (cdp_input_node, static) = { /* *INDENT-ON* */ /* - * cdp periodic function + * cdp periodic function */ static uword cdp_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f) @@ -184,7 +184,7 @@ cdp_process (vlib_main_t * vm, vlib_node_runtime_t * rt, vlib_frame_t * f) } /* - * cdp periodic node declaration + * cdp periodic node declaration */ /* *INDENT-OFF* */ VLIB_REGISTER_NODE (cdp_process_node, static) = { diff --git a/vnet/vnet/cdp/cdp_periodic.c b/vnet/vnet/cdp/cdp_periodic.c index 8a000c7f..de111079 100644 --- a/vnet/vnet/cdp/cdp_periodic.c +++ b/vnet/vnet/cdp/cdp_periodic.c @@ -118,9 +118,9 @@ send_ethernet_hello (cdp_main_t * cm, cdp_neighbor_t * n, int count) for (i = 0; i < count; i++) { - /* + /* * see cdp_periodic_init() to understand what's already painted - * into the buffer by the packet template mechanism + * into the buffer by the packet template mechanism */ h0 = vlib_packet_template_get_packet (vm, &cm->packet_templates[n->packet_template_index], &bi0); @@ -185,9 +185,9 @@ send_hdlc_hello (cdp_main_t * cm, cdp_neighbor_t * n, int count) for (i = 0; i < count; i++) { - /* + /* * see cdp_periodic_init() to understand what's already painted - * into the buffer by the packet template mechanism + * into the buffer by the packet template mechanism */ h0 = vlib_packet_template_get_packet (vm, &cm->packet_templates[n->packet_template_index], &bi0); @@ -241,9 +241,9 @@ send_srp_hello (cdp_main_t * cm, cdp_neighbor_t * n, int count) for (i = 0; i < count; i++) { - /* + /* * see cdp_periodic_init() to understand what's already painted - * into the buffer by the packet template mechanism + * into the buffer by the packet template mechanism */ h0 = vlib_packet_template_get_packet (vm, &cm->packet_templates[n->packet_template_index], &bi0); @@ -349,7 +349,7 @@ cdp_periodic (vlib_main_t * vm) static cdp_neighbor_t **n_list = 0; /* *INDENT-OFF* */ - pool_foreach (n, cm->neighbors, + pool_foreach (n, cm->neighbors, ({ vec_add1 (n_list, n); })); diff --git a/vnet/vnet/cdp/cdp_protocol.h b/vnet/vnet/cdp/cdp_protocol.h index c68f7ca3..dc6c66d5 100644 --- a/vnet/vnet/cdp/cdp_protocol.h +++ b/vnet/vnet/cdp/cdp_protocol.h @@ -60,7 +60,7 @@ typedef CLIB_PACKED (struct }) cdp_tlv_t; /* - * TLV codes. + * TLV codes. */ #define foreach_cdp_tlv_type \ _(unused) \ @@ -120,11 +120,11 @@ typedef enum | Address length | Address (variable) ... +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ - PT: Protocol type - 1 = NLPID format + PT: Protocol type + 1 = NLPID format 2 = 802.2 format - PT Length: + PT Length: Length of protocol field, 1 for PT = 1, and either 3 or 8 for 802.2 format depending if SNAP is used for PT = 2. @@ -133,11 +133,11 @@ typedef enum field: <SSAP><DSAP><CTRL><-------OUI------><protocl_TYPE> | | | | | | | | | bytes: 0 1 2 3 4 5 6 7 8 - + where the first 3 bytes are 0xAAAA03 for SNAP encoded addresses. The OUI is 000000 for ethernet and <protocl_TYPE> is the assigned Ethernet type code for the particular protocol. - e.g. for DECnet the encoding is AAAA03 000000 6003. + e.g. for DECnet the encoding is AAAA03 000000 6003. for IPv6 the encoding is AAAA03 000000 86DD */ diff --git a/vnet/vnet/ethernet/arp.c b/vnet/vnet/ethernet/arp.c index 1346d605..c0b06e0f 100644 --- a/vnet/vnet/ethernet/arp.c +++ b/vnet/vnet/ethernet/arp.c @@ -512,7 +512,7 @@ vnet_arp_set_ip4_over_ethernet_internal (vnet_main_t * vnm, if (fp) rv = (*fp) (mc->data, a->ethernet, sw_if_index, 0); - /* + /* * Signal the resolver process, as long as the user * says they want to be notified */ @@ -1095,9 +1095,9 @@ arp_input (vlib_main_t * vm, vlib_node_runtime_t * node, vlib_frame_t * frame) proxy_src.as_u32 = arp0->ip4_over_ethernet[1].ip4.data_u32; - /* + /* * Rewind buffer, direct code above not to - * think too hard about it. + * think too hard about it. * $$$ is the answer ever anything other than * vlib_buffer_reset(..)? */ @@ -1476,16 +1476,16 @@ vnet_arp_unset_ip4_over_ethernet_internal (vnet_main_t * vnm, memset (&args, 0, sizeof (args)); - /* + /* * Make sure that the route actually exists before we try to delete it, * and make sure that it's a rewrite adjacency. * - * If we point 1-N unnumbered interfaces at a loopback interface and - * shut down the loopback before shutting down 1-N unnumbered - * interfaces, the ARP cache will still have an entry, + * If we point 1-N unnumbered interfaces at a loopback interface and + * shut down the loopback before shutting down 1-N unnumbered + * interfaces, the ARP cache will still have an entry, * but the route will have disappeared. - * - * See also ip4_del_interface_routes (...) + * + * See also ip4_del_interface_routes (...) * -> ip4_delete_matching_routes (...). */ @@ -1496,7 +1496,7 @@ vnet_arp_unset_ip4_over_ethernet_internal (vnet_main_t * vnm, if (adj_index != lm->miss_adj_index) { adj = ip_get_adjacency (lm, adj_index); - /* + /* * Stupid control-plane trick: * admin down an interface (removes arp routes from fib), * bring the interface back up (does not reinstall them) @@ -1582,7 +1582,7 @@ vnet_proxy_arp_add_del (ip4_address_t * lo_addr, } /* - * Remove any proxy arp entries asdociated with the + * Remove any proxy arp entries asdociated with the * specificed fib. */ int @@ -1964,7 +1964,7 @@ arp_term_l2bd (vlib_main_t * vm, macp0 = (u8 *) hash_get (last_bd_config->mac_by_ip4, ip0); if (PREDICT_FALSE (!macp0)) - goto next_l2_feature; // MAC not found + goto next_l2_feature; // MAC not found // MAC found, send ARP reply - // Convert ARP request packet to ARP reply @@ -1976,7 +1976,7 @@ arp_term_l2bd (vlib_main_t * vm, clib_memcpy (eth0->src_address, macp0, 6); n_replies_sent += 1; - // For BVI, need to use l2-fwd node to send ARP reply as + // For BVI, need to use l2-fwd node to send ARP reply as // l2-output node cannot output packet to BVI properly cfg0 = vec_elt_at_index (l2im->configs, sw_if_index0); if (PREDICT_FALSE (cfg0->bvi)) @@ -2052,7 +2052,7 @@ VLIB_REGISTER_NODE (arp_term_l2bd_node, static) = { clib_error_t * arp_term_init (vlib_main_t * vm) -{ // Initialize the feature next-node indexes +{ // Initialize the feature next-node indexes feat_bitmap_init_next_nodes (vm, arp_term_l2bd_node.index, L2INPUT_N_FEAT, diff --git a/vnet/vnet/ethernet/ethernet.h b/vnet/vnet/ethernet/ethernet.h index be5b99c7..d0eec1fc 100644 --- a/vnet/vnet/ethernet/ethernet.h +++ b/vnet/vnet/ethernet/ethernet.h @@ -444,7 +444,7 @@ eth_identify_subint (vnet_hw_interface_t * hi, // Each comparison is checking both the valid flag and the number of tags // (incorporating exact-match/non-exact-match). - // check for specific double tag + // check for specific double tag subint = &qinq_intf->subint; if ((subint->flags & match_flags) == match_flags) goto matched; @@ -454,7 +454,7 @@ eth_identify_subint (vnet_hw_interface_t * hi, if ((subint->flags & match_flags) == match_flags) goto matched; - // check for specific single tag + // check for specific single tag subint = &vlan_intf->single_tag_subint; if ((subint->flags & match_flags) == match_flags) goto matched; @@ -464,7 +464,7 @@ eth_identify_subint (vnet_hw_interface_t * hi, if ((subint->flags & match_flags) == match_flags) goto matched; - // check for default interface + // check for default interface subint = &main_intf->default_subint; if ((subint->flags & match_flags) == match_flags) goto matched; diff --git a/vnet/vnet/ethernet/init.c b/vnet/vnet/ethernet/init.c index b561a361..86597c4f 100644 --- a/vnet/vnet/ethernet/init.c +++ b/vnet/vnet/ethernet/init.c @@ -66,7 +66,7 @@ ethernet_init (vlib_main_t * vm) ethernet_main_t *em = ðernet_main; clib_error_t *error; - /* + /* * Set up the L2 path now, or we'll wipe out the L2 ARP * registration set up by ethernet_arp_init. */ diff --git a/vnet/vnet/ethernet/interface.c b/vnet/vnet/ethernet/interface.c index 9723ad9f..88daa347 100644 --- a/vnet/vnet/ethernet/interface.c +++ b/vnet/vnet/ethernet/interface.c @@ -298,7 +298,7 @@ simulated_ethernet_interface_tx (vlib_main_t * vm, vlib_buffer_t *b; // check tx node index, it is ethernet-input on loopback create - // but can be changed to l2-input if loopback is configured as + // but can be changed to l2-input if loopback is configured as // BVI of a BD (Bridge Domain). loop_node = vec_elt (nm->nodes, node->node_index); next_node_index = loop_node->next_nodes[next_index]; @@ -322,7 +322,7 @@ simulated_ethernet_interface_tx (vlib_main_t * vm, while (1) { // Set up RX and TX indices as if received from a real driver - // unless loopback is used as a BVI. For BVI case, leave TX index + // unless loopback is used as a BVI. For BVI case, leave TX index // and update l2_len in packet as required for l2 forwarding path vnet_buffer (b)->sw_if_index[VLIB_RX] = sw_if_index; if (bvi_flag) diff --git a/vnet/vnet/ethernet/mac_swap.c b/vnet/vnet/ethernet/mac_swap.c index 34dfdf7e..c0fec12e 100644 --- a/vnet/vnet/ethernet/mac_swap.c +++ b/vnet/vnet/ethernet/mac_swap.c @@ -81,9 +81,9 @@ static char *mac_swap_error_strings[] = { #undef _ }; -/* +/* * To drop a pkt and increment one of the previous counters: - * + * * set b0->error = error_node->errors[RANDOM_ERROR_SAMPLE]; * set next0 to a disposition index bound to "error-drop". * @@ -93,7 +93,7 @@ static char *mac_swap_error_strings[] = { * u32 node_counter_base_index = n->error_heap_index; * vlib_error_main_t * em = &vm->error_main; * em->counters[node_counter_base_index + MAC_SWAP_ERROR_SAMPLE] += 1; - * + * */ typedef enum @@ -348,7 +348,7 @@ VLIB_REGISTER_NODE (mac_swap_node,static) = { .vector_size = sizeof (u32), .format_trace = format_swap_trace, .type = VLIB_NODE_TYPE_INTERNAL, - + .n_errors = ARRAY_LEN(mac_swap_error_strings), .error_strings = mac_swap_error_strings, diff --git a/vnet/vnet/ethernet/node.c b/vnet/vnet/ethernet/node.c index 0261815a..74d4f476 100644 --- a/vnet/vnet/ethernet/node.c +++ b/vnet/vnet/ethernet/node.c @@ -273,7 +273,7 @@ determine_next_node (ethernet_main_t * em, SPARSE_VEC_INVALID_INDEX ? ETHERNET_ERROR_UNKNOWN_TYPE : *error0; // The table is not populated with LLC values, so check that now. - // If variant is variant_ethernet then we came from LLC processing. Don't + // If variant is variant_ethernet then we came from LLC processing. Don't // go back there; drop instead using by keeping the drop/bad table result. if ((type0 < 0x600) && (variant == ETHERNET_INPUT_VARIANT_ETHERNET)) { @@ -561,7 +561,7 @@ ethernet_input_inline (vlib_main_t * vm, // prior to calling this function. Thus only subinterface counters // are incremented here. // - // Interface level counters include packets received on the main + // Interface level counters include packets received on the main // interface and all subinterfaces. Subinterface level counters // include only those packets received on that subinterface // Increment stats if the subint is valid and it is not the main intf @@ -576,7 +576,7 @@ ethernet_input_inline (vlib_main_t * vm, stats_n_bytes += len0; // Batch stat increments from the same subinterface so counters - // don't need to be incremented for every packet. + // don't need to be incremented for every packet. if (PREDICT_FALSE (new_sw_if_index0 != stats_sw_if_index)) { stats_n_packets -= 1; @@ -956,7 +956,7 @@ ethernet_sw_interface_add_del (vnet_main_t * vnm, // not implemented yet or not ethernet if (unsupported) { - // this is the NYI case + // this is the NYI case error = clib_error_return (0, "not implemented yet"); } goto done; @@ -1089,8 +1089,8 @@ next_by_ethertype_init (next_by_ethertype_t * l3_next) l3_next->sparse_index_by_input_next_index[ETHERNET_INPUT_NEXT_PUNT] = SPARSE_VEC_INVALID_INDEX; - /* - * Make sure we don't wipe out an ethernet registration by mistake + /* + * Make sure we don't wipe out an ethernet registration by mistake * Can happen if init function ordering constraints are missing. */ if (CLIB_DEBUG > 0) @@ -1218,7 +1218,7 @@ ethernet_register_l2_input (vlib_main_t * vm, u32 node_index) em->l2_next = vlib_node_add_next (vm, ethernet_input_node.index, node_index); - /* + /* * Even if we never use these arcs, we have to align the next indices... */ i = vlib_node_add_next (vm, ethernet_input_type_node.index, node_index); diff --git a/vnet/vnet/ipsec/ikev2_cli.c b/vnet/vnet/ipsec/ikev2_cli.c index bbd9a573..6b2937fb 100644 --- a/vnet/vnet/ipsec/ikev2_cli.c +++ b/vnet/vnet/ipsec/ikev2_cli.c @@ -65,26 +65,26 @@ show_ikev2_sa_command_fn (vlib_main_t * vm, vlib_cli_output(vm, " iip %U ispi %lx rip %U rspi %lx", format_ip4_address, &sa->iaddr, sa->ispi, format_ip4_address, &sa->raddr, sa->rspi); - + tr = ikev2_sa_get_td_for_type(sa->r_proposals, IKEV2_TRANSFORM_TYPE_ENCR); s = format(s, "%U ", format_ikev2_sa_transform, tr); - + tr = ikev2_sa_get_td_for_type(sa->r_proposals, IKEV2_TRANSFORM_TYPE_PRF); s = format(s, "%U ", format_ikev2_sa_transform, tr); - + tr = ikev2_sa_get_td_for_type(sa->r_proposals, IKEV2_TRANSFORM_TYPE_INTEG); s = format(s, "%U ", format_ikev2_sa_transform, tr); - + tr = ikev2_sa_get_td_for_type(sa->r_proposals, IKEV2_TRANSFORM_TYPE_DH); s = format(s, "%U ", format_ikev2_sa_transform, tr); - + vlib_cli_output(vm, " %v", s); vec_free(s); - + vlib_cli_output(vm, " nonce i:%U\n r:%U", format_hex_bytes, sa->i_nonce, vec_len(sa->i_nonce), format_hex_bytes, sa->r_nonce, vec_len(sa->r_nonce)); - + vlib_cli_output(vm, " SK_d %U", format_hex_bytes, sa->sk_d, vec_len(sa->sk_d)); vlib_cli_output(vm, " SK_a i:%U\n r:%U", @@ -96,32 +96,32 @@ show_ikev2_sa_command_fn (vlib_main_t * vm, vlib_cli_output(vm, " SK_p i:%U\n r:%U", format_hex_bytes, sa->sk_pi, vec_len(sa->sk_pi), format_hex_bytes, sa->sk_pr, vec_len(sa->sk_pr)); - + vlib_cli_output(vm, " identifier (i) %U", format_ikev2_id_type_and_data, &sa->i_id); vlib_cli_output(vm, " identifier (r) %U", format_ikev2_id_type_and_data, &sa->r_id); - + vec_foreach(child, sa->childs) { vlib_cli_output(vm, " child sa %u:", child - sa->childs); - + tr = ikev2_sa_get_td_for_type(child->r_proposals, IKEV2_TRANSFORM_TYPE_ENCR); s = format(s, "%U ", format_ikev2_sa_transform, tr); - + tr = ikev2_sa_get_td_for_type(child->r_proposals, IKEV2_TRANSFORM_TYPE_INTEG); s = format(s, "%U ", format_ikev2_sa_transform, tr); - + tr = ikev2_sa_get_td_for_type(child->r_proposals, IKEV2_TRANSFORM_TYPE_ESN); s = format(s, "%U ", format_ikev2_sa_transform, tr); - + vlib_cli_output(vm, " %v", s); vec_free(s); - + vlib_cli_output(vm, " spi(i) %lx spi(r) %lx", child->i_proposals ? child->i_proposals[0].spi : 0, child->r_proposals ? child->r_proposals[0].spi : 0); - + vlib_cli_output(vm, " SK_e i:%U\n r:%U", format_hex_bytes, child->sk_ei, vec_len(child->sk_ei), format_hex_bytes, child->sk_er, vec_len(child->sk_er)); diff --git a/vnet/vnet/ipsec/ipsec.c b/vnet/vnet/ipsec/ipsec.c index 42b8f29d..bf9dd973 100644 --- a/vnet/vnet/ipsec/ipsec.c +++ b/vnet/vnet/ipsec/ipsec.c @@ -265,7 +265,7 @@ ipsec_add_del_policy (vlib_main_t * vm, ipsec_policy_t * policy, int is_add) u32 i, j; /* *INDENT-OFF* */ pool_foreach_index(i, spd->policies, ({ - vp = pool_elt_at_index(spd->policies, i); + vp = pool_elt_at_index(spd->policies, i); if (vp->priority != policy->priority) continue; if (vp->is_outbound != policy->is_outbound) @@ -352,7 +352,7 @@ ipsec_add_del_policy (vlib_main_t * vm, ipsec_policy_t * policy, int is_add) vec_del1 (spd->ipv4_outbound_policies, j); break; } - } + } } else { diff --git a/vnet/vnet/l2tp/l2tp.c b/vnet/vnet/l2tp/l2tp.c index 3439c60c..99443ce4 100644 --- a/vnet/vnet/l2tp/l2tp.c +++ b/vnet/vnet/l2tp/l2tp.c @@ -130,7 +130,7 @@ show_l2tp_command_fn (vlib_main_t * vm, vlib_cli_output (vm, "L2tp session lookup on %s", keystr); /* *INDENT-OFF* */ - pool_foreach (session, lm->sessions, + pool_foreach (session, lm->sessions, ({ vlib_cli_output (vm, "%U", format_l2t_session, session); })); @@ -160,22 +160,22 @@ test_counters_command_fn (vlib_main_t * vm, u32 cpu_index = os_get_cpu_number (); /* *INDENT-OFF* */ - pool_foreach (session, lm->sessions, + pool_foreach (session, lm->sessions, ({ session_index = session - lm->sessions; - counter_index = - session_index_to_counter_index (session_index, + counter_index = + session_index_to_counter_index (session_index, SESSION_COUNTER_USER_TO_NETWORK); vlib_increment_combined_counter (&lm->counter_main, - cpu_index, - counter_index, + cpu_index, + counter_index, 1/*pkt*/, 1111 /*bytes*/); vlib_increment_combined_counter (&lm->counter_main, - cpu_index, - counter_index+1, + cpu_index, + counter_index+1, 1/*pkt*/, 2222 /*bytes*/); nincr++; - + })); /* *INDENT-ON* */ vlib_cli_output (vm, "Incremented %d active counters\n", nincr); @@ -202,11 +202,11 @@ clear_counters_command_fn (vlib_main_t * vm, u32 nincr = 0; /* *INDENT-OFF* */ - pool_foreach (session, lm->sessions, + pool_foreach (session, lm->sessions, ({ session_index = session - lm->sessions; - counter_index = - session_index_to_counter_index (session_index, + counter_index = + session_index_to_counter_index (session_index, SESSION_COUNTER_USER_TO_NETWORK); vlib_zero_combined_counter (&lm->counter_main, counter_index); vlib_zero_combined_counter (&lm->counter_main, counter_index+1); @@ -518,10 +518,10 @@ create_l2tpv3_tunnel_command_fn (vlib_main_t * vm, } /* *INDENT-OFF* */ -VLIB_CLI_COMMAND (create_l2tpv3_tunnel_command, static) = +VLIB_CLI_COMMAND (create_l2tpv3_tunnel_command, static) = { .path = "create l2tpv3 tunnel", - .short_help = + .short_help = "create l2tpv3 tunnel client <ip6> our <ip6> local-cookie <hex> remote-cookie <hex> local-session <dec> remote-session <dec>", .function = create_l2tpv3_tunnel_command_fn, }; @@ -601,10 +601,10 @@ set_l2tp_tunnel_cookie_command_fn (vlib_main_t * vm, } /* *INDENT-OFF* */ -VLIB_CLI_COMMAND (set_l2tp_tunnel_cookie_command, static) = +VLIB_CLI_COMMAND (set_l2tp_tunnel_cookie_command, static) = { .path = "set l2tpv3 tunnel cookie", - .short_help = + .short_help = "set l2tpv3 tunnel cookie <intfc> local <hex> remote <hex>", .function = set_l2tp_tunnel_cookie_command_fn, }; @@ -679,7 +679,7 @@ set_ip6_l2tpv3 (vlib_main_t * vm, } /* *INDENT-OFF* */ -VLIB_CLI_COMMAND (set_interface_ip6_l2tpv3, static) = +VLIB_CLI_COMMAND (set_interface_ip6_l2tpv3, static) = { .path = "set interface ip6 l2tpv3", .function = set_ip6_l2tpv3, diff --git a/vnet/vnet/l2tp/packet.h b/vnet/vnet/l2tp/packet.h index 0bb2f23c..66dfea21 100644 --- a/vnet/vnet/l2tp/packet.h +++ b/vnet/vnet/l2tp/packet.h @@ -18,7 +18,7 @@ #ifndef __included_l2tp_packet_h__ #define __included_l2tp_packet_h__ -/* +/* * See RFC4719 for packet format. * Note: the l2_specific_sublayer is present in current Linux l2tpv3 * tunnels. It is not present in IOS XR l2tpv3 tunnels. @@ -27,8 +27,8 @@ /* *INDENT-OFF* */ typedef CLIB_PACKED (struct { - u32 session_id; - u64 cookie; u32 + u32 session_id; + u64 cookie; u32 l2_specific_sublayer; /* set to 0 (if present) */ }) l2tpv3_header_t; /* *INDENT-ON* */ diff --git a/vnet/vnet/map/ip4_map.c b/vnet/vnet/map/ip4_map.c index b2795ace..9fd10f62 100644 --- a/vnet/vnet/map/ip4_map.c +++ b/vnet/vnet/map/ip4_map.c @@ -765,7 +765,7 @@ VLIB_REGISTER_NODE(ip4_map_node) = { .vector_size = sizeof(u32), .format_trace = format_map_trace, .type = VLIB_NODE_TYPE_INTERNAL, - + .n_errors = MAP_N_ERROR, .error_strings = map_error_strings, @@ -791,7 +791,7 @@ VLIB_REGISTER_NODE(ip4_map_reass_node) = { .vector_size = sizeof(u32), .format_trace = format_ip4_map_reass_trace, .type = VLIB_NODE_TYPE_INTERNAL, - + .n_errors = MAP_N_ERROR, .error_strings = map_error_strings, diff --git a/vnet/vnet/map/ip6_map.c b/vnet/vnet/map/ip6_map.c index 44f0e5dd..2e38b0db 100644 --- a/vnet/vnet/map/ip6_map.c +++ b/vnet/vnet/map/ip6_map.c @@ -1062,7 +1062,7 @@ ip6_map_icmp_relay (vlib_main_t * vm, /* * In: * IPv6 header (40) - * ICMPv6 header (8) + * ICMPv6 header (8) * IPv6 header (40) * Original IPv4 header / packet * Out: diff --git a/vnet/vnet/map/map.c b/vnet/vnet/map/map.c index fdd56ee4..0108c7b0 100644 --- a/vnet/vnet/map/map.c +++ b/vnet/vnet/map/map.c @@ -30,7 +30,7 @@ crc_u32 (u32 data, u32 value) /* * This code supports the following MAP modes: - * + * * Algorithmic Shared IPv4 address (ea_bits_len > 0): * ea_bits_len + ip4_prefix > 32 * psid_length > 0, ip6_prefix < 64, ip4_prefix <= 32 @@ -1851,7 +1851,7 @@ VLIB_CLI_COMMAND(map_ip4_reass_lifetime_command, static) = { /* *INDENT-OFF* */ VLIB_CLI_COMMAND(map_traffic_class_command, static) = { .path = "map params traffic-class", - .short_help = + .short_help = "traffic-class {0x0-0xff | copy}", .function = map_traffic_class_command_fn, }; @@ -1860,7 +1860,7 @@ VLIB_CLI_COMMAND(map_traffic_class_command, static) = { /* *INDENT-OFF* */ VLIB_CLI_COMMAND(map_pre_resolve_command, static) = { .path = "map params pre-resolve", - .short_help = + .short_help = "pre-resolve {ip4-nh <address>} | {ip6-nh <address>}", .function = map_pre_resolve_command_fn, }; @@ -1869,7 +1869,7 @@ VLIB_CLI_COMMAND(map_pre_resolve_command, static) = { /* *INDENT-OFF* */ VLIB_CLI_COMMAND(map_security_check_command, static) = { .path = "map params security-check", - .short_help = + .short_help = "security-check on|off", .function = map_security_check_command_fn, }; @@ -1910,7 +1910,7 @@ VLIB_CLI_COMMAND(map_fragment_df_command, static) = { /* *INDENT-OFF* */ VLIB_CLI_COMMAND(map_security_check_frag_command, static) = { .path = "map params security-check fragments", - .short_help = + .short_help = "fragments on|off", .function = map_security_check_frag_command_fn, }; @@ -1919,7 +1919,7 @@ VLIB_CLI_COMMAND(map_security_check_frag_command, static) = { /* *INDENT-OFF* */ VLIB_CLI_COMMAND(map_add_domain_command, static) = { .path = "map add domain", - .short_help = + .short_help = "map add domain ip4-pfx <ip4-pfx> ip6-pfx <ip6-pfx> ip6-src <ip6-pfx> " "ea-bits-len <n> psid-offset <n> psid-len <n> [map-t] [mtu <mtu>]", .function = map_add_domain_command_fn, @@ -1929,7 +1929,7 @@ VLIB_CLI_COMMAND(map_add_domain_command, static) = { /* *INDENT-OFF* */ VLIB_CLI_COMMAND(map_add_rule_command, static) = { .path = "map add rule", - .short_help = + .short_help = "map add rule index <domain> psid <psid> ip6-dst <ip6-addr>", .function = map_add_rule_command_fn, }; @@ -1938,7 +1938,7 @@ VLIB_CLI_COMMAND(map_add_rule_command, static) = { /* *INDENT-OFF* */ VLIB_CLI_COMMAND(map_del_command, static) = { .path = "map del domain", - .short_help = + .short_help = "map del domain index <domain>", .function = map_del_domain_command_fn, }; diff --git a/vnet/vnet/sr/sr.c b/vnet/vnet/sr/sr.c index 484099d5..0ae462ac 100644 --- a/vnet/vnet/sr/sr.c +++ b/vnet/vnet/sr/sr.c @@ -154,7 +154,7 @@ format_ip6_sr_header (u8 * s, va_list * args) s = format (s, "\n flags %U", format_ip6_sr_header_flags, flags_host_byte_order, 0 /* bswap needed */ ); - /* + /* * Header length is in 8-byte units (minus one), so * divide by 2 to ascertain the number of ip6 addresses in the * segment list @@ -347,7 +347,7 @@ sr_rewrite (vlib_main_t * vm, b0 = vlib_get_buffer (vm, bi0); b1 = vlib_get_buffer (vm, bi1); - /* + /* * $$$ parse through header(s) to pick the point * where we punch in the SR extention header */ @@ -372,10 +372,10 @@ sr_rewrite (vlib_main_t * vm, ip0 = vlib_buffer_get_current (b0); ip1 = vlib_buffer_get_current (b1); - /* + /* * SR-unaware service chaining case: pkt coming back from * service has the original dst address, and will already - * have an SR header. If so, send it to sr-local + * have an SR header. If so, send it to sr-local */ if (PREDICT_FALSE (ip0->protocol == IPPROTO_IPV6_ROUTE)) { @@ -386,9 +386,9 @@ sr_rewrite (vlib_main_t * vm, } else { - /* - * Copy data before the punch-in point left by the - * required amount. Assume (for the moment) that only + /* + * Copy data before the punch-in point left by the + * required amount. Assume (for the moment) that only * the main packet header needs to be copied. */ clib_memcpy (((u8 *) ip0) - vec_len (t0->rewrite), @@ -418,7 +418,7 @@ sr_rewrite (vlib_main_t * vm, next0 = sr_local_cb ? sr_local_cb (vm, node, b0, ip0, sr0) : next0; - /* + /* * Ignore "do not rewrite" shtik in this path */ if (PREDICT_FALSE (next0 & 0x80000000)) @@ -463,7 +463,7 @@ sr_rewrite (vlib_main_t * vm, next1 = sr_local_cb ? sr_local_cb (vm, node, b1, ip1, sr1) : next1; - /* + /* * Ignore "do not rewrite" shtik in this path */ if (PREDICT_FALSE (next1 & 0x80000000)) @@ -526,7 +526,7 @@ sr_rewrite (vlib_main_t * vm, b0 = vlib_get_buffer (vm, bi0); - /* + /* * $$$ parse through header(s) to pick the point * where we punch in the SR extention header */ @@ -553,10 +553,10 @@ sr_rewrite (vlib_main_t * vm, ip0 = vlib_buffer_get_current (b0); - /* + /* * SR-unaware service chaining case: pkt coming back from * service has the original dst address, and will already - * have an SR header. If so, send it to sr-local + * have an SR header. If so, send it to sr-local */ if (PREDICT_FALSE (ip0->protocol == IPPROTO_IPV6_ROUTE)) { @@ -567,9 +567,9 @@ sr_rewrite (vlib_main_t * vm, } else { - /* - * Copy data before the punch-in point left by the - * required amount. Assume (for the moment) that only + /* + * Copy data before the punch-in point left by the + * required amount. Assume (for the moment) that only * the main packet header needs to be copied. */ clib_memcpy (((u8 *) ip0) - vec_len (t0->rewrite), @@ -599,7 +599,7 @@ sr_rewrite (vlib_main_t * vm, next0 = sr_local_cb ? sr_local_cb (vm, node, b0, ip0, sr0) : next0; - /* + /* * Ignore "do not rewrite" shtik in this path */ if (PREDICT_FALSE (next0 & 0x80000000)) @@ -903,7 +903,7 @@ ip6_sr_add_del_tunnel (ip6_sr_add_del_tunnel_args_t * a) /* The first specified hop goes right into the dst address */ clib_memcpy (&t->first_hop, &a->segments[0], sizeof (ip6_address_t)); - /* + /* * Create the sr header rewrite string * The list of segments needs an extra slot for the ultimate destination * which is taken from the packet we add the SRH to. @@ -986,14 +986,14 @@ ip6_sr_add_del_tunnel (ip6_sr_add_del_tunnel_args_t * a) ap = ip_add_adjacency (lm, &adj, 1 /* one adj */ , &adj_index); - /* + /* * Stick the tunnel index into the rewrite header. - * + * * Unfortunately, inserting an SR header according to the various * RFC's requires parsing through the ip6 header, perhaps consing a * buffer onto the head of the vlib_buffer_t, etc. We don't use the * normal reverse bcopy rewrite code. - * + * * We don't handle ugly RFC-related cases yet, but I'm sure PL will complain * at some point... */ @@ -1208,7 +1208,7 @@ sr_add_del_tunnel_command_fn (vlib_main_t * vm, /* *INDENT-OFF* */ VLIB_CLI_COMMAND (sr_tunnel_command, static) = { .path = "sr tunnel", - .short_help = + .short_help = "sr tunnel [del] [name <name>] src <addr> dst <addr> [next <addr>] " "[clean] [reroute] [key <secret>] [policy <policy_name>]" "[rx-fib-id <fib_id>] [tx-fib-id <fib_id>]", @@ -1281,7 +1281,7 @@ show_sr_tunnel_fn (vlib_main_t * vm, if (!p) /* Either name parm not passed or no tunnel with that name found, show all */ { /* *INDENT-OFF* */ - pool_foreach (t, sm->tunnels, + pool_foreach (t, sm->tunnels, ({ vec_add1 (tunnels, t); })); @@ -1371,7 +1371,7 @@ ip6_sr_add_del_policy (ip6_sr_add_del_policy_args_t * a) policy - sm->policies); /* Yes, this could be construed as overkill but the last thing you should do is set - the policy_index on the tunnel after everything is set in ip6_sr_main_t. + the policy_index on the tunnel after everything is set in ip6_sr_main_t. If this is deemed overly cautious, could set this in the vec_len(tunnel_names) loop. */ for (i = 0; i < vec_len (policy->tunnel_indices); i++) @@ -1460,7 +1460,7 @@ sr_add_del_policy_command_fn (vlib_main_t * vm, /* *INDENT-OFF* */ VLIB_CLI_COMMAND (sr_policy_command, static) = { .path = "sr policy", - .short_help = + .short_help = "sr policy [del] name <policy-name> tunnel <sr-tunnel-name> [tunnel <sr-tunnel-name>]*", .function = sr_add_del_policy_command_fn, }; @@ -1497,7 +1497,7 @@ show_sr_policy_fn (vlib_main_t * vm, if (!p) /* Either name parm not passed or no policy with that name found, show all */ { /* *INDENT-OFF* */ - pool_foreach (policy, sm->policies, + pool_foreach (policy, sm->policies, ({ vec_add1 (policies, policy); })); @@ -1568,7 +1568,7 @@ ip6_sr_add_del_multicastmap (ip6_sr_add_del_multicastmap_args_t * a) pt = pool_elt_at_index (sm->policies, p[0]); - /* + /* Get the first tunnel associated with policy populate the fib adjacency. From there, since this tunnel will have it's policy_index != ~0 it will be the trigger in the dual_loop to pull up the policy and make a copy-rewrite @@ -1587,14 +1587,14 @@ ip6_sr_add_del_multicastmap (ip6_sr_add_del_multicastmap_args_t * a) ap = ip_add_adjacency (lm, &adj, 1 /* one adj */ , &adj_index); - /* + /* * Stick the tunnel index into the rewrite header. - * + * * Unfortunately, inserting an SR header according to the various * RFC's requires parsing through the ip6 header, perhaps consing a * buffer onto the head of the vlib_buffer_t, etc. We don't use the * normal reverse bcopy rewrite code. - * + * * We don't handle ugly RFC-related cases yet, but I'm sure PL will complain * at some point... */ @@ -1710,7 +1710,7 @@ sr_add_del_multicast_map_command_fn (vlib_main_t * vm, /* *INDENT-OFF* */ VLIB_CLI_COMMAND (sr_multicast_map_command, static) = { .path = "sr multicast-map", - .short_help = + .short_help = "sr multicast-map address <multicast-ip6-address> sr-policy <sr-policy-name> [del]", .function = sr_add_del_multicast_map_command_fn, }; @@ -1733,21 +1733,21 @@ show_sr_multicast_map_fn (vlib_main_t * vm, ({ if (!key) vlib_cli_output (vm, "no multicast maps configured"); - else + else { multicast_address = *((ip6_address_t *)key); pt = pool_elt_at_index (sm->policies, value); if (pt) { - vlib_cli_output (vm, "address: %U policy: %s", + vlib_cli_output (vm, "address: %U policy: %s", format_ip6_address, &multicast_address, pt->name); } else - vlib_cli_output (vm, "BUG: policy not found for address: %U with policy index %d", + vlib_cli_output (vm, "BUG: policy not found for address: %U with policy index %d", format_ip6_address, &multicast_address, value); - + } })); @@ -1925,7 +1925,7 @@ sr_fix_dst_addr (vlib_main_t * vm, } else { - /* + /* * We get here from sr_rewrite or sr_local, with * sr->segments_left pointing at the (copy of the original) dst * address. Use it, then increment sr0->segments_left. @@ -1938,9 +1938,9 @@ sr_fix_dst_addr (vlib_main_t * vm, goto do_trace0; } - /* - * Rewrite the packet with the original dst address - * We assume that the last segment (in processing order) contains + /* + * Rewrite the packet with the original dst address + * We assume that the last segment (in processing order) contains * the original dst address. The list is reversed, so sr0->segments * contains the original dst address. */ @@ -2301,8 +2301,8 @@ sr_local (vlib_main_t * vm, next0 = sr_local_cb ? sr_local_cb (vm, node, b0, ip0, sr0) : next0; - /* - * To suppress rewrite, return ~SR_LOCAL_NEXT_xxx + /* + * To suppress rewrite, return ~SR_LOCAL_NEXT_xxx */ if (PREDICT_FALSE (next0 & 0x80000000)) { @@ -2333,7 +2333,7 @@ sr_local (vlib_main_t * vm, { u64 *copy_dst0, *copy_src0; u16 new_l0; - /* + /* * Copy the ip6 header right by the (real) length of the * sr header. Here's another place which assumes that * the sr header is the only extention header. @@ -2406,8 +2406,8 @@ sr_local (vlib_main_t * vm, next1 = sr_local_cb ? sr_local_cb (vm, node, b1, ip1, sr1) : next1; - /* - * To suppress rewrite, return ~SR_LOCAL_NEXT_xxx + /* + * To suppress rewrite, return ~SR_LOCAL_NEXT_xxx */ if (PREDICT_FALSE (next1 & 0x80000000)) { @@ -2438,7 +2438,7 @@ sr_local (vlib_main_t * vm, { u64 *copy_dst1, *copy_src1; u16 new_l1; - /* + /* * Copy the ip6 header right by the (real) length of the * sr header. Here's another place which assumes that * the sr header is the only extention header. @@ -2532,8 +2532,8 @@ sr_local (vlib_main_t * vm, next0 = sr_local_cb ? sr_local_cb (vm, node, b0, ip0, sr0) : next0; - /* - * To suppress rewrite, return ~SR_LOCAL_NEXT_xxx + /* + * To suppress rewrite, return ~SR_LOCAL_NEXT_xxx */ if (PREDICT_FALSE (next0 & 0x80000000)) { @@ -2564,7 +2564,7 @@ sr_local (vlib_main_t * vm, { u64 *copy_dst0, *copy_src0; u16 new_l0; - /* + /* * Copy the ip6 header right by the (real) length of the * sr header. Here's another place which assumes that * the sr header is the only extention header. @@ -2864,7 +2864,7 @@ show_sr_hmac_fn (vlib_main_t * vm, /* *INDENT-OFF* */ VLIB_CLI_COMMAND (show_sr_hmac, static) = { .path = "show sr hmac", - .short_help = "show sr hmac", + .short_help = "show sr hmac", .function = show_sr_hmac_fn, }; /* *INDENT-ON* */ diff --git a/vnet/vnet/sr/sr.h b/vnet/vnet/sr/sr.h index 66135f74..1ac70bd8 100644 --- a/vnet/vnet/sr/sr.h +++ b/vnet/vnet/sr/sr.h @@ -83,7 +83,7 @@ typedef struct /* segment list, when inserting an ip6 SR header */ ip6_address_t *segments; - /* + /* * "Tag" list, aka segments inserted at the end of the list, * past last_seg */ diff --git a/vnet/vnet/sr/sr_packet.h b/vnet/vnet/sr/sr_packet.h index 5d8fee2f..fc0d5eec 100644 --- a/vnet/vnet/sr/sr_packet.h +++ b/vnet/vnet/sr/sr_packet.h @@ -174,7 +174,7 @@ typedef struct /* Protocol for next header. */ u8 protocol; /* - * Length of routing header in 8 octet units, + * Length of routing header in 8 octet units, * not including the first 8 octets */ u8 length; @@ -185,7 +185,7 @@ typedef struct /* Next segment in the segment list */ u8 segments_left; - /* + /* * Policy list pointer: offset in the SRH of the policy * list - in 16-octet units - not including the first 8 octets. */ |