effhash(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… effhash(9) β€” Kernel API Manual πŸŽ€

okay bestie, welcome to effhash(9) β€” yes, the manual name is effhash and the manual section is 9 (that's the kernel-API section, iykyk). we're gonna get into it.


✨ NAME ✨

effhash β€” a hash function made specifically for 29 bit CAN identifier reduction πŸš—πŸ’¨

fr fr that's the whole job. that's what she does.


🌸 SYNOPSIS 🌸

unsigned int effhash (canid_t can_id );

like, that's it. so clean. so iconic. 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • can_id β€” a 29 bit CAN identifier ⭐

that's the one and only thing you hand her.


🧚 DESCRIPTION 🧚

okay so here's the situation, and honestly? it's giving optimization arc.

there's this one linked list of single EFF CAN frame subscriptions, right, and walking that thing linearly was lowkey a lot. so the move is: map that whole 29 bit identifier down to 10 bits. ten bits. tiny. adorable. manageable. πŸŽ€

literally all she's doing is squishing the id down so the lookup doesn't have to trawl through the whole list like it's scrolling forever.

bestie, this bit-width situation is defined in the CAN_EFF_RCV_HASH_BITS definition β€” go say hi to it if you want the details πŸ‘€

πŸ”₯ RETURN πŸ”₯

the hash value, ranging from 0x000 – 0x3FF πŸ’–

and ngl, that range is enforced by the CAN_EFF_RCV_HASH_BITS mask β€” so don't go expecting her to hand you back anything outside it, because she won't. no cap. πŸ™ˆ


🌈 SEE ALSO 🌈

go read those too, they're all part of the same little friend group πŸ’œ


and that's the whole page, bestie! this one came out of the ./net/can directory, dated October 2026, and it's registered as effhash(9). slay, go hash responsibly πŸ’…βœ¨

πŸ“¦ where this page comes from