summaryrefslogtreecommitdiffstats
path: root/vnet/vnet/l2/l2_patch.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2016-10-28 20:30:15 +0200
committerDave Barach <openvpp@barachs.net>2016-11-01 21:34:05 +0000
commit2231150b52b58c4114f8520cde8b26df2761e064 (patch)
treef4f5e5dcd4608bc94f02dabb6aa480fa411b85b8 /vnet/vnet/l2/l2_patch.c
parent3dffb1e4c628f0698e369d1cbb3cb2068a3a698c (diff)
feature: add new feature handling code and device-input features
Signed-off-by: Damjan Marion <damarion@cisco.com> Change-Id: I010ecde93863dbdad84b993cd3680a5446db59b5
Diffstat (limited to 'vnet/vnet/l2/l2_patch.c')
-rw-r--r--vnet/vnet/l2/l2_patch.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/vnet/vnet/l2/l2_patch.c b/vnet/vnet/l2/l2_patch.c
index ad05fa0d034..5e4691f45c7 100644
--- a/vnet/vnet/l2/l2_patch.c
+++ b/vnet/vnet/l2/l2_patch.c
@@ -16,6 +16,7 @@
#include <vnet/vnet.h>
#include <vnet/pg/pg.h>
#include <vnet/ethernet/ethernet.h>
+#include <vnet/feature/feature.h>
#include <vppinfra/error.h>
typedef struct
@@ -283,18 +284,16 @@ VLIB_NODE_FUNCTION_MULTIARCH (l2_patch_node, l2_patch_node_fn)
ethernet_set_flags (l2pm->vnet_main, rxhi->hw_if_index,
ETHERNET_INTERFACE_FLAG_ACCEPT_ALL);
- vnet_hw_interface_rx_redirect_to_node (l2pm->vnet_main,
- rxhi->hw_if_index,
- l2_patch_node.index);
+ vnet_feature_enable_disable ("device-input", "l2-patch",
+ rxhi->hw_if_index, 1, 0, 0);
}
else
{
ethernet_set_flags (l2pm->vnet_main, rxhi->hw_if_index,
0 /* disable promiscuous mode */ );
- vnet_hw_interface_rx_redirect_to_node (l2pm->vnet_main,
- rxhi->hw_if_index,
- ~0 /* disable */ );
+ vnet_feature_enable_disable ("device-input", "l2-patch",
+ rxhi->hw_if_index, 0, 0, 0);
if (vec_len (l2pm->tx_next_by_rx_sw_if_index) > rx_sw_if_index)
{
l2pm->tx_next_by_rx_sw_if_index[rx_sw_if_index] = ~0;