aboutsummaryrefslogtreecommitdiffstats
path: root/src/vnet/session
diff options
context:
space:
mode:
Diffstat (limited to 'src/vnet/session')
-rw-r--r--src/vnet/session/session.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/vnet/session/session.c b/src/vnet/session/session.c
index 31539dfd6c3..90248b64401 100644
--- a/src/vnet/session/session.c
+++ b/src/vnet/session/session.c
@@ -492,6 +492,11 @@ static inline int
session_enqueue_notify_inline (session_t * s)
{
app_worker_t *app_wrk;
+ u32 session_index;
+ u8 n_subscribers;
+
+ session_index = s->session_index;
+ n_subscribers = svm_fifo_n_subscribers (s->rx_fifo);
app_wrk = app_worker_get_if_valid (s->app_wrk_index);
if (PREDICT_FALSE (!app_wrk))
@@ -512,9 +517,12 @@ session_enqueue_notify_inline (session_t * s)
SESSION_IO_EVT_RX)))
return -1;
- if (PREDICT_FALSE (svm_fifo_n_subscribers (s->rx_fifo)))
- return session_notify_subscribers (app_wrk->app_index, s,
- s->rx_fifo, SESSION_IO_EVT_RX);
+ if (PREDICT_FALSE (n_subscribers))
+ {
+ s = session_get (session_index, vlib_get_thread_index ());
+ return session_notify_subscribers (app_wrk->app_index, s,
+ s->rx_fifo, SESSION_IO_EVT_RX);
+ }
return 0;
}
bold } /* Literal.Number.Float */ .highlight .mh { color: #0000DD; font-weight: bold } /* Literal.Number.Hex */ .highlight .mi { color: #0000DD; font-weight: bold } /* Literal.Number.Integer */ .highlight .mo { color: #0000DD; font-weight: bold } /* Literal.Number.Oct */ .highlight .sa { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Affix */ .highlight .sb { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Backtick */ .highlight .sc { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Char */ .highlight .dl { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Delimiter */ .highlight .sd { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Doc */ .highlight .s2 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Double */ .highlight .se { color: #0044dd; background-color: #fff0f0 } /* Literal.String.Escape */ .highlight .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
{
    "services": {
	    "test_fake_msg": {
		    "reply":"test_fake_msg_reply"
	    },
	    "test_fake_dump": {
		    "reply":"test_fake_details",
		    "stream":"true"
	    }
    },
    "enums" : [
    ],
    "enumflags" : [
    ],
    "unions" : [
    ],
    "types" : [
    ],
    "messages" : [
        ["test_fake_msg",
            ["u16", "_vl_msg_id"],
            ["u32", "client_index"],
            ["u32", "context"],
            ["u8", "dummy", 256],
            {"crc" : "0xcafebafe"}
        ],
        ["test_fake_msg_reply",
            ["u16", "_vl_msg_id"],
            ["u32", "context"],
            ["i32", "retval"],
            {"crc" : "0xcafebafe"}
        ],
	["test_fake_dump",
            ["u16", "_vl_msg_id"],
            ["u32", "client_index"],
            ["u32", "context"],
            ["u32", "dummy"],
            {"crc" : "0xcafebafe"}
	],
        ["test_fake_details",
            ["u16", "_vl_msg_id"],
            ["u32", "client_index"],
            ["u32", "context"],
            ["u32", "dummy"],
            {"crc" : "0xcafebafe"}
        ]
    ],
    "aliases" : {
    },
"vl_api_version" :"0x224c7aad"
}