X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=src%2Fplugins%2Fcnat%2Fcnat_session.h;h=fba28e5a241bf46af5059f8e91e55717fafe129e;hb=c2e7e4143ae662cd2426c322c2a85246eeefca1f;hp=a1f3486417d61d212ac4314d9415e5c73a4c5838;hpb=b040f98a88954ccf2e63fd7b2676865a2dbe0078;p=vpp.git diff --git a/src/plugins/cnat/cnat_session.h b/src/plugins/cnat/cnat_session.h index a1f3486417d..fba28e5a241 100644 --- a/src/plugins/cnat/cnat_session.h +++ b/src/plugins/cnat/cnat_session.h @@ -91,18 +91,36 @@ typedef struct cnat_session_t_ * Timestamp index this session was last used */ u32 cs_ts_index; - /** - * Indicates a return path session that was source NATed - * on the way in. - */ - u32 flags; + + union + { + /** + * session flags if cs_lbi == INDEX_INVALID + */ + u32 flags; + /** + * Persist translation->ct_lb.dpoi_next_node + * when cs_lbi != INDEX_INVALID + */ + u32 dpoi_next_node; + }; } value; } cnat_session_t; typedef enum cnat_session_flag_t_ { + /** + * Indicates a return path session that was source NATed + * on the way in. + */ CNAT_SESSION_FLAG_HAS_SNAT = (1 << 0), + /** + * This session source port was allocated, free it on cleanup + */ CNAT_SESSION_FLAG_ALLOC_PORT = (1 << 1), + /** + * This session doesn't have a client, do not attempt to free it + */ CNAT_SESSION_FLAG_NO_CLIENT = (1 << 2), } cnat_session_flag_t;