diff options
Diffstat (limited to 'vnet')
-rw-r--r-- | vnet/Makefile.am | 34 | ||||
-rw-r--r-- | vnet/vnet/ethernet/ethernet.h | 8 | ||||
-rw-r--r-- | vnet/vnet/ip/feature_registration.c (renamed from vnet/vnet/ip/ip_feature_registration.c) | 8 | ||||
-rw-r--r-- | vnet/vnet/ip/feature_registration.h (renamed from vnet/vnet/ip/ip_feature_registration.h) | 14 | ||||
-rw-r--r-- | vnet/vnet/ip/ip4.h | 16 | ||||
-rw-r--r-- | vnet/vnet/ip/ip6.h | 16 | ||||
-rw-r--r-- | vnet/vnet/ip/lookup.h | 2 | ||||
-rw-r--r-- | vnet/vnet/mpls/mpls.h | 10 |
8 files changed, 54 insertions, 54 deletions
diff --git a/vnet/Makefile.am b/vnet/Makefile.am index f130d15a..bff8418f 100644 --- a/vnet/Makefile.am +++ b/vnet/Makefile.am @@ -267,19 +267,18 @@ nobase_include_HEADERS += \ # Layer 3 protocol: IP v4/v6 ######################################## libvnet_la_SOURCES += \ + vnet/ip/feature_registration.c \ vnet/ip/format.c \ vnet/ip/icmp4.c \ vnet/ip/icmp6.c \ - vnet/ip/ip_feature_registration.c \ vnet/ip/ip46_cli.c \ - vnet/ip/ping.c \ vnet/ip/ip4_format.c \ vnet/ip/ip4_forward.c \ vnet/ip/ip4_input.c \ vnet/ip/ip4_mtrie.c \ vnet/ip/ip4_pg.c \ - vnet/ip/ip4_source_check.c \ vnet/ip/ip4_source_and_port_range_check.c \ + vnet/ip/ip4_source_check.c \ vnet/ip/ip6_format.c \ vnet/ip/ip6_forward.c \ vnet/ip/ip6_hop_by_hop.c \ @@ -287,45 +286,46 @@ libvnet_la_SOURCES += \ vnet/ip/ip6_neighbor.c \ vnet/ip/ip6_pg.c \ vnet/ip/ip_checksum.c \ + vnet/ip/ip_frag.c \ vnet/ip/ip.h \ vnet/ip/ip_init.c \ + vnet/ip/ip_input_acl.c \ vnet/ip/lookup.c \ + vnet/ip/ping.c \ + vnet/ip/punt.c \ vnet/ip/udp_format.c \ vnet/ip/udp_init.c \ vnet/ip/udp_local.c \ - vnet/ip/punt.c \ - vnet/ip/udp_pg.c \ - vnet/ip/ip_input_acl.c \ - vnet/ip/ip_frag.c + vnet/ip/udp_pg.c nobase_include_HEADERS += \ + vnet/ip/feature_registration.h \ vnet/ip/format.h \ vnet/ip/icmp46_packet.h \ vnet/ip/icmp4.h \ vnet/ip/icmp6.h \ vnet/ip/igmp_packet.h \ - vnet/ip/ip.h \ - vnet/ip/ip_feature_registration.h \ - vnet/ip/ip_source_and_port_range_check.h \ + vnet/ip/ip4_error.h \ vnet/ip/ip4.h \ vnet/ip/ip4_mtrie.h \ - vnet/ip/ip4_error.h \ vnet/ip/ip4_packet.h \ - vnet/ip/ip6.h \ vnet/ip/ip6_error.h \ + vnet/ip/ip6.h \ vnet/ip/ip6_hop_by_hop.h \ vnet/ip/ip6_hop_by_hop_packet.h \ vnet/ip/ip6_packet.h \ - vnet/ip/lookup.h \ + vnet/ip/ip.h \ vnet/ip/ip_packet.h \ + vnet/ip/ip_source_and_port_range_check.h \ + vnet/ip/lookup.h \ vnet/ip/ports.def \ vnet/ip/protocols.def \ + vnet/ip/punt_error.def \ + vnet/ip/punt.h \ vnet/ip/tcp_packet.h \ - vnet/ip/udp.h \ vnet/ip/udp_error.def \ - vnet/ip/udp_packet.h \ - vnet/ip/punt_error.def \ - vnet/ip/punt.h + vnet/ip/udp.h \ + vnet/ip/udp_packet.h ######################################## # Layer 3 protocol: IPSec diff --git a/vnet/vnet/ethernet/ethernet.h b/vnet/vnet/ethernet/ethernet.h index 728da522..973ed58c 100644 --- a/vnet/vnet/ethernet/ethernet.h +++ b/vnet/vnet/ethernet/ethernet.h @@ -43,7 +43,7 @@ #include <vnet/vnet.h> #include <vnet/ethernet/packet.h> #include <vnet/pg/pg.h> -#include <vnet/ip/ip_feature_registration.h> +#include <vnet/ip/feature_registration.h> always_inline u64 ethernet_mac_address_u64 (u8 * a) @@ -267,7 +267,7 @@ typedef struct ip_config_main_t feature_config_mains[VNET_N_IP_FEAT]; /** Feature path configuration lists */ - vnet_ip_feature_registration_t *next_feature[VNET_N_IP_FEAT]; + vnet_feature_registration_t *next_feature[VNET_N_IP_FEAT]; /** Save results for show command */ char **feature_nodes[VNET_N_IP_FEAT]; @@ -279,7 +279,7 @@ typedef struct ethernet_main_t ethernet_main; #define VNET_ETHERNET_TX_FEATURE_INIT(x,...) \ - __VA_ARGS__ vnet_ip_feature_registration_t tx_##x; \ + __VA_ARGS__ vnet_feature_registration_t tx_##x; \ static void __vnet_add_feature_registration_tx_##x (void) \ __attribute__((__constructor__)) ; \ static void __vnet_add_feature_registration_tx_##x (void) \ @@ -288,7 +288,7 @@ static void __vnet_add_feature_registration_tx_##x (void) \ tx_##x.next = im->next_feature[VNET_IP_TX_FEAT]; \ im->next_feature[VNET_IP_TX_FEAT] = &tx_##x; \ } \ -__VA_ARGS__ vnet_ip_feature_registration_t tx_##x +__VA_ARGS__ vnet_feature_registration_t tx_##x always_inline ethernet_type_info_t * diff --git a/vnet/vnet/ip/ip_feature_registration.c b/vnet/vnet/ip/feature_registration.c index 54d6c31b..3964617b 100644 --- a/vnet/vnet/ip/ip_feature_registration.c +++ b/vnet/vnet/ip/feature_registration.c @@ -42,7 +42,7 @@ feature subgraph arc, which needs to run before @c ip4-lookup. In either base code or a plugin, <CODE><PRE> - \#include <vnet/ip/ip_feature_registration.h> + \#include <vnet/ip/feature_registration.h> </PRE></CODE> and add the new feature as shown: @@ -152,7 +152,7 @@ vnet_feature_arc_init (vlib_main_t * vm, vnet_config_main_t * vcm, char **feature_start_nodes, int num_feature_start_nodes, - vnet_ip_feature_registration_t * first_reg, + vnet_feature_registration_t * first_reg, char ***in_feature_nodes) { uword *index_by_name; @@ -171,7 +171,7 @@ vnet_feature_arc_init (vlib_main_t * vm, int a_index, b_index; int n_features; u32 *result = 0; - vnet_ip_feature_registration_t *this_reg = 0; + vnet_feature_registration_t *this_reg = 0; char **feature_nodes = 0; hash_pair_t *hp; u8 **keys_to_delete = 0; @@ -291,7 +291,7 @@ again: { p = hash_get (reg_by_index, result[i]); ASSERT (p != 0); - this_reg = (vnet_ip_feature_registration_t *) p[0]; + this_reg = (vnet_feature_registration_t *) p[0]; *this_reg->feature_index = n_features - (i + 1); vec_add1 (feature_nodes, this_reg->node_name); } diff --git a/vnet/vnet/ip/ip_feature_registration.h b/vnet/vnet/ip/feature_registration.h index 78299807..ba7f97ce 100644 --- a/vnet/vnet/ip/ip_feature_registration.h +++ b/vnet/vnet/ip/feature_registration.h @@ -13,14 +13,14 @@ * limitations under the License. */ -#ifndef included_ip_feature_registration_h -#define included_ip_feature_registration_h +#ifndef included_feature_registration_h +#define included_feature_registration_h /** feature registration object */ -typedef struct _vnet_ip_feature_registration +typedef struct _vnet_feature_registration { /** next registration in list of all registrations*/ - struct _vnet_ip_feature_registration *next; + struct _vnet_feature_registration *next; /** Graph node name */ char *node_name; /** Pointer to this feature index, filled in by vnet_feature_arc_init */ @@ -29,7 +29,7 @@ typedef struct _vnet_ip_feature_registration char **runs_before; /** Constraints of the form "this feature runs after Y" */ char **runs_after; -} vnet_ip_feature_registration_t; +} vnet_feature_registration_t; typedef struct ip_config_main_t_ { @@ -44,14 +44,14 @@ clib_error_t *vnet_feature_arc_init (vlib_main_t * vm, vnet_config_main_t * vcm, char **feature_start_nodes, int num_feature_start_nodes, - vnet_ip_feature_registration_t * + vnet_feature_registration_t * first_reg, char ***feature_nodes); void ip_interface_features_show (vlib_main_t * vm, const char *pname, ip_config_main_t * cm, u32 sw_if_index); -#endif /* included_ip_feature_registration_h */ +#endif /* included_feature_registration_h */ /* * fd.io coding-style-patch-verification: ON diff --git a/vnet/vnet/ip/ip4.h b/vnet/vnet/ip/ip4.h index 441e32f4..f00b6ca7 100644 --- a/vnet/vnet/ip/ip4.h +++ b/vnet/vnet/ip/ip4.h @@ -43,7 +43,7 @@ #include <vnet/ip/ip4_mtrie.h> #include <vnet/ip/ip4_packet.h> #include <vnet/ip/lookup.h> -#include <vnet/ip/ip_feature_registration.h> +#include <vnet/ip/feature_registration.h> typedef struct ip4_fib_t { /* Hash table for each prefix length mapping. */ @@ -117,7 +117,7 @@ typedef struct ip4_main_t { vlib_packet_template_t ip4_arp_request_packet_template; /** Feature path configuration lists */ - vnet_ip_feature_registration_t * next_feature[VNET_N_IP_FEAT]; + vnet_feature_registration_t * next_feature[VNET_N_IP_FEAT]; /** Built-in unicast feature path index, see @ref vnet_feature_arc_init() */ u32 ip4_unicast_rx_feature_check_access; @@ -175,7 +175,7 @@ typedef struct ip4_main_t { extern ip4_main_t ip4_main; #define VNET_IP4_UNICAST_FEATURE_INIT(x,...) \ - __VA_ARGS__ vnet_ip_feature_registration_t uc_##x; \ + __VA_ARGS__ vnet_feature_registration_t uc_##x; \ static void __vnet_add_feature_registration_uc_##x (void) \ __attribute__((__constructor__)) ; \ static void __vnet_add_feature_registration_uc_##x (void) \ @@ -184,10 +184,10 @@ static void __vnet_add_feature_registration_uc_##x (void) \ uc_##x.next = im->next_feature[VNET_IP_RX_UNICAST_FEAT]; \ im->next_feature[VNET_IP_RX_UNICAST_FEAT] = &uc_##x; \ } \ -__VA_ARGS__ vnet_ip_feature_registration_t uc_##x +__VA_ARGS__ vnet_feature_registration_t uc_##x #define VNET_IP4_MULTICAST_FEATURE_INIT(x,...) \ - __VA_ARGS__ vnet_ip_feature_registration_t mc_##x; \ + __VA_ARGS__ vnet_feature_registration_t mc_##x; \ static void __vnet_add_feature_registration_mc_##x (void) \ __attribute__((__constructor__)) ; \ static void __vnet_add_feature_registration_mc_##x (void) \ @@ -196,10 +196,10 @@ static void __vnet_add_feature_registration_mc_##x (void) \ mc_##x.next = im->next_feature[VNET_IP_RX_MULTICAST_FEAT]; \ im->next_feature[VNET_IP_RX_MULTICAST_FEAT] = &mc_##x; \ } \ -__VA_ARGS__ vnet_ip_feature_registration_t mc_##x +__VA_ARGS__ vnet_feature_registration_t mc_##x #define VNET_IP4_TX_FEATURE_INIT(x,...) \ - __VA_ARGS__ vnet_ip_feature_registration_t tx_##x; \ + __VA_ARGS__ vnet_feature_registration_t tx_##x; \ static void __vnet_add_feature_registration_tx_##x (void) \ __attribute__((__constructor__)) ; \ static void __vnet_add_feature_registration_tx_##x (void) \ @@ -208,7 +208,7 @@ static void __vnet_add_feature_registration_tx_##x (void) \ tx_##x.next = im->next_feature[VNET_IP_TX_FEAT]; \ im->next_feature[VNET_IP_TX_FEAT] = &tx_##x; \ } \ -__VA_ARGS__ vnet_ip_feature_registration_t tx_##x +__VA_ARGS__ vnet_feature_registration_t tx_##x /** Global ip4 input node. Errors get attached to ip4 input node. */ diff --git a/vnet/vnet/ip/ip6.h b/vnet/vnet/ip/ip6.h index 13d8d5fd..ab0e650b 100644 --- a/vnet/vnet/ip/ip6.h +++ b/vnet/vnet/ip/ip6.h @@ -46,7 +46,7 @@ #include <vnet/ip/ip6_packet.h> #include <vnet/ip/ip6_hop_by_hop_packet.h> #include <vnet/ip/lookup.h> -#include <vnet/ip/ip_feature_registration.h> +#include <vnet/ip/feature_registration.h> #include <stdbool.h> #include <vppinfra/bihash_24_8.h> #include <vppinfra/bihash_template.h> @@ -161,7 +161,7 @@ typedef struct ip6_main_t { uword lookup_table_size; /* feature path configuration lists */ - vnet_ip_feature_registration_t * next_feature[VNET_N_IP_FEAT]; + vnet_feature_registration_t * next_feature[VNET_N_IP_FEAT]; /* Built-in unicast feature path indices, see vnet_feature_arc_init(...) */ u32 ip6_unicast_rx_feature_check_access; @@ -202,7 +202,7 @@ typedef struct ip6_main_t { extern ip6_main_t ip6_main; #define VNET_IP6_UNICAST_FEATURE_INIT(x,...) \ - __VA_ARGS__ vnet_ip_feature_registration_t uc_##x; \ + __VA_ARGS__ vnet_feature_registration_t uc_##x; \ static void __vnet_add_feature_registration_uc_##x (void) \ __attribute__((__constructor__)) ; \ static void __vnet_add_feature_registration_uc_##x (void) \ @@ -211,10 +211,10 @@ static void __vnet_add_feature_registration_uc_##x (void) \ uc_##x.next = im->next_feature[VNET_IP_RX_UNICAST_FEAT]; \ im->next_feature[VNET_IP_RX_UNICAST_FEAT] = &uc_##x; \ } \ -__VA_ARGS__ vnet_ip_feature_registration_t uc_##x +__VA_ARGS__ vnet_feature_registration_t uc_##x #define VNET_IP6_MULTICAST_FEATURE_INIT(x,...) \ - __VA_ARGS__ vnet_ip_feature_registration_t mc_##x; \ + __VA_ARGS__ vnet_feature_registration_t mc_##x; \ static void __vnet_add_feature_registration_mc_##x (void) \ __attribute__((__constructor__)) ; \ static void __vnet_add_feature_registration_mc_##x (void) \ @@ -223,10 +223,10 @@ static void __vnet_add_feature_registration_mc_##x (void) \ mc_##x.next = im->next_feature[VNET_IP_RX_MULTICAST_FEAT]; \ im->next_feature[VNET_IP_RX_MULTICAST_FEAT] = &mc_##x; \ } \ -__VA_ARGS__ vnet_ip_feature_registration_t mc_##x +__VA_ARGS__ vnet_feature_registration_t mc_##x #define VNET_IP6_TX_FEATURE_INIT(x,...) \ - __VA_ARGS__ vnet_ip_feature_registration_t tx_##x; \ + __VA_ARGS__ vnet_feature_registration_t tx_##x; \ static void __vnet_add_feature_registration_tx_##x (void) \ __attribute__((__constructor__)) ; \ static void __vnet_add_feature_registration_tx_##x (void) \ @@ -235,7 +235,7 @@ static void __vnet_add_feature_registration_tx_##x (void) \ tx_##x.next = im->next_feature[VNET_IP_TX_FEAT]; \ im->next_feature[VNET_IP_TX_FEAT] = &tx_##x; \ } \ -__VA_ARGS__ vnet_ip_feature_registration_t tx_##x +__VA_ARGS__ vnet_feature_registration_t tx_##x /* Global ip6 input node. Errors get attached to ip6 input node. */ diff --git a/vnet/vnet/ip/lookup.h b/vnet/vnet/ip/lookup.h index d3a180fa..84c4ffb2 100644 --- a/vnet/vnet/ip/lookup.h +++ b/vnet/vnet/ip/lookup.h @@ -54,7 +54,7 @@ #include <vnet/ip/ip6_packet.h> #include <vnet/fib/fib_node.h> #include <vnet/dpo/dpo.h> -#include <vnet/ip/ip_feature_registration.h> +#include <vnet/ip/feature_registration.h> /** @brief Common (IP4/IP6) next index stored in adjacency. */ typedef enum { diff --git a/vnet/vnet/mpls/mpls.h b/vnet/vnet/mpls/mpls.h index 5a09e5a0..e4737709 100644 --- a/vnet/vnet/mpls/mpls.h +++ b/vnet/vnet/mpls/mpls.h @@ -155,7 +155,7 @@ typedef struct { u32 ip6_classify_mpls_policy_encap_next_index; /* feature path configuration lists */ - vnet_ip_feature_registration_t * next_feature[VNET_N_IP_FEAT]; + vnet_feature_registration_t * next_feature[VNET_N_IP_FEAT]; /* Save feature results for show command */ char **feature_nodes[VNET_N_IP_FEAT]; @@ -174,7 +174,7 @@ typedef struct { extern mpls_main_t mpls_main; #define VNET_MPLS_FEATURE_INIT(x,...) \ - __VA_ARGS__ vnet_ip_feature_registration_t uc_##x; \ + __VA_ARGS__ vnet_feature_registration_t uc_##x; \ static void __vnet_add_feature_registration_uc_##x (void) \ __attribute__((__constructor__)) ; \ static void __vnet_add_feature_registration_uc_##x (void) \ @@ -183,10 +183,10 @@ static void __vnet_add_feature_registration_uc_##x (void) \ uc_##x.next = mm->next_feature[VNET_IP_RX_UNICAST_FEAT]; \ mm->next_feature[VNET_IP_RX_UNICAST_FEAT] = &uc_##x; \ } \ -__VA_ARGS__ vnet_ip_feature_registration_t uc_##x +__VA_ARGS__ vnet_feature_registration_t uc_##x #define VNET_MPLS_TX_FEATURE_INIT(x,...) \ - __VA_ARGS__ vnet_ip_feature_registration_t tx_##x; \ + __VA_ARGS__ vnet_feature_registration_t tx_##x; \ static void __vnet_add_feature_registration_tx_##x (void) \ __attribute__((__constructor__)) ; \ static void __vnet_add_feature_registration_tx_##x (void) \ @@ -195,7 +195,7 @@ static void __vnet_add_feature_registration_tx_##x (void) \ tx_##x.next = mm->next_feature[VNET_IP_TX_FEAT]; \ mm->next_feature[VNET_IP_TX_FEAT] = &tx_##x; \ } \ -__VA_ARGS__ vnet_ip_feature_registration_t tx_##x +__VA_ARGS__ vnet_feature_registration_t tx_##x extern clib_error_t * mpls_feature_init(vlib_main_t * vm); |