Page MenuHomeFreeBSD

LinuxKPI: add ether_addr_equal_unaligned()
ClosedPublic

Authored by bz on May 24 2021, 6:23 PM.
Tags
None
Referenced Files
F81629347: D30425.diff
Fri, Apr 19, 6:01 AM
Unknown Object (File)
Tue, Apr 2, 11:19 AM
Unknown Object (File)
Mar 5 2024, 11:43 AM
Unknown Object (File)
Feb 22 2024, 11:14 AM
Unknown Object (File)
Feb 16 2024, 2:19 PM
Unknown Object (File)
Dec 22 2023, 11:51 PM
Unknown Object (File)
Dec 14 2023, 10:25 PM
Unknown Object (File)
Dec 13 2023, 4:04 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.