Attention is currently required from: laforge, pespin.
neels has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/36913?usp=email )
Change subject: add jhash.h, copied from linux/jhash.h ......................................................................
Patch Set 2:
(2 comments)
Patchset:
PS2:
I'm not saying we should do it one way or another, just raising the topic here.
I'm not sure either. We have large parts of msgb, the entire linuxlist and hashtable in static inline, so i guessed that's kind of the way to go. (maybe it compiles to more efficient code when inline??)
File include/osmocom/core/jhash.h:
https://gerrit.osmocom.org/c/libosmocore/+/36913/comment/074769d2_190c232e PS1, Line 100: c += osmo_load32le(k + 8);
Why don't you simply copy the following code in this same file instead of changing it? […]
... i couldn't find it =) ...
I guess we should *replace* our osmo_load32le with the above for LE machines? current (generated) osmo_load32le is implemented with a loop:
``` static inline uint32_t osmo_load32le_ext(const void *p, uint8_t n) { uint8_t i; uint32_t r = 0; const uint8_t *q = (uint8_t *)p; OSMO_ASSERT(n <= sizeof(r)); for(i = 0; i < n; r |= ((uint32_t)q[i] << (8 * i)), i++); return r; } ```