summaryrefslogtreecommitdiffstats
path: root/vnet/vnet/ip
diff options
context:
space:
mode:
Diffstat (limited to 'vnet/vnet/ip')
-rw-r--r--vnet/vnet/ip/feature_registration.c6
-rw-r--r--vnet/vnet/ip/feature_registration.h7
-rw-r--r--vnet/vnet/ip/ip.h2
-rw-r--r--vnet/vnet/ip/ip4_forward.c8
-rw-r--r--vnet/vnet/ip/ip4_input.c6
-rw-r--r--vnet/vnet/ip/ip4_source_and_port_range_check.c10
-rw-r--r--vnet/vnet/ip/ip4_source_check.c4
-rw-r--r--vnet/vnet/ip/ip6_forward.c8
-rw-r--r--vnet/vnet/ip/ip6_input.c4
-rw-r--r--vnet/vnet/ip/ip_init.c2
-rw-r--r--vnet/vnet/ip/lookup.h2
11 files changed, 31 insertions, 28 deletions
diff --git a/vnet/vnet/ip/feature_registration.c b/vnet/vnet/ip/feature_registration.c
index 3964617b521..fd94bf1932c 100644
--- a/vnet/vnet/ip/feature_registration.c
+++ b/vnet/vnet/ip/feature_registration.c
@@ -62,7 +62,7 @@
<CODE><PRE>
ip4_main_t *im = \&ip4_main;
ip_lookup_main_t *lm = &im->lookup_main;
- ip_config_main_t *rx_cm =
+ vnet_feature_config_main_t *rx_cm =
&lm->feature_config_mains[VNET_IP_RX_UNICAST_FEAT];
sw_if_index = <interface-handle>
@@ -95,7 +95,7 @@
<CODE><PRE>
ip_lookup_main_t * lm = sm->ip4_lookup_main;
- ip_config_main_t * cm = &lm->feature_config_mains[VNET_IP_RX_UNICAST_FEAT];
+ vnet_feature_config_main_t * cm = &lm->feature_config_mains[VNET_IP_RX_UNICAST_FEAT];
Call @c vnet_get_config_data to set next0, and to advance
@c b0->current_config_index:
@@ -414,7 +414,7 @@ VLIB_CLI_COMMAND (show_ip_features_command, static) = {
void
ip_interface_features_show (vlib_main_t * vm,
const char *pname,
- ip_config_main_t * cm, u32 sw_if_index)
+ vnet_feature_config_main_t * cm, u32 sw_if_index)
{
u32 node_index, current_config_index;
vnet_cast_t cast;
diff --git a/vnet/vnet/ip/feature_registration.h b/vnet/vnet/ip/feature_registration.h
index ba7f97ce252..fcdd96b61bc 100644
--- a/vnet/vnet/ip/feature_registration.h
+++ b/vnet/vnet/ip/feature_registration.h
@@ -31,11 +31,11 @@ typedef struct _vnet_feature_registration
char **runs_after;
} vnet_feature_registration_t;
-typedef struct ip_config_main_t_
+typedef struct vnet_feature_config_main_t_
{
vnet_config_main_t config_main;
u32 *config_index_by_sw_if_index;
-} ip_config_main_t;
+} vnet_feature_config_main_t;
/** Syntactic sugar, the c-compiler won't initialize registrations without it */
#define ORDER_CONSTRAINTS (char*[])
@@ -49,7 +49,8 @@ clib_error_t *vnet_feature_arc_init (vlib_main_t * vm,
void ip_interface_features_show (vlib_main_t * vm,
const char *pname,
- ip_config_main_t * cm, u32 sw_if_index);
+ vnet_feature_config_main_t * cm,
+ u32 sw_if_index);
#endif /* included_feature_registration_h */
diff --git a/vnet/vnet/ip/ip.h b/vnet/vnet/ip/ip.h
index c5882c58dff..a57d162c8c3 100644
--- a/vnet/vnet/ip/ip.h
+++ b/vnet/vnet/ip/ip.h
@@ -219,7 +219,7 @@ extern vlib_node_registration_t ip6_inacl_node;
void
vnet_config_update_tx_feature_count (ip_lookup_main_t * lm,
- ip_config_main_t * tx_cm,
+ vnet_feature_config_main_t * tx_cm,
u32 sw_if_index,
int is_add);
diff --git a/vnet/vnet/ip/ip4_forward.c b/vnet/vnet/ip/ip4_forward.c
index d69a3c37dd7..632925a4a59 100644
--- a/vnet/vnet/ip/ip4_forward.c
+++ b/vnet/vnet/ip/ip4_forward.c
@@ -734,7 +734,7 @@ ip4_sw_interface_enable_disable (u32 sw_if_index,
for (cast = 0; cast <= VNET_IP_RX_MULTICAST_FEAT; cast++)
{
- ip_config_main_t * cm = &lm->feature_config_mains[cast];
+ vnet_feature_config_main_t * cm = &lm->feature_config_mains[cast];
vnet_config_main_t * vcm = &cm->config_main;
vec_validate_init_empty (cm->config_index_by_sw_if_index, sw_if_index, ~0);
@@ -969,7 +969,7 @@ ip4_feature_init (vlib_main_t * vm, ip4_main_t * im)
ip_lookup_main_t * lm = &im->lookup_main;
clib_error_t * error;
vnet_cast_t cast;
- ip_config_main_t * cm;
+ vnet_feature_config_main_t * cm;
vnet_config_main_t * vcm;
char **feature_start_nodes;
int feature_start_len;
@@ -1017,7 +1017,7 @@ ip4_sw_interface_add_del (vnet_main_t * vnm,
for (cast = 0; cast < VNET_N_IP_FEAT; cast++)
{
- ip_config_main_t * cm = &lm->feature_config_mains[cast];
+ vnet_feature_config_main_t * cm = &lm->feature_config_mains[cast];
vnet_config_main_t * vcm = &cm->config_main;
vec_validate_init_empty (cm->config_index_by_sw_if_index, sw_if_index, ~0);
@@ -2184,7 +2184,7 @@ ip4_rewrite_inline (vlib_main_t * vm,
u32 n_left_from, n_left_to_next, * to_next, next_index;
vlib_node_runtime_t * error_node = vlib_node_get_runtime (vm, ip4_input_node.index);
vlib_rx_or_tx_t adj_rx_tx = rewrite_for_locally_received_packets ? VLIB_RX : VLIB_TX;
- ip_config_main_t * cm = &lm->feature_config_mains[VNET_IP_TX_FEAT];
+ vnet_feature_config_main_t * cm = &lm->feature_config_mains[VNET_IP_TX_FEAT];
n_left_from = frame->n_vectors;
next_index = node->cached_next_index;
diff --git a/vnet/vnet/ip/ip4_input.c b/vnet/vnet/ip/ip4_input.c
index 2de2d4756b3..268f7afa828 100644
--- a/vnet/vnet/ip/ip4_input.c
+++ b/vnet/vnet/ip/ip4_input.c
@@ -108,7 +108,7 @@ ip4_input_inline (vlib_main_t * vm,
{
vlib_buffer_t * p0, * p1;
ip4_header_t * ip0, * ip1;
- ip_config_main_t * cm0, * cm1;
+ vnet_feature_config_main_t * cm0, * cm1;
u32 sw_if_index0, pi0, ip_len0, cur_len0, next0;
u32 sw_if_index1, pi1, ip_len1, cur_len1, next1;
i32 len_diff0, len_diff1;
@@ -245,7 +245,7 @@ ip4_input_inline (vlib_main_t * vm,
{
vlib_buffer_t * p0;
ip4_header_t * ip0;
- ip_config_main_t * cm0;
+ vnet_feature_config_main_t * cm0;
u32 sw_if_index0, pi0, ip_len0, cur_len0, next0;
i32 len_diff0;
u8 error0, cast0;
@@ -343,7 +343,7 @@ ip4_input_inline (vlib_main_t * vm,
@par Graph mechanics: buffer metadata, next index usage
@em Uses:
- - ip_config_main_t cm corresponding to each pkt's dst address unicast /
+ - vnet_feature_config_main_t cm corresponding to each pkt's dst address unicast /
multicast status.
- <code>b->current_config_index</code> corresponding to each pkt's
rx sw_if_index.
diff --git a/vnet/vnet/ip/ip4_source_and_port_range_check.c b/vnet/vnet/ip/ip4_source_and_port_range_check.c
index 6ee648cea51..8b69522aebe 100644
--- a/vnet/vnet/ip/ip4_source_and_port_range_check.c
+++ b/vnet/vnet/ip/ip4_source_and_port_range_check.c
@@ -156,9 +156,10 @@ ip4_source_and_port_range_check_inline (vlib_main_t * vm,
{
ip4_main_t *im = &ip4_main;
ip_lookup_main_t *lm = &im->lookup_main;
- ip_config_main_t *rx_cm =
+ vnet_feature_config_main_t *rx_cm =
&lm->feature_config_mains[VNET_IP_RX_UNICAST_FEAT];
- ip_config_main_t *tx_cm = &lm->feature_config_mains[VNET_IP_TX_FEAT];
+ vnet_feature_config_main_t *tx_cm =
+ &lm->feature_config_mains[VNET_IP_TX_FEAT];
u32 n_left_from, *from, *to_next;
u32 next_index;
vlib_node_runtime_t *error_node = node;
@@ -640,9 +641,10 @@ set_ip_source_and_port_range_check (vlib_main_t * vm,
{
ip4_main_t *im = &ip4_main;
ip_lookup_main_t *lm = &im->lookup_main;
- ip_config_main_t *rx_cm =
+ vnet_feature_config_main_t *rx_cm =
&lm->feature_config_mains[VNET_IP_RX_UNICAST_FEAT];
- ip_config_main_t *tx_cm = &lm->feature_config_mains[VNET_IP_TX_FEAT];
+ vnet_feature_config_main_t *tx_cm =
+ &lm->feature_config_mains[VNET_IP_TX_FEAT];
u32 ci;
ip_source_and_port_range_check_config_t config;
u32 feature_index;
diff --git a/vnet/vnet/ip/ip4_source_check.c b/vnet/vnet/ip/ip4_source_check.c
index b7913845bac..62ebcb7268a 100644
--- a/vnet/vnet/ip/ip4_source_check.c
+++ b/vnet/vnet/ip/ip4_source_check.c
@@ -90,7 +90,7 @@ ip4_source_check_inline (vlib_main_t * vm,
{
ip4_main_t * im = &ip4_main;
ip_lookup_main_t * lm = &im->lookup_main;
- ip_config_main_t * cm = &lm->feature_config_mains[VNET_IP_RX_UNICAST_FEAT];
+ vnet_feature_config_main_t * cm = &lm->feature_config_mains[VNET_IP_RX_UNICAST_FEAT];
u32 n_left_from, * from, * to_next;
u32 next_index;
vlib_node_runtime_t * error_node = vlib_node_get_runtime (vm, ip4_input_node.index);
@@ -335,7 +335,7 @@ set_ip_source_check (vlib_main_t * vm,
vnet_main_t * vnm = vnet_get_main();
ip4_main_t * im = &ip4_main;
ip_lookup_main_t * lm = &im->lookup_main;
- ip_config_main_t * rx_cm = &lm->feature_config_mains[VNET_IP_RX_UNICAST_FEAT];
+ vnet_feature_config_main_t * rx_cm = &lm->feature_config_mains[VNET_IP_RX_UNICAST_FEAT];
clib_error_t * error = 0;
u32 sw_if_index, is_del, ci;
ip4_source_check_config_t config;
diff --git a/vnet/vnet/ip/ip6_forward.c b/vnet/vnet/ip/ip6_forward.c
index bdcdbf0dc82..2873e2bdaeb 100644
--- a/vnet/vnet/ip/ip6_forward.c
+++ b/vnet/vnet/ip/ip6_forward.c
@@ -435,7 +435,7 @@ ip6_sw_interface_enable_disable (u32 sw_if_index,
for (cast = 0; cast <= VNET_IP_RX_MULTICAST_FEAT; cast++)
{
- ip_config_main_t * cm = &lm->feature_config_mains[cast];
+ vnet_feature_config_main_t * cm = &lm->feature_config_mains[cast];
vnet_config_main_t * vcm = &cm->config_main;
vec_validate_init_empty (cm->config_index_by_sw_if_index, sw_if_index, ~0);
@@ -671,7 +671,7 @@ ip6_feature_init (vlib_main_t * vm, ip6_main_t * im)
ip_lookup_main_t * lm = &im->lookup_main;
clib_error_t * error;
vnet_cast_t cast;
- ip_config_main_t * cm;
+ vnet_feature_config_main_t * cm;
vnet_config_main_t * vcm;
char **feature_start_nodes;
int feature_start_len;
@@ -715,7 +715,7 @@ ip6_sw_interface_add_del (vnet_main_t * vnm,
for (cast = 0; cast < VNET_N_IP_FEAT; cast++)
{
- ip_config_main_t * cm = &lm->feature_config_mains[cast];
+ vnet_feature_config_main_t * cm = &lm->feature_config_mains[cast];
vnet_config_main_t * vcm = &cm->config_main;
vec_validate_init_empty (cm->config_index_by_sw_if_index, sw_if_index, ~0);
@@ -1827,7 +1827,7 @@ ip6_rewrite_inline (vlib_main_t * vm,
u32 n_left_from, n_left_to_next, * to_next, next_index;
vlib_node_runtime_t * error_node = vlib_node_get_runtime (vm, ip6_input_node.index);
vlib_rx_or_tx_t adj_rx_tx = rewrite_for_locally_received_packets ? VLIB_RX : VLIB_TX;
- ip_config_main_t * cm = &lm->feature_config_mains[VNET_IP_TX_FEAT];
+ vnet_feature_config_main_t * cm = &lm->feature_config_mains[VNET_IP_TX_FEAT];
n_left_from = frame->n_vectors;
next_index = node->cached_next_index;
diff --git a/vnet/vnet/ip/ip6_input.c b/vnet/vnet/ip/ip6_input.c
index 15791245176..a355abfdb39 100644
--- a/vnet/vnet/ip/ip6_input.c
+++ b/vnet/vnet/ip/ip6_input.c
@@ -105,7 +105,7 @@ ip6_input (vlib_main_t * vm,
{
vlib_buffer_t * p0, * p1;
ip6_header_t * ip0, * ip1;
- ip_config_main_t * cm0, * cm1;
+ vnet_feature_config_main_t * cm0, * cm1;
u32 pi0, sw_if_index0, next0;
u32 pi1, sw_if_index1, next1;
u8 error0, error1, cast0, cast1;
@@ -217,7 +217,7 @@ ip6_input (vlib_main_t * vm,
{
vlib_buffer_t * p0;
ip6_header_t * ip0;
- ip_config_main_t * cm0;
+ vnet_feature_config_main_t * cm0;
u32 pi0, sw_if_index0, next0;
u8 error0, cast0;
diff --git a/vnet/vnet/ip/ip_init.c b/vnet/vnet/ip/ip_init.c
index 603d1f7e172..c89f60c09d7 100644
--- a/vnet/vnet/ip/ip_init.c
+++ b/vnet/vnet/ip/ip_init.c
@@ -146,7 +146,7 @@ VLIB_INIT_FUNCTION (ip_main_init);
void
vnet_config_update_tx_feature_count (ip_lookup_main_t * lm,
- ip_config_main_t * tx_cm,
+ vnet_feature_config_main_t * tx_cm,
u32 sw_if_index,
int is_add)
{
diff --git a/vnet/vnet/ip/lookup.h b/vnet/vnet/ip/lookup.h
index b73191cc4d8..a1fbe6eb289 100644
--- a/vnet/vnet/ip/lookup.h
+++ b/vnet/vnet/ip/lookup.h
@@ -357,7 +357,7 @@ typedef struct ip_lookup_main_t {
u32 * classify_table_index_by_sw_if_index;
/** rx unicast, multicast, tx interface/feature configuration. */
- ip_config_main_t feature_config_mains[VNET_N_IP_FEAT];
+ vnet_feature_config_main_t feature_config_mains[VNET_N_IP_FEAT];
/** Number of bytes in a fib result. Must be at least
sizeof (uword). First word is always adjacency index. */