effhash(9)
π 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 π
- Kernel file
./net/can/af_can.cπ can_send(9)can_rcv_list_find(9)can_rx_register(9)can_rx_unregister(9)can_proto_register(9)can_proto_unregister(9)
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
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms