| 97 | } |
| 98 | |
| 99 | struct inpcbgroup * |
| 100 | in6_pcbgroup_bytuple(struct inpcbinfo *pcbinfo, const struct in6_addr *laddrp, |
| 101 | u_short lport, const struct in6_addr *faddrp, u_short fport) |
| 102 | { |
| 103 | uint32_t hash; |
| 104 | |
| 105 | /* |
| 106 | * RSS note: we pass foreign addr/port as source, and local addr/port |
| 107 | * as destination, as we want to align with what the hardware is |
| 108 | * doing. |
| 109 | */ |
| 110 | switch (pcbinfo->ipi_hashfields) { |
| 111 | case IPI_HASHFIELDS_4TUPLE: |
| 112 | #ifdef RSS |
| 113 | hash = rss_hash_ip6_4tuple(faddrp, fport, laddrp, lport); |
| 114 | #else |
| 115 | hash = faddrp->s6_addr32[3] ^ fport; |
| 116 | #endif |
| 117 | break; |
| 118 | |
| 119 | case IPI_HASHFIELDS_2TUPLE: |
| 120 | #ifdef RSS |
| 121 | hash = rss_hash_ip6_2tuple(faddrp, laddrp); |
| 122 | #else |
| 123 | hash = faddrp->s6_addr32[3] ^ laddrp->s6_addr32[3]; |
| 124 | #endif |
| 125 | break; |
| 126 | |
| 127 | default: |
| 128 | hash = 0; |
| 129 | } |
| 130 | return (&pcbinfo->ipi_pcbgroups[in6_pcbgroup_getbucket(pcbinfo, |
| 131 | hash)]); |
| 132 | } |
| 133 | |
| 134 | struct inpcbgroup * |
| 135 | in6_pcbgroup_byinpcb(struct inpcb *inp) |
no test coverage detected