aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorZhiyong Yang <zhiyong.yang@intel.com>2019-05-30 02:22:49 -0400
committerZhiyong Yang <zhiyong.yang@intel.com>2019-05-30 02:22:49 -0400
commitfe5974bd881f52cdc3744710c3d6c20c0a25d4f0 (patch)
treea4a1790b5b84738874e7b22af96afbaa60f25136 /src
parentebae4196b2a4cd7470ec2ec8ade9b375a894eee7 (diff)
osi_input: leverage vlib_buffer_get_current
Change-Id: Ib9297b712ff7d08bf085fb0b6c9e6ffd83c5fa57 Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Diffstat (limited to 'src')
-rw-r--r--src/vnet/osi/node.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/vnet/osi/node.c b/src/vnet/osi/node.c
index 12075aa87d1..bdeab2df074 100644
--- a/src/vnet/osi/node.c
+++ b/src/vnet/osi/node.c
@@ -131,8 +131,8 @@ osi_input (vlib_main_t * vm,
b0 = vlib_get_buffer (vm, bi0);
b1 = vlib_get_buffer (vm, bi1);
- h0 = (void *) (b0->data + b0->current_data);
- h1 = (void *) (b1->data + b1->current_data);
+ h0 = vlib_buffer_get_current (b0);
+ h1 = vlib_buffer_get_current (b1);
next0 = lm->input_next_by_protocol[h0->protocol];
next1 = lm->input_next_by_protocol[h1->protocol];
@@ -201,7 +201,7 @@ osi_input (vlib_main_t * vm,
b0 = vlib_get_buffer (vm, bi0);
- h0 = (void *) (b0->data + b0->current_data);
+ h0 = vlib_buffer_get_current (b0);
next0 = lm->input_next_by_protocol[h0->protocol];