When using vppcom_session* apis to setup TCP sessions in applications build outside of the VPP repository, it is necessary to set the worker_index explicitly when these apis are called from the none-VCL worker threads. An example is when data is to be sent to the TCP session that is originated from a different thread, like the main program thread or from the bin api thread. This change allows the application to set it.
Type: fix
Signed-off-by: IJsbrand Wijnands <ice@cisco.com>
Change-Id: I37f3654a49ea9a8cf3a0d3d0e672583018c12299
vcl_set_worker_index (~0);
}
vcl_set_worker_index (~0);
}
+void
+vppcom_worker_index_set (int index)
+{
+ vcl_set_worker_index (index);
+}
+
int
vppcom_worker_index (void)
{
int
vppcom_worker_index (void)
{
*/
extern int vppcom_worker_index (void);
*/
extern int vppcom_worker_index (void);
+/**
+ * Set current worker index
+ */
+extern void vppcom_worker_index_set (int);
+
/**
* Returns the current worker's message queues epoll fd
*
/**
* Returns the current worker's message queues epoll fd
*