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)
Thu, Oct 9, 12:01 AM
Unknown Object (File)
Thu, Oct 2, 12:44 AM
Unknown Object (File)
Tue, Sep 30, 8:48 PM
Unknown Object (File)
Tue, Sep 30, 5:25 PM
Unknown Object (File)
Tue, Sep 30, 1:44 PM
Unknown Object (File)
Tue, Sep 30, 11:31 AM
Unknown Object (File)
Thu, Sep 11, 1:26 PM
Unknown Object (File)
Sep 2 2025, 12:03 PM

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.