aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBenoît Ganne <bganne@cisco.com>2021-06-23 13:45:25 +0200
committerDamjan Marion <dmarion@me.com>2021-06-30 18:57:59 +0000
commit44d524f941c8070c2a04301f832a129984fe4c96 (patch)
tree10bafc2fa174d45a1d5de0c15a5763d9a6ccdc63 /src
parent734268f484d8deb5d2054dadc890e48b26f77feb (diff)
memif: fix chain buffer length in zero-copy mode
The total_length_not_including_first_buffer field must be reset before being updated otherwise it will quicly grows as stale values are reused. Type: fix Change-Id: Ic48c0822660998b0dfc0b5fdeadae6071b2d03f7 Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src')
-rw-r--r--src/plugins/memif/node.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/plugins/memif/node.c b/src/plugins/memif/node.c
index c7ad9740b02..a69ab7f7c2c 100644
--- a/src/plugins/memif/node.c
+++ b/src/plugins/memif/node.c
@@ -587,6 +587,7 @@ memif_device_input_zc_inline (vlib_main_t *vm, vlib_node_runtime_t *node,
if (PREDICT_FALSE ((d0->flags & MEMIF_DESC_FLAG_NEXT) && n_slots))
{
hb->flags |= VLIB_BUFFER_TOTAL_LENGTH_VALID;
+ hb->total_length_not_including_first_buffer = 0;
next_slot:
s0 = cur_slot & mask;
d0 = &ring->desc[s0];