summaryrefslogtreecommitdiffstats
path: root/src/vnet/feature/feature.h
diff options
context:
space:
mode:
authorSteven Luong <sluong@cisco.com>2019-10-10 11:36:41 -0700
committerDave Barach <openvpp@barachs.net>2019-10-17 12:55:31 +0000
commit8b7faa7270f13ec7e0687a49cfc5ede3b90e9a1f (patch)
treee418c1d1f4621a7e42c7f75a9bf3b6a30f5c043e /src/vnet/feature/feature.h
parent2279e44bf0ab0236635a82283042834e2e3bb047 (diff)
bonding: graph node running after bond-input in feature arc may crash
In bond RX quad loop, when all packets within the frame have the same incoming interface, we cannot skip calling bond_update_next because that function calls vnet_feature_next() to update the b->current_config_index. The next node needs the correct b->current_config_index to work with. Type: fix Signed-off-by: Steven Luong <sluong@cisco.com> Change-Id: I3d8b3d4e0f95490f406fae7638f0c43c301ce664 (cherry picked from commit 71e5b4710258376873c62428cb4a81b2a650fc26)
Diffstat (limited to 'src/vnet/feature/feature.h')
-rw-r--r--src/vnet/feature/feature.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/vnet/feature/feature.h b/src/vnet/feature/feature.h
index 2d1569b8cec..6e3401897f4 100644
--- a/src/vnet/feature/feature.h
+++ b/src/vnet/feature/feature.h
@@ -219,6 +219,13 @@ vnet_feature_enable_disable (const char *arc_name, const char *node_name,
void *feature_config,
u32 n_feature_config_bytes);
+static_always_inline u32
+vnet_get_feature_count (u8 arc, u32 sw_if_index)
+{
+ vnet_feature_main_t *fm = &feature_main;
+ return (fm->feature_count_by_sw_if_index[arc][sw_if_index]);
+}
+
static inline vnet_feature_config_main_t *
vnet_get_feature_arc_config_main (u8 arc_index)
{