增加一些debug日志

This commit is contained in:
崔一鸣
2019-06-05 11:32:11 +08:00
parent 03a5f7ec6c
commit 0ccc62fe08
3 changed files with 55 additions and 21 deletions

View File

@@ -157,7 +157,6 @@ int kni_cmsg_deserialize(const unsigned char *data, uint16_t len, struct kni_cms
cmsg = ALLOC(struct kni_cmsg, 1);
offset = sizeof(struct kni_cmsg_serialize_header);
nr_tlvs = ntohs(header->nr_tlvs);
printf("nr_tlvs is %d\n", nr_tlvs);
for(int i = 0; i < nr_tlvs; i++)
{
struct kni_cmsg_tlv *tlv = (struct kni_cmsg_tlv*)(data + offset);
@@ -166,7 +165,6 @@ int kni_cmsg_deserialize(const unsigned char *data, uint16_t len, struct kni_cms
goto error_out;
}
uint16_t type = ntohs(tlv->type);
printf("type = %d\n", type);
uint16_t length = ntohs(tlv->length);
if(length < sizeof(struct kni_cmsg_tlv) || offset + length > len)
{