aboutsummaryrefslogtreecommitdiffstats
path: root/src/examples/srv6-sample-localsid
diff options
context:
space:
mode:
authorSteven <sluong@cisco.com>2018-09-26 10:56:46 -0700
committerDamjan Marion <dmarion@me.com>2018-09-27 12:10:50 +0000
commit258c2f6c6339d5261d3b4edc9197cbbf9157378e (patch)
tree1ead841271e34a457aa684a261ca18b5179a3e05 /src/examples/srv6-sample-localsid
parentbaf740512aa6f3e8c81484b5e914b77200db21d9 (diff)
avf: may crash if failed to allocate buffers to ring
In avf_rxq_refill, we invoke vlib_buffer_alloc_to_ring which may fill buffers from the end of the ring and continue to the beginning of the ring. If we fill some in the end and continue to fill some in the beginning, but does not have enough buffers to fill the whole request, n_alloc returns a value which is not equal to n_refill to indicate partial refill. We don't like partial refill and invoke vlib_buffer_free to get rid of the buffers that just got refilled. However, vlib_buffer_free API is to free the buffers from the slot continuously. It does not know how to free some from rxq->bufs[slot], and then continue to free the rest when it reaches the end of the ring. The fix is to use vlib_buffer_free_from_ring which is smart enough to figure that stuff out. Change-Id: I93c28e0b0d8d8f22c321d1a5912e00c27b4e2e8d Signed-off-by: Steven <sluong@cisco.com>
Diffstat (limited to 'src/examples/srv6-sample-localsid')
0 files changed, 0 insertions, 0 deletions