aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_node.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2019-02-05 15:51:15 -0800
committerDamjan Marion <dmarion@me.com>2019-02-06 16:56:39 +0000
commit1ee7830e9ee8a62800822b6f5224d66243b916d4 (patch)
tree4629a50ea18dd0185f5a5de7d57a8120b1913be1 /src/vnet/session/session_node.c
parent696d760865980d8191d11b562a5e431e4c4665af (diff)
transport: cleanup
- move transport specific types to transport_types - add transport wrapper functions for interaction with transport protocol vfts Change-Id: I93f70d884585fc2f41c4a605e310c80e8a8972f2 Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vnet/session/session_node.c')
-rw-r--r--src/vnet/session/session_node.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c
index fa33ad37f1e..286bd7b32e0 100644
--- a/src/vnet/session/session_node.c
+++ b/src/vnet/session/session_node.c
@@ -447,7 +447,7 @@ session_tx_fill_buffer (vlib_main_t * vm, session_tx_context_t * ctx,
b->flags = VNET_BUFFER_F_LOCALLY_ORIGINATED;
b->current_data = 0;
- data0 = vlib_buffer_make_headroom (b, MAX_HDRS_LEN);
+ data0 = vlib_buffer_make_headroom (b, TRANSPORT_MAX_HDRS_LEN);
len_to_deq = clib_min (ctx->left_to_snd, ctx->deq_per_first_buf);
if (peek_data)
@@ -606,12 +606,13 @@ session_tx_set_dequeue_params (vlib_main_t * vm, session_tx_context_t * ctx,
}
n_bytes_per_buf = VLIB_BUFFER_DATA_SIZE;
- ASSERT (n_bytes_per_buf > MAX_HDRS_LEN);
- n_bytes_per_seg = MAX_HDRS_LEN + ctx->snd_mss;
+ ASSERT (n_bytes_per_buf > TRANSPORT_MAX_HDRS_LEN);
+ n_bytes_per_seg = TRANSPORT_MAX_HDRS_LEN + ctx->snd_mss;
ctx->n_bufs_per_seg = ceil ((f64) n_bytes_per_seg / n_bytes_per_buf);
ctx->deq_per_buf = clib_min (ctx->snd_mss, n_bytes_per_buf);
ctx->deq_per_first_buf = clib_min (ctx->snd_mss,
- n_bytes_per_buf - MAX_HDRS_LEN);
+ n_bytes_per_buf -
+ TRANSPORT_MAX_HDRS_LEN);
}
always_inline int