port: make port_c_entry not PACKED
PACKED structures don't have padding between their members and after the structure (needed to be able to store them in an array). Port_c_entry was PACKED, since it does not have padding between its members anyway, and the padding in the end was not needed, because these objects are never stored in an array. As a result, sizeof(port_c_entry) was not aligned too. Appeared, that mempool, used to allocate port_c_entry objects, can't work correctly, when object size is not aligned at least by 8 bytes. Because mempool does not do any alignment internally, and uses the free objects as a temporary storage for some metadata, requiring 8 byte alignment. The patch removes PACKED attribute from port_c_entry, so now its size is aligned by 8 bytes, and mempool works fine. Part of #4609
Loading
Please register or sign in to comment