| 197 | } |
| 198 | |
| 199 | void |
| 200 | udp_init(void) |
| 201 | { |
| 202 | |
| 203 | /* |
| 204 | * For now default to 2-tuple UDP hashing - until the fragment |
| 205 | * reassembly code can also update the flowid. |
| 206 | * |
| 207 | * Once we can calculate the flowid that way and re-establish |
| 208 | * a 4-tuple, flip this to 4-tuple. |
| 209 | */ |
| 210 | in_pcbinfo_init(&V_udbinfo, "udp", &V_udb, UDBHASHSIZE, UDBHASHSIZE, |
| 211 | "udp_inpcb", udp_inpcb_init, IPI_HASHFIELDS_2TUPLE); |
| 212 | V_udpcb_zone = uma_zcreate("udpcb", sizeof(struct udpcb), |
| 213 | NULL, NULL, NULL, NULL, UMA_ALIGN_PTR, 0); |
| 214 | uma_zone_set_max(V_udpcb_zone, maxsockets); |
| 215 | uma_zone_set_warning(V_udpcb_zone, "kern.ipc.maxsockets limit reached"); |
| 216 | EVENTHANDLER_REGISTER(maxsockets_change, udp_zone_change, NULL, |
| 217 | EVENTHANDLER_PRI_ANY); |
| 218 | } |
| 219 | |
| 220 | void |
| 221 | udplite_init(void) |
nothing calls this directly
no test coverage detected