aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session/session_node.c
diff options
context:
space:
mode:
authorNathan Skrzypczak <nathan.skrzypczak@gmail.com>2019-06-19 13:42:37 +0200
committerFlorin Coras <florin.coras@gmail.com>2019-06-27 17:24:10 +0000
commite971bc9bab2d1be9e129caa585448bb81dc6541f (patch)
tree5911a1dfb5905c6169d6798b2b1dca21e84c6862 /src/vnet/session/session_node.c
parent706079c92abe2c218da15c13d2c933914af18d18 (diff)
session: Add transport vft protocol options
Type: refactor Change-Id: I4e0afc206e4871596c2ed8a6ca00914a379f1526 Signed-off-by: Nathan Skrzypczak <nathan.skrzypczak@gmail.com>
Diffstat (limited to 'src/vnet/session/session_node.c')
-rw-r--r--src/vnet/session/session_node.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/vnet/session/session_node.c b/src/vnet/session/session_node.c
index 067ab585e6f..8d01938ad85 100644
--- a/src/vnet/session/session_node.c
+++ b/src/vnet/session/session_node.c
@@ -395,7 +395,8 @@ session_tx_fifo_chain_tail (vlib_main_t * vm, session_tx_context_t * ctx,
}
else
{
- if (ctx->transport_vft->tx_type == TRANSPORT_TX_DGRAM)
+ if (ctx->transport_vft->transport_options.tx_type ==
+ TRANSPORT_TX_DGRAM)
{
svm_fifo_t *f = ctx->s->tx_fifo;
session_dgram_hdr_t *hdr = &ctx->hdr;
@@ -466,7 +467,7 @@ session_tx_fill_buffer (vlib_main_t * vm, session_tx_context_t * ctx,
}
else
{
- if (ctx->transport_vft->tx_type == TRANSPORT_TX_DGRAM)
+ if (ctx->transport_vft->transport_options.tx_type == TRANSPORT_TX_DGRAM)
{
session_dgram_hdr_t *hdr = &ctx->hdr;
svm_fifo_t *f = ctx->s->tx_fifo;
@@ -572,7 +573,7 @@ session_tx_set_dequeue_params (vlib_main_t * vm, session_tx_context_t * ctx,
}
else
{
- if (ctx->transport_vft->tx_type == TRANSPORT_TX_DGRAM)
+ if (ctx->transport_vft->transport_options.tx_type == TRANSPORT_TX_DGRAM)
{
if (ctx->max_dequeue <= sizeof (ctx->hdr))
{
@@ -782,7 +783,8 @@ session_tx_fifo_read_and_snd_i (vlib_main_t * vm, vlib_node_runtime_t * node,
if (svm_fifo_set_event (ctx->s->tx_fifo))
vec_add1 (wrk->pending_event_vector, *e);
- if (!peek_data && ctx->transport_vft->tx_type == TRANSPORT_TX_DGRAM)
+ if (!peek_data
+ && ctx->transport_vft->transport_options.tx_type == TRANSPORT_TX_DGRAM)
{
/* Fix dgram pre header */
if (ctx->max_len_to_snd < ctx->max_dequeue)