summaryrefslogtreecommitdiffstats
path: root/src/vnet/adj/adj_midchain.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2017-01-26 14:25:34 -0800
committerNeale Ranns <nranns@cisco.com>2017-02-13 08:51:30 +0000
commitce1b4c7f05ce28d7b73eb7ed0a8ea4bd483f09e9 (patch)
tree5e7f6cab01b2df39d12d3865af7c809916c51d63 /src/vnet/adj/adj_midchain.c
parentfdd81af6afe6c782ad2c1a139210378badec626b (diff)
Basic support for LISP-GPE encapsulated NSH packets
Change-Id: I97fedb0f70dd18ed9bbe985407cc5fe714e8a2e2 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/adj/adj_midchain.c')
-rw-r--r--src/vnet/adj/adj_midchain.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/vnet/adj/adj_midchain.c b/src/vnet/adj/adj_midchain.c
index 8c6ab5aa17b..35cdb003708 100644
--- a/src/vnet/adj/adj_midchain.c
+++ b/src/vnet/adj/adj_midchain.c
@@ -16,6 +16,7 @@
#include <vnet/adj/adj_nbr.h>
#include <vnet/adj/adj_internal.h>
#include <vnet/adj/adj_l2.h>
+#include <vnet/adj/adj_nsh.h>
#include <vnet/adj/adj_midchain.h>
#include <vnet/ethernet/arp_packet.h>
#include <vnet/dpo/drop_dpo.h>
@@ -308,6 +309,18 @@ VNET_FEATURE_INIT (adj_midchain_tx_no_count_ethernet, static) = {
.runs_before = VNET_FEATURES ("error-drop"),
.feature_index_ptr = &adj_midchain_tx_no_count_feature_node[VNET_LINK_ETHERNET],
};
+VNET_FEATURE_INIT (adj_midchain_tx_nsh, static) = {
+ .arc_name = "nsh-output",
+ .node_name = "adj-midchain-tx",
+ .runs_before = VNET_FEATURES ("error-drop"),
+ .feature_index_ptr = &adj_midchain_tx_feature_node[VNET_LINK_NSH],
+};
+VNET_FEATURE_INIT (adj_midchain_tx_no_count_nsh, static) = {
+ .arc_name = "nsh-output",
+ .node_name = "adj-midchain-tx-no-count",
+ .runs_before = VNET_FEATURES ("error-drop"),
+ .feature_index_ptr = &adj_midchain_tx_no_count_feature_node[VNET_LINK_NSH],
+};
static inline u32
adj_get_midchain_node (vnet_link_t link)
@@ -321,6 +334,8 @@ adj_get_midchain_node (vnet_link_t link)
return (mpls_midchain_node.index);
case VNET_LINK_ETHERNET:
return (adj_l2_midchain_node.index);
+ case VNET_LINK_NSH:
+ return (adj_nsh_midchain_node.index);
case VNET_LINK_ARP:
break;
}
@@ -354,6 +369,11 @@ adj_midchain_get_feature_arc_index_for_link_type (const ip_adjacency_t *adj)
arc = ethernet_main.output_feature_arc_index;
break;
}
+ case VNET_LINK_NSH:
+ {
+ arc = nsh_main_dummy.output_feature_arc_index;
+ break;
+ }
case VNET_LINK_ARP:
ASSERT(0);
break;