From 5cd31ec9405d2bb2fbc8152a08c4cfb64f2a8e73 Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Mon, 24 Feb 2020 12:54:31 +0000 Subject: feature: provide a u16 version of vnet_feature_next Type: improvement when using vlib_buffer_enqueue_to_next the 'nexts' parameter is an array of u16, but vnet_feautre_next takes a u32. this is a simple wrapper to address the impedence mismatch. Signed-off-by: Neale Ranns Change-Id: I0fa86629e979e313344eb68442dc35a7b9537a8f --- src/vnet/feature/feature.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/vnet/feature') diff --git a/src/vnet/feature/feature.h b/src/vnet/feature/feature.h index cbea6590942..cd016735aca 100644 --- a/src/vnet/feature/feature.h +++ b/src/vnet/feature/feature.h @@ -304,6 +304,14 @@ vnet_feature_next (u32 * next0, vlib_buffer_t * b0) vnet_feature_next_with_data (next0, b0, 0); } +static_always_inline void +vnet_feature_next_u16 (u16 * next0, vlib_buffer_t * b0) +{ + u32 next32; + vnet_feature_next_with_data (&next32, b0, 0); + *next0 = next32; +} + static_always_inline int vnet_device_input_have_features (u32 sw_if_index) { -- cgit 1.2.3-korg