[Bug 1844] Invalid MP packet prefix for message queues
bugzilla-daemon at rtems.org
bugzilla-daemon at rtems.org
Thu Jul 21 07:36:07 UTC 2011
https://www.rtems.org/bugzilla/show_bug.cgi?id=1844
Sebastian Huber <sebastian.huber at embedded-brains.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
Summary|MP_PACKET_MINIMUM_PACKET_SI |Invalid MP packet prefix
|ZE too small |for message queues
--- Comment #1 from Sebastian Huber <sebastian.huber at embedded-brains.de> 2011-07-21 02:36:07 CDT ---
It seems that the MP_PACKET_MINIMUM_PACKET_SIZE is not too small. The
Message_queue_MP_Packet
typedef struct {
rtems_packet_prefix Prefix;
Message_queue_MP_Remote_operations operation;
rtems_name name;
rtems_option option_set;
Objects_Id proxy_id;
uint32_t count;
size_t size;
uint32_t pad0;
CORE_message_queue_Buffer Buffer;
} Message_queue_MP_Packet;
contains a CORE_message_queue_Buffer which is
typedef struct {
/** This field is the size of this message. */
size_t size;
/** This field contains the actual message. */
uint32_t buffer[1];
} CORE_message_queue_Buffer;
Thus the sizeof(CORE_message_queue_Buffer) is actually not that useful. On the
other hand we have the pad0 field. What is the use of this field? To put the
buffer begin on a 64 byte alignment?
I think that the packet setup in _Message_queue_MP_Send_request_packet() is
wrong. Here we have
the_packet->Prefix.length = sizeof(Message_queue_MP_Packet);
if ( size_p )
the_packet->Prefix.length += *size_p;
the_packet->Prefix.to_convert = sizeof(Message_queue_MP_Packet);
and
the_packet->Prefix.length = sizeof(Message_queue_MP_Packet);
the_packet->Prefix.to_convert = sizeof(Message_queue_MP_Packet);
This will convert one 32-bit word of the message, due to the unsuitable usage
of sizeof() in this particular case?
--
Configure bugmail: https://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the bugs
mailing list