diff options
author | Aritra Basu <aritrbas@cisco.com> | 2024-09-09 21:47:26 -0700 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2024-09-13 21:22:10 +0000 |
commit | 6f45f5465f219cb55f0f095c420aae469e550f7f (patch) | |
tree | baaa8a167db282951f1eae9cd6bea93272ff8080 /src/plugins/http/http_plugin.rst | |
parent | 6fbe913e45ff252f5d6497eb81cdcf139afc0d5d (diff) |
http: update body_len from u32 to u64
Type: improvement
Change-Id: I381541fb180d6d6ba42e4d231d22a73c5d33ef65
Signed-off-by: Aritra Basu <aritrbas@cisco.com>
Diffstat (limited to 'src/plugins/http/http_plugin.rst')
-rw-r--r-- | src/plugins/http/http_plugin.rst | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/plugins/http/http_plugin.rst b/src/plugins/http/http_plugin.rst index feb2c7fe039..56da3a810b9 100644 --- a/src/plugins/http/http_plugin.rst +++ b/src/plugins/http/http_plugin.rst @@ -152,7 +152,7 @@ We will add following members to our session context structure: typedef struct { /* ... */ - u32 to_recv; + u64 to_recv; u8 *resp_body; } session_ctx_t; @@ -174,7 +174,7 @@ Now we can start reading body content, following block of code could be executed /* dequeue */ u32 n_deq = svm_fifo_max_dequeue (ts->rx_fifo); /* current offset */ - u32 curr = vec_len (ctx->resp_body); + u64 curr = vec_len (ctx->resp_body); rv = svm_fifo_dequeue (ts->rx_fifo, n_deq, ctx->resp_body + curr); ASSERT (rv == n_deq); /* update length of the vector */ @@ -464,7 +464,7 @@ We will add following members to our session context structure: typedef struct { /* ... */ - u32 to_recv; + u64 to_recv; u8 *resp_body; } session_ctx_t; @@ -487,7 +487,7 @@ Now we can start reading body content, following block of code could be executed u32 max_deq = svm_fifo_max_dequeue (ts->rx_fifo); u32 n_deq = clib_min (to_recv, max_deq); /* current offset */ - u32 curr = vec_len (ctx->resp_body); + u64 curr = vec_len (ctx->resp_body); rv = svm_fifo_dequeue (ts->rx_fifo, n_deq, ctx->resp_body + curr); if (rv < 0 || rv != n_deq) { |