summaryrefslogtreecommitdiffstats
path: root/src/vnet
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet')
-rw-r--r--src/vnet/bier/bier_test.c6
-rw-r--r--src/vnet/dpo/interface_rx_dpo.c11
-rw-r--r--src/vnet/ethernet/init.c1
-rw-r--r--src/vnet/fib/fib_test.c46
-rw-r--r--src/vnet/gre/gre.c22
-rw-r--r--src/vnet/hdlc/hdlc.c8
-rw-r--r--src/vnet/ip/ip4_mtrie.c6
-rw-r--r--src/vnet/ip/ip6_forward.c4
-rw-r--r--src/vnet/ip/ip6_hop_by_hop.c16
-rw-r--r--src/vnet/ipip/sixrd.c2
-rw-r--r--src/vnet/ipsec-gre/ipsec_gre.c7
-rw-r--r--src/vnet/ppp/ppp.c8
12 files changed, 42 insertions, 95 deletions
diff --git a/src/vnet/bier/bier_test.c b/src/vnet/bier/bier_test.c
index 204dafc3f0b..d4d1692643c 100644
--- a/src/vnet/bier/bier_test.c
+++ b/src/vnet/bier/bier_test.c
@@ -174,9 +174,9 @@ bier_test_validate_entry (index_t bei,
res = 0;
bier_entry_contribute_forwarding(bei, &dpo);
- BIER_TEST_I((DPO_LOAD_BALANCE == dpo.dpoi_type),
- "Entry links to %U",
- format_dpo_type, dpo.dpoi_type);
+ res = BIER_TEST_I((DPO_LOAD_BALANCE == dpo.dpoi_type),
+ "Entry links to %U",
+ format_dpo_type, dpo.dpoi_type);
if (!res)
{
diff --git a/src/vnet/dpo/interface_rx_dpo.c b/src/vnet/dpo/interface_rx_dpo.c
index b4680f18f2a..4a6832ade9e 100644
--- a/src/vnet/dpo/interface_rx_dpo.c
+++ b/src/vnet/dpo/interface_rx_dpo.c
@@ -244,7 +244,7 @@ interface_rx_dpo_inline (vlib_main_t * vm,
from = vlib_frame_vector_args (from_frame);
n_left_from = from_frame->n_vectors;
- next_index = node->cached_next_index;
+ next_index = INTERFACE_RX_DPO_INPUT;
while (n_left_from > 0)
{
@@ -305,11 +305,6 @@ interface_rx_dpo_inline (vlib_main_t * vm,
tr1 = vlib_add_trace (vm, node, b1, sizeof (*tr1));
tr1->sw_if_index = ido1->ido_sw_if_index;
}
-
- vlib_validate_buffer_enqueue_x2(vm, node, next_index, to_next,
- n_left_to_next, bi0, bi1,
- INTERFACE_RX_DPO_INPUT,
- INTERFACE_RX_DPO_INPUT);
}
while (n_left_from > 0 && n_left_to_next > 0)
@@ -349,10 +344,6 @@ interface_rx_dpo_inline (vlib_main_t * vm,
tr = vlib_add_trace (vm, node, b0, sizeof (*tr));
tr->sw_if_index = ido0->ido_sw_if_index;
}
-
- vlib_validate_buffer_enqueue_x1(vm, node, next_index, to_next,
- n_left_to_next, bi0,
- INTERFACE_RX_DPO_INPUT);
}
vlib_put_next_frame (vm, node, next_index, n_left_to_next);
}
diff --git a/src/vnet/ethernet/init.c b/src/vnet/ethernet/init.c
index 2d20adc9610..a4689593ad7 100644
--- a/src/vnet/ethernet/init.c
+++ b/src/vnet/ethernet/init.c
@@ -115,7 +115,6 @@ VLIB_INIT_FUNCTION (ethernet_init);
ethernet_main_t *
ethernet_get_main (vlib_main_t * vm)
{
- vlib_call_init_function (vm, ethernet_init);
return &ethernet_main;
}
diff --git a/src/vnet/fib/fib_test.c b/src/vnet/fib/fib_test.c
index 56e885ccdaf..e46f670269a 100644
--- a/src/vnet/fib/fib_test.c
+++ b/src/vnet/fib/fib_test.c
@@ -526,11 +526,11 @@ fib_test_validate_lb_v (const load_balance_t *lb,
}
break;
case FT_LB_ADJ:
- FIB_TEST_I(((DPO_ADJACENCY == dpo->dpoi_type) ||
- (DPO_ADJACENCY_INCOMPLETE == dpo->dpoi_type)),
- "bucket %d stacks on %U",
- bucket,
- format_dpo_type, dpo->dpoi_type);
+ res = FIB_TEST_I(((DPO_ADJACENCY == dpo->dpoi_type) ||
+ (DPO_ADJACENCY_INCOMPLETE == dpo->dpoi_type)),
+ "bucket %d stacks on %U",
+ bucket,
+ format_dpo_type, dpo->dpoi_type);
FIB_TEST_LB((exp->adj.adj == dpo->dpoi_index),
"bucket %d stacks on adj %d",
bucket,
@@ -540,7 +540,7 @@ fib_test_validate_lb_v (const load_balance_t *lb,
{
const mpls_disp_dpo_t *mdd;
- FIB_TEST_I((DPO_MPLS_DISPOSITION_PIPE == dpo->dpoi_type),
+ res = FIB_TEST_I((DPO_MPLS_DISPOSITION_PIPE == dpo->dpoi_type),
"bucket %d stacks on %U",
bucket,
format_dpo_type, dpo->dpoi_type);
@@ -549,11 +549,11 @@ fib_test_validate_lb_v (const load_balance_t *lb,
dpo = &mdd->mdd_dpo;
- FIB_TEST_I(((DPO_ADJACENCY == dpo->dpoi_type) ||
- (DPO_ADJACENCY_INCOMPLETE == dpo->dpoi_type)),
- "bucket %d stacks on %U",
- bucket,
- format_dpo_type, dpo->dpoi_type);
+ res = FIB_TEST_I(((DPO_ADJACENCY == dpo->dpoi_type) ||
+ (DPO_ADJACENCY_INCOMPLETE == dpo->dpoi_type)),
+ "bucket %d stacks on %U",
+ bucket,
+ format_dpo_type, dpo->dpoi_type);
FIB_TEST_LB((exp->adj.adj == dpo->dpoi_index),
"bucket %d stacks on adj %d",
bucket,
@@ -561,30 +561,30 @@ fib_test_validate_lb_v (const load_balance_t *lb,
break;
}
case FT_LB_INTF:
- FIB_TEST_I((DPO_INTERFACE_RX == dpo->dpoi_type),
- "bucket %d stacks on %U",
- bucket,
- format_dpo_type, dpo->dpoi_type);
+ res = FIB_TEST_I((DPO_INTERFACE_RX == dpo->dpoi_type),
+ "bucket %d stacks on %U",
+ bucket,
+ format_dpo_type, dpo->dpoi_type);
FIB_TEST_LB((exp->adj.adj == dpo->dpoi_index),
"bucket %d stacks on adj %d",
bucket,
exp->adj.adj);
break;
case FT_LB_L2:
- FIB_TEST_I((DPO_DVR == dpo->dpoi_type),
- "bucket %d stacks on %U",
- bucket,
- format_dpo_type, dpo->dpoi_type);
+ res = FIB_TEST_I((DPO_DVR == dpo->dpoi_type),
+ "bucket %d stacks on %U",
+ bucket,
+ format_dpo_type, dpo->dpoi_type);
FIB_TEST_LB((exp->adj.adj == dpo->dpoi_index),
"bucket %d stacks on adj %d",
bucket,
exp->adj.adj);
break;
case FT_LB_O_LB:
- FIB_TEST_I((DPO_LOAD_BALANCE == dpo->dpoi_type),
- "bucket %d stacks on %U",
- bucket,
- format_dpo_type, dpo->dpoi_type);
+ res = FIB_TEST_I((DPO_LOAD_BALANCE == dpo->dpoi_type),
+ "bucket %d stacks on %U",
+ bucket,
+ format_dpo_type, dpo->dpoi_type);
FIB_TEST_LB((exp->lb.lb == dpo->dpoi_index),
"bucket %d stacks on lb %d not %d",
bucket,
diff --git a/src/vnet/gre/gre.c b/src/vnet/gre/gre.c
index 2918f3541fd..0b8d2cc8df7 100644
--- a/src/vnet/gre/gre.c
+++ b/src/vnet/gre/gre.c
@@ -320,13 +320,10 @@ gre_update_adj (vnet_main_t * vnm, u32 sw_if_index, adj_index_t ai)
typedef enum
{
- GRE_ENCAP_NEXT_DROP,
GRE_ENCAP_NEXT_L2_MIDCHAIN,
GRE_ENCAP_N_NEXT,
} gre_encap_next_t;
-#define NEXT_IDX (GRE_ENCAP_NEXT_L2_MIDCHAIN)
-
/**
* @brief TX function. Only called for L2 payload including TEB or ERSPAN.
* L3 traffic uses the adj-midchains.
@@ -353,7 +350,7 @@ gre_interface_tx (vlib_main_t * vm,
n_left_from = frame->n_vectors;
/* Speculatively send the first buffer to the last disposition we used */
- next_index = node->cached_next_index;
+ next_index = GRE_ENCAP_NEXT_L2_MIDCHAIN;
while (n_left_from > 0)
{
@@ -447,10 +444,6 @@ gre_interface_tx (vlib_main_t * vm,
tr1->dst = gt1->tunnel_dst.fp_addr;
tr1->length = vlib_buffer_length_in_chain (vm, b1);
}
-
- vlib_validate_buffer_enqueue_x2 (vm, node, next_index,
- to_next, n_left_to_next,
- bi0, bi1, NEXT_IDX, NEXT_IDX);
}
while (n_left_from > 0 && n_left_to_next > 0)
@@ -497,10 +490,6 @@ gre_interface_tx (vlib_main_t * vm,
tr->dst = gt0->tunnel_dst.fp_addr;
tr->length = vlib_buffer_length_in_chain (vm, b0);
}
-
- vlib_validate_buffer_enqueue_x1 (vm, node, next_index,
- to_next, n_left_to_next,
- bi0, NEXT_IDX);
}
vlib_put_next_frame (vm, node, next_index, n_left_to_next);
@@ -530,7 +519,6 @@ VLIB_REGISTER_NODE (gre_encap_node) =
.error_strings = gre_error_strings,
.n_next_nodes = GRE_ENCAP_N_NEXT,
.next_nodes = {
- [GRE_ENCAP_NEXT_DROP] = "error-drop",
[GRE_ENCAP_NEXT_L2_MIDCHAIN] = "adj-l2-midchain",
},
};
@@ -644,14 +632,6 @@ gre_init (vlib_main_t * vm)
VLIB_INIT_FUNCTION (gre_init);
-gre_main_t *
-gre_get_main (vlib_main_t * vm)
-{
- vlib_call_init_function (vm, gre_init);
- return &gre_main;
-}
-
-
/*
* fd.io coding-style-patch-verification: ON
*
diff --git a/src/vnet/hdlc/hdlc.c b/src/vnet/hdlc/hdlc.c
index e072bd46c95..5f7609d24a6 100644
--- a/src/vnet/hdlc/hdlc.c
+++ b/src/vnet/hdlc/hdlc.c
@@ -243,14 +243,6 @@ hdlc_init (vlib_main_t * vm)
VLIB_INIT_FUNCTION (hdlc_init);
-hdlc_main_t *
-hdlc_get_main (vlib_main_t * vm)
-{
- vlib_call_init_function (vm, hdlc_init);
- return &hdlc_main;
-}
-
-
/*
* fd.io coding-style-patch-verification: ON
*
diff --git a/src/vnet/ip/ip4_mtrie.c b/src/vnet/ip/ip4_mtrie.c
index 5981a3c9e20..5aa9b926483 100644
--- a/src/vnet/ip/ip4_mtrie.c
+++ b/src/vnet/ip/ip4_mtrie.c
@@ -755,8 +755,8 @@ format_ip4_fib_mtrie_ply (u8 * s, va_list * va)
{
if (ip4_fib_mtrie_leaf_is_non_empty (p, i))
{
- FORMAT_PLY (s, p, i, base_address,
- p->dst_address_bits_base + 8, indent);
+ s = FORMAT_PLY (s, p, i, base_address,
+ p->dst_address_bits_base + 8, indent);
}
}
@@ -791,7 +791,7 @@ format_ip4_fib_mtrie (u8 * s, va_list * va)
if (p->dst_address_bits_of_leaves[slot] > 0)
{
- FORMAT_PLY (s, p, slot, base_address, 16, 2);
+ s = FORMAT_PLY (s, p, slot, base_address, 16, 2);
}
}
}
diff --git a/src/vnet/ip/ip6_forward.c b/src/vnet/ip/ip6_forward.c
index 88b21d59019..588cd0675a4 100644
--- a/src/vnet/ip/ip6_forward.c
+++ b/src/vnet/ip/ip6_forward.c
@@ -2699,7 +2699,7 @@ ip6_hbh_register_option (u8 option,
ip6_main_t *im = &ip6_main;
ip6_hop_by_hop_main_t *hm = &ip6_hop_by_hop_main;
- ASSERT (option < ARRAY_LEN (hm->options));
+ ASSERT ((u32) option < ARRAY_LEN (hm->options));
/* Already registered */
if (hm->options[option])
@@ -2720,7 +2720,7 @@ ip6_hbh_unregister_option (u8 option)
ip6_main_t *im = &ip6_main;
ip6_hop_by_hop_main_t *hm = &ip6_hop_by_hop_main;
- ASSERT (option < ARRAY_LEN (hm->options));
+ ASSERT ((u32) option < ARRAY_LEN (hm->options));
/* Not registered */
if (!hm->options[option])
diff --git a/src/vnet/ip/ip6_hop_by_hop.c b/src/vnet/ip/ip6_hop_by_hop.c
index 90a4d21d3a6..355aba627fb 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])
@@ -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])
diff --git a/src/vnet/ipip/sixrd.c b/src/vnet/ipip/sixrd.c
index 08fd604709a..cfdd0f87e3a 100644
--- a/src/vnet/ipip/sixrd.c
+++ b/src/vnet/ipip/sixrd.c
@@ -501,7 +501,7 @@ sixrd_init (vlib_main_t * vm)
clib_error_t *error = 0;
/* Make sure the IPIP tunnel subsystem is initialised */
- vlib_call_init_function (vm, ipip_init);
+ error = vlib_call_init_function (vm, ipip_init);
sixrd_adj_delegate_type =
adj_delegate_register_new_type (&sixrd_adj_delegate_vft);
diff --git a/src/vnet/ipsec-gre/ipsec_gre.c b/src/vnet/ipsec-gre/ipsec_gre.c
index a0b065ac283..a699a2b5fd8 100644
--- a/src/vnet/ipsec-gre/ipsec_gre.c
+++ b/src/vnet/ipsec-gre/ipsec_gre.c
@@ -391,13 +391,6 @@ ipsec_gre_init (vlib_main_t * vm)
VLIB_INIT_FUNCTION (ipsec_gre_init);
-ipsec_gre_main_t *
-ipsec_gre_get_main (vlib_main_t * vm)
-{
- vlib_call_init_function (vm, ipsec_gre_init);
- return &ipsec_gre_main;
-}
-
/*
* fd.io coding-style-patch-verification: ON
*
diff --git a/src/vnet/ppp/ppp.c b/src/vnet/ppp/ppp.c
index e1b5fc742b4..2b3b3b23b5f 100644
--- a/src/vnet/ppp/ppp.c
+++ b/src/vnet/ppp/ppp.c
@@ -244,14 +244,6 @@ ppp_init (vlib_main_t * vm)
VLIB_INIT_FUNCTION (ppp_init);
-ppp_main_t *
-ppp_get_main (vlib_main_t * vm)
-{
- vlib_call_init_function (vm, ppp_init);
- return &ppp_main;
-}
-
-
/*
* fd.io coding-style-patch-verification: ON
*