libmctp: Split padding in pktbuf into header and trailer
The astlpc binding will shortly make use of a medium-specific trailer to
implement a CRC-32 integrity check over packet data. Allow for
medium-specific trailer data in the pktbuf in order to remove the need
for a bounce-buffer. The binding will trim the pktbuf to the payload
length before passing the instance up the stack.
Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Change-Id: Ib215a552ff218b007f7f119c5235fbc75d9ca6cb
diff --git a/astlpc.c b/astlpc.c
index 93e5271..95d8701 100644
--- a/astlpc.c
+++ b/astlpc.c
@@ -1049,7 +1049,8 @@
astlpc->binding.version = 1;
astlpc->binding.pkt_size =
MCTP_PACKET_SIZE(mtu > MCTP_BTU ? mtu : MCTP_BTU);
- astlpc->binding.pkt_pad = 0;
+ astlpc->binding.pkt_header = 0;
+ astlpc->binding.pkt_trailer = 0;
astlpc->binding.tx = mctp_binding_astlpc_tx;
if (mode == MCTP_BINDING_ASTLPC_MODE_BMC)
astlpc->binding.start = mctp_binding_astlpc_start_bmc;