Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
misc: Purge unused pg includes
[vpp.git]
/
src
/
plugins
/
ioam
/
ip6
/
ioam_cache_tunnel_select_node.c
diff --git
a/src/plugins/ioam/ip6/ioam_cache_tunnel_select_node.c
b/src/plugins/ioam/ip6/ioam_cache_tunnel_select_node.c
index
ca06607
..
633a9be
100644
(file)
--- a/
src/plugins/ioam/ip6/ioam_cache_tunnel_select_node.c
+++ b/
src/plugins/ioam/ip6/ioam_cache_tunnel_select_node.c
@@
-40,7
+40,6
@@
*/
#include <vlib/vlib.h>
#include <vnet/vnet.h>
*/
#include <vlib/vlib.h>
#include <vnet/vnet.h>
-#include <vnet/pg/pg.h>
#include <vppinfra/error.h>
#include <vnet/ip/ip.h>
#include <vnet/srv6/sr.h>
#include <vppinfra/error.h>
#include <vnet/ip/ip.h>
#include <vnet/srv6/sr.h>
@@
-275,8
+274,6
@@
format_ip6_reset_ts_hbh_trace (u8 * s, va_list * args)
return s;
}
return s;
}
-vlib_node_registration_t ip6_reset_ts_hbh_node;
-
#define foreach_ip6_reset_ts_hbh_error \
_(PROCESSED, "iOAM Syn/Ack Pkts processed") \
_(SAVED, "iOAM Syn Pkts state saved") \
#define foreach_ip6_reset_ts_hbh_error \
_(PROCESSED, "iOAM Syn/Ack Pkts processed") \
_(SAVED, "iOAM Syn Pkts state saved") \
@@
-309,9
+306,9
@@
typedef enum
} ip6_ioam_cache_ts_input_next_t;
} ip6_ioam_cache_ts_input_next_t;
-static uword
-
ip6_reset_ts_hbh_node_fn (vlib_main_t * vm
,
-
vlib_node_runtime_t * node,
vlib_frame_t * frame)
+VLIB_NODE_FN (ip6_reset_ts_hbh_node) (vlib_main_t * vm,
+
vlib_node_runtime_t * node
,
+
vlib_frame_t * frame)
{
ioam_cache_main_t *cm = &ioam_cache_main;
u32 n_left_from, *from, *to_next;
{
ioam_cache_main_t *cm = &ioam_cache_main;
u32 n_left_from, *from, *to_next;
@@
-415,7
+412,7
@@
ip6_reset_ts_hbh_node_fn (vlib_main_t * vm,
hbh0 = (ip6_hop_by_hop_header_t *) (ip0 + 1);
/* $$$ tune, rewrite_length is a multiple of 8 */
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);
e2e =
(ioam_e2e_cache_option_t *) ((u8 *) hbh0 +
cm->rewrite_pool_index_offset);
e2e =
(ioam_e2e_cache_option_t *) ((u8 *) hbh0 +
cm->rewrite_pool_index_offset);
@@
-424,7
+421,7
@@
ip6_reset_ts_hbh_node_fn (vlib_main_t * vm,
ioam_e2e_id_rewrite_handler ((ioam_e2e_id_option_t *)
((u8 *) e2e +
sizeof (ioam_e2e_cache_option_t)),
ioam_e2e_id_rewrite_handler ((ioam_e2e_id_option_t *)
((u8 *) e2e +
sizeof (ioam_e2e_cache_option_t)),
-
b0
);
+
&cm->sr_localsid_ts
);
/* Patch the protocol chain, insert the h-b-h (type 0) header */
hbh0->protocol = ip0->protocol;
ip0->protocol = 0;
/* Patch the protocol chain, insert the h-b-h (type 0) header */
hbh0->protocol = ip0->protocol;
ip0->protocol = 0;
@@
-475,7
+472,7
@@
ip6_reset_ts_hbh_node_fn (vlib_main_t * vm,
hbh1 = (ip6_hop_by_hop_header_t *) (ip1 + 1);
/* $$$ tune, rewrite_length is a multiple of 8 */
hbh1 = (ip6_hop_by_hop_header_t *) (ip1 + 1);
/* $$$ tune, rewrite_length is a multiple of 8 */
- clib_memcpy (hbh1, rewrite, rewrite_length);
+ clib_memcpy
_fast
(hbh1, rewrite, rewrite_length);
e2e =
(ioam_e2e_cache_option_t *) ((u8 *) hbh1 +
cm->rewrite_pool_index_offset);
e2e =
(ioam_e2e_cache_option_t *) ((u8 *) hbh1 +
cm->rewrite_pool_index_offset);
@@
-484,7
+481,7
@@
ip6_reset_ts_hbh_node_fn (vlib_main_t * vm,
ioam_e2e_id_rewrite_handler ((ioam_e2e_id_option_t *)
((u8 *) e2e +
sizeof (ioam_e2e_cache_option_t)),
ioam_e2e_id_rewrite_handler ((ioam_e2e_id_option_t *)
((u8 *) e2e +
sizeof (ioam_e2e_cache_option_t)),
-
b1
);
+
&cm->sr_localsid_ts
);
/* Patch the protocol chain, insert the h-b-h (type 0) header */
hbh1->protocol = ip1->protocol;
ip1->protocol = 0;
/* Patch the protocol chain, insert the h-b-h (type 0) header */
hbh1->protocol = ip1->protocol;
ip1->protocol = 0;
@@
-581,7
+578,7
@@
ip6_reset_ts_hbh_node_fn (vlib_main_t * vm,
hbh0 = (ip6_hop_by_hop_header_t *) (ip0 + 1);
/* $$$ tune, rewrite_length is a multiple of 8 */
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);
e2e =
(ioam_e2e_cache_option_t *) ((u8 *) hbh0 +
cm->rewrite_pool_index_offset);
e2e =
(ioam_e2e_cache_option_t *) ((u8 *) hbh0 +
cm->rewrite_pool_index_offset);
@@
-590,7
+587,7
@@
ip6_reset_ts_hbh_node_fn (vlib_main_t * vm,
ioam_e2e_id_rewrite_handler ((ioam_e2e_id_option_t *)
((u8 *) e2e +
sizeof (ioam_e2e_cache_option_t)),
ioam_e2e_id_rewrite_handler ((ioam_e2e_id_option_t *)
((u8 *) e2e +
sizeof (ioam_e2e_cache_option_t)),
-
b0
);
+
&cm->sr_localsid_ts
);
/* Patch the protocol chain, insert the h-b-h (type 0) header */
hbh0->protocol = ip0->protocol;
ip0->protocol = 0;
/* Patch the protocol chain, insert the h-b-h (type 0) header */
hbh0->protocol = ip0->protocol;
ip0->protocol = 0;
@@
-617,9
+614,9
@@
ip6_reset_ts_hbh_node_fn (vlib_main_t * vm,
vlib_put_next_frame (vm, node, next_index, n_left_to_next);
}
vlib_put_next_frame (vm, node, next_index, n_left_to_next);
}
- vlib_node_increment_counter (vm,
ip6_reset_ts_hbh_node.
index,
+ vlib_node_increment_counter (vm,
cm->ip6_reset_ts_hbh_node_
index,
IP6_RESET_TS_HBH_ERROR_PROCESSED, processed);
IP6_RESET_TS_HBH_ERROR_PROCESSED, processed);
- vlib_node_increment_counter (vm,
ip6_reset_ts_hbh_node.
index,
+ vlib_node_increment_counter (vm,
cm->ip6_reset_ts_hbh_node_
index,
IP6_RESET_TS_HBH_ERROR_SAVED, cache_ts_added);
return frame->n_vectors;
IP6_RESET_TS_HBH_ERROR_SAVED, cache_ts_added);
return frame->n_vectors;
@@
-628,7
+625,6
@@
ip6_reset_ts_hbh_node_fn (vlib_main_t * vm,
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (ip6_reset_ts_hbh_node) =
{
/* *INDENT-OFF* */
VLIB_REGISTER_NODE (ip6_reset_ts_hbh_node) =
{
- .function = ip6_reset_ts_hbh_node_fn,
.name = "ip6-add-syn-hop-by-hop",
.vector_size = sizeof (u32),
.format_trace = format_ip6_reset_ts_hbh_trace,
.name = "ip6-add-syn-hop-by-hop",
.vector_size = sizeof (u32),
.format_trace = format_ip6_reset_ts_hbh_trace,
@@
-645,10
+641,11
@@
VLIB_REGISTER_NODE (ip6_reset_ts_hbh_node) =
},
};
},
};
-VLIB_NODE_FUNCTION_MULTIARCH (ip6_reset_ts_hbh_node, ip6_reset_ts_hbh_node_fn)
/* *INDENT-ON* */
/* *INDENT-ON* */
+#ifndef CLIB_MARCH_VARIANT
vlib_node_registration_t ioam_cache_ts_timer_tick_node;
vlib_node_registration_t ioam_cache_ts_timer_tick_node;
+#endif /* CLIB_MARCH_VARIANT */
typedef struct
{
typedef struct
{
@@
-686,6
+683,7
@@
static char *ioam_cache_ts_timer_tick_error_strings[] = {
#undef _
};
#undef _
};
+#ifndef CLIB_MARCH_VARIANT
void
ioam_cache_ts_timer_node_enable (vlib_main_t * vm, u8 enable)
{
void
ioam_cache_ts_timer_node_enable (vlib_main_t * vm, u8 enable)
{
@@
-717,6
+715,7
@@
expired_cache_ts_timer_callback (u32 * expired_timers)
ioam_cache_ts_timer_tick_node.index,
IOAM_CACHE_TS_TIMER_TICK_ERROR_TIMER, count);
}
ioam_cache_ts_timer_tick_node.index,
IOAM_CACHE_TS_TIMER_TICK_ERROR_TIMER, count);
}
+#endif /* CLIB_MARCH_VARIANT */
static uword
ioam_cache_ts_timer_tick_node_fn (vlib_main_t * vm,
static uword
ioam_cache_ts_timer_tick_node_fn (vlib_main_t * vm,