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

Function in6_pcbgroup_byhash

freebsd/netinet6/in6_pcbgroup.c:74–89  ·  view source on GitHub ↗

* Map a (hashtype, hash) tuple into a connection group, or NULL if the hash * information is insufficient to identify the pcbgroup. This might occur if * a TCP packet turnsup with a 2-tuple hash, or if an RSS hash is present but * RSS is not compiled into the kernel. */

Source from the content-addressed store, hash-verified

72 * RSS is not compiled into the kernel.
73 */
74struct inpcbgroup *
75in6_pcbgroup_byhash(struct inpcbinfo *pcbinfo, u_int hashtype, uint32_t hash)
76{
77
78#ifdef RSS
79 if ((pcbinfo->ipi_hashfields == IPI_HASHFIELDS_4TUPLE &&
80 hashtype == M_HASHTYPE_RSS_TCP_IPV6) ||
81 (pcbinfo->ipi_hashfields == IPI_HASHFIELDS_4TUPLE &&
82 hashtype == M_HASHTYPE_RSS_UDP_IPV6) ||
83 (pcbinfo->ipi_hashfields == IPI_HASHFIELDS_2TUPLE &&
84 hashtype == M_HASHTYPE_RSS_IPV6))
85 return (&pcbinfo->ipi_pcbgroups[
86 in6_pcbgroup_getbucket(pcbinfo, hash)]);
87#endif
88 return (NULL);
89}
90
91struct inpcbgroup *
92in6_pcbgroup_bymbuf(struct inpcbinfo *pcbinfo, struct mbuf *m)

Callers 2

in6_pcblookup_mbufFunction · 0.85
in6_pcbgroup_bymbufFunction · 0.85

Calls 1

in6_pcbgroup_getbucketFunction · 0.85

Tested by

no test coverage detected