* Two update paths: one in which the 4-tuple on an inpcb has been updated * and therefore connection groups may need to change (or a wildcard entry * may needed to be installed), and another in which the 4-tuple has been * set as a result of a packet received, in which case we may be able to use * the hash on the mbuf to avoid doing a software hash calculation for RSS. * * In each case: firs
| 467 | * otherwise, calculate and update the pcbgroup for the inpcb. |
| 468 | */ |
| 469 | void |
| 470 | in_pcbgroup_update(struct inpcb *inp) |
| 471 | { |
| 472 | struct inpcbinfo *pcbinfo; |
| 473 | struct inpcbgroup *newpcbgroup; |
| 474 | |
| 475 | INP_WLOCK_ASSERT(inp); |
| 476 | |
| 477 | pcbinfo = inp->inp_pcbinfo; |
| 478 | if (!in_pcbgroup_enabled(pcbinfo)) |
| 479 | return; |
| 480 | |
| 481 | in_pcbwild_update_internal(inp); |
| 482 | if (!(inp->inp_flags2 & INP_PCBGROUPWILD) && |
| 483 | !(inp->inp_flags & INP_DROPPED)) { |
| 484 | #ifdef INET6 |
| 485 | if (inp->inp_vflag & INP_IPV6) |
| 486 | newpcbgroup = in6_pcbgroup_byinpcb(inp); |
| 487 | else |
| 488 | #endif |
| 489 | newpcbgroup = in_pcbgroup_byinpcb(inp); |
| 490 | } else |
| 491 | newpcbgroup = NULL; |
| 492 | in_pcbgroup_update_internal(pcbinfo, newpcbgroup, inp); |
| 493 | } |
| 494 | |
| 495 | void |
| 496 | in_pcbgroup_update_mbuf(struct inpcb *inp, struct mbuf *m) |
no test coverage detected