From 85658c815726617d90b11e7063588f4eaa28d895 Mon Sep 17 00:00:00 2001 From: Thomas Schoebel-Theuer Date: Sat, 6 Dec 2014 08:12:02 +0100 Subject: [PATCH] net: speakyness add dump_meta() --- kernel/mars_net.c | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/kernel/mars_net.c b/kernel/mars_net.c index f5df226e..2fb3a741 100644 --- a/kernel/mars_net.c +++ b/kernel/mars_net.c @@ -646,6 +646,22 @@ EXPORT_SYMBOL_GPL(mars_recv_raw); /* Mid-level field data exchange */ +static +void dump_meta(const struct meta *meta) +{ + int count = 0; + for (; meta->field_name != NULL; meta++) { + MARS_ERR("%2d %4d %4d %p '%s'\n", + meta->field_type, + meta->field_size, + meta->field_offset, + meta->field_ref, + meta->field_name); + count++; + } + MARS_ERR("-------- %d fields.\n", count); +} + static int _add_fields(struct mars_desc_item *mi, const struct meta *meta, int offset, const char *prefix, int maxlen) { @@ -1040,6 +1056,8 @@ int desc_recv_struct(struct mars_socket *msock, void *data, const struct meta *m goto err; } else if (unlikely(mc->cache_recver_cookie != (u64)meta)) { MARS_ERR("#%d protocol error %p != %p\n", msock->s_debug_nr, meta, (void*)mc->cache_recver_cookie); + dump_meta((void*)mc->cache_recver_cookie); + dump_meta(meta); status = -EPROTO; goto err; }