Page MenuHomeFreeBSD

LinuxKPI: add ether_addr_equal_unaligned()
ClosedPublic

Authored by bz on May 24 2021, 6:23 PM.
Tags
None
Referenced Files
F132639046: D30425.id89780.diff
Sat, Oct 18, 4:08 PM
Unknown Object (File)
Wed, Oct 15, 4:47 PM
Unknown Object (File)
Wed, Oct 15, 4:47 PM
Unknown Object (File)
Wed, Oct 15, 4:47 PM
Unknown Object (File)
Wed, Oct 15, 4:47 PM
Unknown Object (File)
Wed, Oct 15, 6:01 AM
Unknown Object (File)
Sun, Oct 12, 5:12 PM
Unknown Object (File)
Thu, Oct 9, 12:01 AM

Details

Summary

Add a #define for ether_addr_equal_unaligned() founf in wireless
drivers. ether_addr_equal() already uses memcmp() so we should be
fine for unaligned accessed.

Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Reviewed by:
Differential Revision:

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

bz requested review of this revision.May 24 2021, 6:23 PM

founf -> found

Should we do this the other way, making ether_addr_equal_unaligned the inline fn and ether_addr_equal a #define, so that ether_addr_equal can't be accidentally broken?

hselasky added inline comments.
sys/compat/linuxkpi/common/include/linux/etherdevice.h
89

Too many parenthesis (not needed here)!
((_pa), (_pb)) -> (_pa, _pb)

Switch the implementation and define as suggested by @emaste.
Revmove extra () as pointed out by @hselasky.

bz marked an inline comment as done.May 24 2021, 9:39 PM
This revision is now accepted and ready to land.May 25 2021, 7:39 AM
This revision was automatically updated to reflect the committed changes.