Store tenant id in the packet so that the output API's can log it.
/* tunnel packet ref count */
uint16_t tunnel_tpr_cnt;
+ /** tenant id for this packet, if any. If 0 then no tenant was assigned. */
+ uint32_t tenant_id;
+
/* The Packet pool from which this packet was allocated. Used when returning
* the packet to its owner's stack. If NULL, then allocated with malloc.
*/
(p)->livedev = NULL; \
PACKET_RESET_CHECKSUMS((p)); \
PACKET_PROFILING_RESET((p)); \
+ p->tenant_id = 0; \
} while (0)
#define PACKET_RECYCLE(p) do { \
uint32_t tenant_id = det_ctx->TenantGetId(det_ctx, p);
if (tenant_id > 0 && tenant_id < det_ctx->mt_det_ctxs_cnt) {
+ p->tenant_id = tenant_id;
+
det_ctx = det_ctx->mt_det_ctxs[tenant_id];
if (det_ctx == NULL)
return TM_ECODE_OK;