Coding standards cleanup - remove trailing whitespace, fixes VPP-332

Change-Id: I649a17f8fa47599faf438b2e596f53761790d10c
Signed-off-by: Damjan Marion <damarion@cisco.com>
This commit is contained in:
Damjan Marion
2016-08-16 22:53:54 +02:00
committed by Dave Barach
parent 256656735c
commit 607de1a063
24 changed files with 175 additions and 171 deletions

View File

@ -32,10 +32,14 @@ for i in `git ls-tree -r HEAD --name-only`;do
if [ ${FIX} == 0 ]; then
indent ${i} -o ${i}.out1 > /dev/null 2>&1
indent ${i}.out1 -o ${i}.out2 > /dev/null 2>&1
# Remove trailing whitespace
sed -i -e 's/[[:space:]]*$//' ${i}.out2
diff -q ${i} ${i}.out2
else
indent ${i}
indent ${i}
# Remove trailing whitespace
sed -i -e 's/[[:space:]]*$//' ${i}
fi
if [ $? != 0 ]; then
EXIT_CODE=1

View File

@ -674,7 +674,7 @@ vlib_process_wait_for_event_with_type (vlib_main_t * vm,
/** Suspend a cooperative multi-tasking thread
Waits for an event, or for the indicated number of seconds to elapse
@param vm - vlib_main_t pointer
@param dt - timeout, in seconds.
@param dt - timeout, in seconds.
@returns the remaining time interval
*/

View File

@ -61,7 +61,7 @@
#define EXAMPLE_POLL_PERIOD 10.0
static uword
example_process (vlib_main_t * vm, vlib_node_runtime_t * rt,
example_process (vlib_main_t * vm, vlib_node_runtime_t * rt,
vlib_frame_t * f)
{
f64 poll_time_remaining;
@ -72,8 +72,8 @@
{
int i;
// Sleep until next periodic call due,
// or until we receive event(s)
// Sleep until next periodic call due,
// or until we receive event(s)
//
poll_time_remaining =
vlib_process_wait_for_event_or_clock (vm, poll_time_remaining);
@ -94,26 +94,26 @@
handle_event2 (vm, event_data[i]);
break;
// ... and so forth for each event type
// ... and so forth for each event type
default:
// This should never happen...
clib_warning ("BUG: unhandled event type %d",
// This should never happen...
clib_warning ("BUG: unhandled event type %d",
event_type);
break;
}
vec_reset_length (event_data);
// Timer expired, call periodic function
// Timer expired, call periodic function
if (vlib_process_suspend_time_is_zero (poll_time_remaining))
{
example_periodic (vm);
poll_time_remaining = EXAMPLE_POLL_PERIOD;
}
}
// NOTREACHED
// NOTREACHED
return 0;
}
}
static VLIB_REGISTER_NODE (example_node) = {
.function = example_process,

View File

@ -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);
}));

View File

@ -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) = {

View File

@ -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);
}));

View File

@ -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
*/

View File

@ -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,

View File

@ -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;

View File

@ -66,7 +66,7 @@ ethernet_init (vlib_main_t * vm)
ethernet_main_t *em = &ethernet_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.
*/

View File

@ -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)

View File

@ -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,

View File

@ -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);

View File

@ -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));

View File

@ -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
{

View File

@ -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,

View File

@ -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* */

View File

@ -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,

View File

@ -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:

View File

@ -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,
};

File diff suppressed because it is too large Load Diff

View File

@ -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
*/

View File

@ -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.
*/

View File

@ -1545,7 +1545,7 @@ mheap_get_trace (void *v, uword offset, uword size)
hash_pair_t *p;
mheap_trace_t *q;
/* *INDENT-OFF* */
hash_foreach_pair (p, tm->trace_by_callers,
hash_foreach_pair (p, tm->trace_by_callers,
({
q = uword_to_pointer (p->key, mheap_trace_t *);
ASSERT (q >= old_start && q < old_end);