From 861eeb3429e558aa92724eb56c268913303f10fb Mon Sep 17 00:00:00 2001 From: Ivan Shvedunov Date: Fri, 19 Mar 2021 18:52:22 +0300 Subject: [PATCH] Add downstream fix for UDP buffer chaining Upstream CR: https://gerrit.fd.io/r/c/vpp/+/31647 (merged) vpp-dev thread: https://lists.fd.io/g/vpp-dev/message/18921 --- ...ssion-fix-populating-chained-buffers.patch | 42 +++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 vpp-patches/0013-session-fix-populating-chained-buffers.patch diff --git a/vpp-patches/0013-session-fix-populating-chained-buffers.patch b/vpp-patches/0013-session-fix-populating-chained-buffers.patch new file mode 100644 index 0000000..ba6ca18 --- /dev/null +++ b/vpp-patches/0013-session-fix-populating-chained-buffers.patch @@ -0,0 +1,42 @@ +From bbee13b6f04515ee42f066f3f0bfc6b675b5a9a3 Mon Sep 17 00:00:00 2001 +From: Ivan Shvedunov +Date: Mon, 15 Mar 2021 19:05:14 +0300 +Subject: [PATCH] session: fix populating chained buffers + +Type: fix + +Signed-off-by: Ivan Shvedunov +Change-Id: I3fdc1711d508bc5b0c2f56b3bd3fb4a56056eb54 +--- + src/vnet/session/session_node.c | 8 +++++--- + 1 file changed, 5 insertions(+), 3 deletions(-) + +diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c +index 2fde85b03..0add12b97 100644 +--- a/src/vnet/session/session_node.c ++++ b/src/vnet/session/session_node.c +@@ -630,16 +630,18 @@ session_tx_fifo_chain_tail (vlib_main_t * vm, session_tx_context_t * ctx, + svm_fifo_t *f = ctx->s->tx_fifo; + session_dgram_hdr_t *hdr = &ctx->hdr; + u16 deq_now; ++ u32 offset; ++ + deq_now = clib_min (hdr->data_length - hdr->data_offset, + len_to_deq); +- n_bytes_read = svm_fifo_peek (f, hdr->data_offset, deq_now, +- data); ++ offset = hdr->data_offset + SESSION_CONN_HDR_LEN; ++ n_bytes_read = svm_fifo_peek (f, offset, deq_now, data); + ASSERT (n_bytes_read > 0); + + hdr->data_offset += n_bytes_read; + if (hdr->data_offset == hdr->data_length) + { +- u32 offset = hdr->data_length + SESSION_CONN_HDR_LEN; ++ offset = hdr->data_length + SESSION_CONN_HDR_LEN; + svm_fifo_dequeue_drop (f, offset); + if (ctx->left_to_snd > n_bytes_read) + svm_fifo_peek (ctx->s->tx_fifo, 0, sizeof (ctx->hdr), +-- +2.30.2 +