Page MenuHomeFreeBSD

LinuxKPI: add ether_addr_equal_unaligned()
ClosedPublic

Authored by bz on May 24 2021, 6:23 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sat, Dec 21, 3:26 PM
Unknown Object (File)
Wed, Dec 4, 11:26 AM
Unknown Object (File)
Nov 18 2024, 9:29 PM
Unknown Object (File)
Oct 2 2024, 8:05 AM
Unknown Object (File)
Oct 2 2024, 6:00 AM
Unknown Object (File)
Sep 30 2024, 11:24 PM
Unknown Object (File)
Sep 27 2024, 4:14 PM
Unknown Object (File)
Sep 27 2024, 3:52 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.