session vcl: refactor builtin tx event for main tx
[vpp.git] / src / vcl / vcl_private.h
index a3ae427..dabe52c 100644 (file)
@@ -660,6 +660,12 @@ vcl_session_clear_attr (vcl_session_t * s, u8 attr)
   s->attributes &= ~(1 << attr);
 }
 
+static inline session_evt_type_t
+vcl_session_dgram_tx_evt (vcl_session_t *s, session_evt_type_t et)
+{
+  return (s->flags & VCL_SESSION_F_CONNECTED) ? et : SESSION_IO_EVT_TX_MAIN;
+}
+
 /*
  * Helpers
  */