-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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
- Loading branch information
Showing
1 changed file
with
42 additions
and
0 deletions.
There are no files selected for viewing
42 changes: 42 additions & 0 deletions
42
vpp-patches/0013-session-fix-populating-chained-buffers.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
From bbee13b6f04515ee42f066f3f0bfc6b675b5a9a3 Mon Sep 17 00:00:00 2001 | ||
From: Ivan Shvedunov <[email protected]> | ||
Date: Mon, 15 Mar 2021 19:05:14 +0300 | ||
Subject: [PATCH] session: fix populating chained buffers | ||
|
||
Type: fix | ||
|
||
Signed-off-by: Ivan Shvedunov <[email protected]> | ||
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 | ||
|