Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align all software bus message definitions #689

Closed
jphickey opened this issue May 8, 2020 · 1 comment
Closed

Align all software bus message definitions #689

jphickey opened this issue May 8, 2020 · 1 comment

Comments

@jphickey
Copy link
Contributor

jphickey commented May 8, 2020

Is your feature request related to a problem? Please describe.
As an extension to the changes in issue #666/pull #678, the same paradigm should be applied to all other message definitions. This is currently only working "by chance" in that the payloads already contain a uint32 (or larger) value so it is already aligned.

Describe the solution you'd like
Change the header structure which is currently defined as a uint8 [] array into either CFE_SB_CmdHdr_t or CFE_SB_TlmHdr_t so it will be correctly aligned.

Additional context
It is safe to assume all remaining message types were already 32-bit aligned because there were no remaining compiler warnings about this, which means this change by itself will not have any effect on the existing message sizes or alignment.

However, when moving to a 64-bit build it may become necessary to enforce 64-bit alignment rather than 32-bit alignment for CFE_SB_Msg_t and in that case, the sizes and padding may change from what it currently is.

Requester Info
Joseph Hickey, Vantage Systems, Inc.

@jphickey jphickey self-assigned this May 8, 2020
jphickey added a commit to jphickey/cFE that referenced this issue May 8, 2020
Replace uint8[] arrays which reserve space for the header
with an instance of the header struct as defined by SB.

Note this structure was the basis for the array size,
so it is the same size, but by actually using the structure
the resulting message will have the correct alignment.
@skliper skliper added this to the 6.8.0 milestone May 8, 2020
jphickey added a commit to jphickey/cFE that referenced this issue May 18, 2020
Replace uint8[] arrays which reserve space for the header
with an instance of the header struct as defined by SB.

Note this structure was the basis for the array size,
so it is the same size, but by actually using the structure
the resulting message will have the correct alignment.
@skliper skliper modified the milestones: 6.8.0, 7.0.0 Jun 5, 2020
@skliper skliper removed this from the 7.0.0 milestone Nov 30, 2020
@skliper
Copy link
Contributor

skliper commented Nov 30, 2020

This is OBE, no longer enforcing worst case alignment in all messages per #1009.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants