aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/acl/fa_node.h
diff options
context:
space:
mode:
authorAndrew Yourtchenko <ayourtch@gmail.com>2018-10-24 20:51:30 +0200
committerAndrew Yourtchenko <ayourtch@gmail.com>2018-10-24 21:21:19 +0200
commita6386d4ec41ed1ba14007a2e1a006f2d1533e0e0 (patch)
treeb05d919e6b0753a15eec0ad5a0eaf13fb797b8fc /src/plugins/acl/fa_node.h
parenta0f0c964049d16155a49ef4cf986a16c34acfaec (diff)
acl-plugin: introduce a format function for l4 session key
Abstracting out the internal format function for L4 session key type makes the other acl plugin format/print functions more maintainable. Change-Id: Ica1302263a42981555462b5338d18d9a9f9c8342 Signed-off-by: Andrew Yourtchenko <ayourtch@gmail.com>
Diffstat (limited to 'src/plugins/acl/fa_node.h')
-rw-r--r--src/plugins/acl/fa_node.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/plugins/acl/fa_node.h b/src/plugins/acl/fa_node.h
index 74b71b93cd9..57e102703d5 100644
--- a/src/plugins/acl/fa_node.h
+++ b/src/plugins/acl/fa_node.h
@@ -79,6 +79,17 @@ typedef union {
};
} fa_5tuple_t;
+static_always_inline u8 *
+format_fa_session_l4_key(u8 * s, va_list * args)
+{
+ fa_session_l4_key_t *l4 = va_arg (*args, fa_session_l4_key_t *);
+
+ return (format (s, "l4 lsb_of_sw_if_index %d proto %d l4_is_input %d l4_slow_path %d reserved0 0x%02x port %d -> %d",
+ l4->lsb_of_sw_if_index,
+ l4->proto, l4->is_input, l4->is_slowpath,
+ l4->reserved0, l4->port[0], l4->port[1]));
+}
+
typedef struct {
fa_5tuple_t info; /* (5+1)*8 = 48 bytes */
u64 last_active_time; /* +8 bytes = 56 */