I am reading openflow-spec-v1.3.0, and in page 37 there are a few codes as
follow:

/* Full description for a queue. */
> struct ofp_packet_queue {
> uint32_t queue_id;
> /* id for the specific queue. */
> uint32_t port;
> /* Port this queue is attached to. */
> uint16_t len;
> /* Length in bytes of this queue desc. */
> uint8_t pad[6];
> /* 64-bit alignment. */
> struct ofp_queue_prop_header properties[0]; /* List of properties. */
> };
> OFP_ASSERT(sizeof(struct ofp_packet_queue) == 16);


 In my opinion, sizeof(struct ofp_packet_queue) = sizeof(queue_id) +
sizeof(port) + sizeof(len) + sizeof(pad[]) + sizeof(properties) = 4 + 4 + 2
+ 6 + 4 = 20

But the ASSERT is sizeof(struct ofp_packet_queue) == 16.

Is there anyone can point out my misunderstanding?

Thanks!

-- 


Thanks.

Best Regards,

Qingxiang Lin(林清祥)
------
Graduate
College of Mathematics and Computer Science, FZU
_______________________________________________
discuss mailing list
discuss@openvswitch.org
http://openvswitch.org/mailman/listinfo/discuss

Reply via email to