diff options
author | Michal Mazur <mkm@semihalf.com> | 2018-01-11 18:32:32 +0100 |
---|---|---|
committer | Michal Mazur <mkm@semihalf.com> | 2018-01-17 21:51:41 +0100 |
commit | 571ce47d2afc1e138010dc62c21d10367555b2eb (patch) | |
tree | 9bce83222cc6dfbfba81a0b4c75888d11bdb8af7 /src/plugins/odp/node.c | |
parent | 374d34e4bdf2c90979e856baf114e8576f0eabe7 (diff) |
plugins: odp: Add support for buffer recycling
Buffers with VLIB_BUFFER_RECYCLE flag set should not be freed.
They are replicated on send and sent back to vlib for processing.
Change-Id: If381884fa7c898253f35dc3a39feeb4eb1529286
Signed-off-by: Michal Mazur <mkm@semihalf.com>
Diffstat (limited to 'src/plugins/odp/node.c')
-rwxr-xr-x | src/plugins/odp/node.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/odp/node.c b/src/plugins/odp/node.c index fea8bf6a..e0b468a2 100755 --- a/src/plugins/odp/node.c +++ b/src/plugins/odp/node.c @@ -179,6 +179,7 @@ odp_adjust_buffer (vlib_buffer_t * buf, odp_packet_t pkt, buf->current_data = 0; 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; vnet_buffer (buf)->sw_if_index[VLIB_RX] = oif->sw_if_index; vnet_buffer (buf)->sw_if_index[VLIB_TX] = (u32) ~ 0; } |