diff options
author | Szymon Sliwa <szs@semihalf.com> | 2018-01-24 14:05:06 +0100 |
---|---|---|
committer | Szymon Sliwa <szs@semihalf.com> | 2018-02-19 17:47:48 +0100 |
commit | 84cc712ed30960bd4b4598ce387fc9ed6a610987 (patch) | |
tree | f4e3a9bed98f9c54b65e7069a00883f73d577c65 /src/plugins/odp/node.c | |
parent | 97495b8966f4b25959719e3e1570b3f5942b1d64 (diff) |
plugins: odp: Add support for IPsec inline operation
To use inline mode put inline flag in the odp section
of the startup.conf file, like this:
odp {
enable-odp-ipsec
inline
}
Falls back to lookaside mode.
Change-Id: I1292a7254b25a15b25285773a43bae112394827d
Signed-off-by: Szymon Sliwa <szs@semihalf.com>
Diffstat (limited to 'src/plugins/odp/node.c')
-rwxr-xr-x | src/plugins/odp/node.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/plugins/odp/node.c b/src/plugins/odp/node.c index e0b468a2..322aeb7d 100755 --- a/src/plugins/odp/node.c +++ b/src/plugins/odp/node.c @@ -177,6 +177,8 @@ odp_adjust_buffer (vlib_buffer_t * buf, odp_packet_t pkt, { buf->current_length = odp_packet_len (pkt); buf->current_data = 0; + buf->current_data = (int) ((intptr_t) odp_packet_data (pkt) - + (intptr_t) buf->data); buf->total_length_not_including_first_buffer = 0; buf->flags = VLIB_BUFFER_TOTAL_LENGTH_VALID; buf->free_list_index = VLIB_BUFFER_DEFAULT_FREE_LIST_INDEX; @@ -355,8 +357,9 @@ odp_packet_device_input_fn (vlib_main_t * vm, vlib_node_runtime_t * node, else next0 = odp_rx_next_from_etype (pkt, b0); - if (next0 != VNET_DEVICE_INPUT_NEXT_ETHERNET_INPUT) - vlib_buffer_advance (b0, sizeof (ethernet_header_t)); + b0->current_data = (int) ((intptr_t) odp_packet_data (pkt) - + (intptr_t) b0->data); + vlib_buffer_advance (b0, sizeof (ethernet_header_t)); /* trace */ ODP_TRACE_BUFFER (n_trace, b0, next0, vm, node, oif); |