astlpc: Add packet transmission debugging statements

Useful to track and debug the buffer handover interactions between the
endpoints.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: I82354782bb88adbb5797c1173f266a271855b3d7
diff --git a/astlpc.c b/astlpc.c
index 6a5c436..ce94bf8 100644
--- a/astlpc.c
+++ b/astlpc.c
@@ -3,6 +3,7 @@
 #include <assert.h>
 #include <endian.h>
 #include <err.h>
+#include <inttypes.h>
 #include <stdbool.h>
 #include <stdlib.h>
 #include <string.h>
@@ -172,8 +173,14 @@
 {
 	struct mctp_binding_astlpc *astlpc = binding_to_astlpc(b);
 	uint32_t len;
+	struct mctp_hdr *hdr;
 
+	hdr = mctp_pktbuf_hdr(pkt);
 	len = mctp_pktbuf_size(pkt);
+
+	mctp_prdebug("%s: Transmitting %"PRIu32"-byte packet (%hhu, %hhu, 0x%hhx)",
+		     __func__, len, hdr->src, hdr->dest, hdr->flags_seq_tag);
+
 	if (len > rx_size - 4) {
 		mctp_prwarn("invalid TX len 0x%x", len);
 		return -1;
@@ -274,6 +281,8 @@
 		return -1;
 	}
 
+	mctp_prdebug("%s: status: 0x%hhx", __func__, status);
+
 	if (!(status & KCS_STATUS_IBF))
 		return 0;
 
@@ -284,6 +293,8 @@
 		return -1;
 	}
 
+	mctp_prdebug("%s: data: 0x%hhx", __func__, data);
+
 	switch (data) {
 	case 0x0:
 		mctp_astlpc_init_channel(astlpc);