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

eui48: fix type alignment #10820

Merged
merged 1 commit into from
Jan 18, 2019
Merged

Conversation

miri64
Copy link
Member

@miri64 miri64 commented Jan 18, 2019

Contribution description

This tries to fix the type alignment of the eui48_t type, as pointed out #10817 (comment). The uint16 union member isn't used anywhere in the codebase and the module is quite new (it was introduced in #10567 so within this release cycle), so I think it's safe to be removed.

Testing procedure

Ethernet-based boards like native should still be able to handle their addresses (check ifconfig in gnrc_networking, try pinging another node).

Issues/PRs references

Found in #10817 (comment).

@miri64 miri64 added Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors) Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Jan 18, 2019
@miri64 miri64 added this to the Release 2019.01 milestone Jan 18, 2019
Copy link
Member

@maribu maribu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This indeed reduces the alignment requirement for eui48_t from two byte to one byte, which allows to safely cast any uint8_t array of correct size to eui48_t :-)

@maribu maribu added Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Reviewed: 5-documentation The documentation details of the PR were reviewed according to the maintainer guidelines labels Jan 18, 2019
@maribu
Copy link
Member

maribu commented Jan 18, 2019

Can still ping the most widely used search enging's IPv6 address from my Nucleo-F303RE using the enc28j60 driver and a break-out board :-)

@maribu maribu added the Reviewed: 3-testing The PR was tested according to the maintainer guidelines label Jan 18, 2019
@maribu maribu merged commit c2cda28 into RIOT-OS:master Jan 18, 2019
@miri64 miri64 deleted the eui48/fix/type-alignment branch January 18, 2019 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Reviewed: 1-fundamentals The fundamentals of the PR were reviewed according to the maintainer guidelines Reviewed: 2-code-design The code design of the PR was reviewed according to the maintainer guidelines Reviewed: 3-testing The PR was tested according to the maintainer guidelines Reviewed: 4-code-style The adherence to coding conventions by the PR were reviewed according to the maintainer guidelines Reviewed: 5-documentation The documentation details of the PR were reviewed according to the maintainer guidelines Type: bug The issue reports a bug / The PR fixes a bug (including spelling errors)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants