MCPcopy Create free account
hub / github.com/F-Stack/f-stack / bridge_rthash

Function bridge_rthash

freebsd/net/if_bridge.c:2965–2980  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2963} while (/*CONSTCOND*/0)
2964
2965static __inline uint32_t
2966bridge_rthash(struct bridge_softc *sc, const uint8_t *addr)
2967{
2968 uint32_t a = 0x9e3779b9, b = 0x9e3779b9, c = sc->sc_rthash_key;
2969
2970 b += addr[5] << 8;
2971 b += addr[4];
2972 a += addr[3] << 24;
2973 a += addr[2] << 16;
2974 a += addr[1] << 8;
2975 a += addr[0];
2976
2977 mix(a, b, c);
2978
2979 return (c & BRIDGE_RTHASH_MASK);
2980}
2981
2982#undef mix
2983

Callers 2

bridge_rtnode_lookupFunction · 0.85
bridge_rtnode_insertFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected