aboutsummaryrefslogtreecommitdiffstats
path: root/vnet/vnet/ipsec/ipsec.h
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2016-02-25 23:17:38 +0100
committerDamjan Marion <damarion@cisco.com>2016-02-26 13:17:30 +0100
commite936bbe5945ca3c0f522f6c0abdfbdaa407bcb84 (patch)
tree28ccdd0be90ff9236fc57cf058a42d378ddbb250 /vnet/vnet/ipsec/ipsec.h
parent7f620976e2cb900fa5e0dccdbb769e3cc208841d (diff)
Add support for native vpp_lite (non-dpdk) platform
Change-Id: Icaa71957f67b923bc9795baa78c7495055615672 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'vnet/vnet/ipsec/ipsec.h')
-rw-r--r--vnet/vnet/ipsec/ipsec.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/vnet/vnet/ipsec/ipsec.h b/vnet/vnet/ipsec/ipsec.h
index 6ef36d02855..b755976f2b0 100644
--- a/vnet/vnet/ipsec/ipsec.h
+++ b/vnet/vnet/ipsec/ipsec.h
@@ -12,7 +12,9 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
+#if DPDK==1
#include <vnet/devices/dpdk/dpdk.h>
+#endif
#define foreach_ipsec_policy_action \
_(0, BYPASS, "bypass") \
@@ -237,9 +239,12 @@ int ipsec_set_interface_key(vnet_main_t * vnm, u32 hw_if_index, ipsec_if_set_key
always_inline void
ipsec_alloc_empty_buffers(vlib_main_t * vm, ipsec_main_t *im)
{
+#if DPDK==1
dpdk_main_t * dm = &dpdk_main;
u32 free_list_index = dm->vlib_buffer_free_list_index;
-
+#else
+ u32 free_list_index = VLIB_BUFFER_DEFAULT_FREE_LIST_INDEX;
+#endif
uword l = vec_len (im->empty_buffers);
uword n_alloc = 0;