From ab480d0a7097f09f614f863e2af8b5b965200662 Mon Sep 17 00:00:00 2001 From: Zhiyong Yang Date: Mon, 3 Jun 2019 22:58:44 -0400 Subject: srp: leverage vlib_buffer_get_current Change-Id: I8e4592734cd8343cd95b32ad8617fed4aec3f590 Signed-off-by: Zhiyong Yang --- src/vnet/srp/node.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/vnet') diff --git a/src/vnet/srp/node.c b/src/vnet/srp/node.c index a852f61ab4d..35121cc61bf 100644 --- a/src/vnet/srp/node.c +++ b/src/vnet/srp/node.c @@ -167,8 +167,8 @@ srp_input (vlib_main_t * vm, b0 = vlib_get_buffer (vm, bi0); b1 = vlib_get_buffer (vm, bi1); - s0 = (void *) (b0->data + b0->current_data); - s1 = (void *) (b1->data + b1->current_data); + s0 = vlib_buffer_get_current (b0); + s1 = vlib_buffer_get_current (b1); /* Data packets are always assigned to side A (outer ring) interface. */ sw_if_index0 = vnet_buffer (b0)->sw_if_index[VLIB_RX]; @@ -229,7 +229,7 @@ srp_input (vlib_main_t * vm, b0 = vlib_get_buffer (vm, bi0); - s0 = (void *) (b0->data + b0->current_data); + s0 = vlib_buffer_get_current (b0); /* Data packets are always assigned to side A (outer ring) interface. */ sw_if_index0 = vnet_buffer (b0)->sw_if_index[VLIB_RX]; -- cgit 1.2.3-korg