diff options
author | Dave Barach <dave@barachs.net> | 2016-08-17 11:54:30 -0400 |
---|---|---|
committer | Keith Burns <alagalah@gmail.com> | 2016-08-19 18:42:04 +0000 |
commit | 5331c72daa9f7d345915a865df898cff652289ac (patch) | |
tree | 91f6d8fa0fa32f4052790d83d97c1402158ef67e /vnet/vnet/ip/ip6.h | |
parent | 5e15c91b6c2b5fbd7f989c5dc4edde506d254926 (diff) |
VPP-337 Add per interface IN filtering
- ip post-rewrite feature subgraph arc support
Change-Id: Ia4b07197463021ade916326231af246e2559a290
Signed-off-by: Dave Barach <dave@barachs.net>
Signed-off-by: Keith Burns (alagalah) <alagalah@gmail.com>
Diffstat (limited to 'vnet/vnet/ip/ip6.h')
-rw-r--r-- | vnet/vnet/ip/ip6.h | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/vnet/vnet/ip/ip6.h b/vnet/vnet/ip/ip6.h index 3d6c9f422e8..0d5d8d04bf8 100644 --- a/vnet/vnet/ip/ip6.h +++ b/vnet/vnet/ip/ip6.h @@ -145,6 +145,7 @@ typedef struct ip6_main_t { /* feature path configuration lists */ vnet_ip_feature_registration_t * next_uc_feature; vnet_ip_feature_registration_t * next_mc_feature; + vnet_ip_feature_registration_t * next_tx_feature; /* Built-in unicast feature path indices, see ip_feature_init_cast(...) */ u32 ip6_unicast_rx_feature_check_access; @@ -157,9 +158,12 @@ typedef struct ip6_main_t { /* Built-in multicast feature path indices */ u32 ip6_multicast_rx_feature_vpath; u32 ip6_multicast_rx_feature_lookup; + + /* Built-in tx feature path index */ + u32 ip6_tx_feature_interface_output; /* Save results for show command */ - char ** feature_nodes[VNET_N_CAST]; + char ** feature_nodes[VNET_N_IP_FEAT]; /* Seed for Jenkins hash used to compute ip6 flow hash. */ u32 flow_hash_seed; @@ -202,6 +206,19 @@ static void __vnet_add_feature_registration_mc_##x (void) \ } \ __VA_ARGS__ vnet_ip_feature_registration_t mc_##x +#define VNET_IP6_TX_FEATURE_INIT(x,...) \ + __VA_ARGS__ vnet_ip_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) \ +{ \ + ip6_main_t * im = &ip6_main; \ + tx_##x.next = im->next_tx_feature; \ + im->next_tx_feature = &tx_##x; \ +} \ +__VA_ARGS__ vnet_ip_feature_registration_t tx_##x + + /* Global ip6 input node. Errors get attached to ip6 input node. */ extern vlib_node_registration_t ip6_input_node; extern vlib_node_registration_t ip6_rewrite_node; |