Lines Matching refs:hash
497 /* Find free session and add to hash. */
504 uint16_t val, hash;
514 hash = SESSHASH(val);
515 mtx_lock(&privp->sesshash[hash].mtx);
516 LIST_FOREACH(tsp, &privp->sesshash[hash].head, sessions) {
522 LIST_INSERT_HEAD(&privp->sesshash[hash].head, sp, sessions);
524 mtx_unlock(&privp->sesshash[hash].mtx);
533 /* Add specified session to hash. */
538 uint16_t hash = SESSHASH(sp->Session_ID);
540 mtx_lock(&privp->sesshash[hash].mtx);
541 LIST_INSERT_HEAD(&privp->sesshash[hash].head, sp, sessions);
542 mtx_unlock(&privp->sesshash[hash].mtx);
545 /* Delete specified session from hash. */
550 uint16_t hash = SESSHASH(sp->Session_ID);
552 mtx_lock(&privp->sesshash[hash].mtx);
554 mtx_unlock(&privp->sesshash[hash].mtx);
562 uint16_t hash = SESSHASH(session);
565 mtx_lock(&privp->sesshash[hash].mtx);
566 LIST_FOREACH(sp, &privp->sesshash[hash].head, sessions) {
573 mtx_unlock(&privp->sesshash[hash].mtx);
626 mtx_init(&privp->sesshash[i].mtx, "PPPoE hash mutex", NULL, MTX_DEF);