Lines Matching defs:session
185 * Session management interface (OpenCrypto)
195 /* session management */
208 /* session header manegement */
436 /* Session */
495 Session");
497 NULL, device_xname(sc->sc_dev), "Free-Session");
912 * make DMA descriptors to copy session header: DRAM -> SRAM
913 * we can reuse session header on SRAM if session is not changed.
1005 /* sync session header */
1009 /* only debug code touch the session header after newsession */
1371 * constractor of session structure.
1384 /* Create and load DMA map for session header */
1409 * destractor of session structure.
1454 /* Create DMA map for session data. */
1489 * allocate new session structure.
1501 mv_s->refs = 1; /* 0 means session is already invalid */
1508 * deallocate session structure.
1529 "%s: session is already deleted.\n", __func__);
1536 * a session with refs == 0 is
1542 "%s: session is already invalidated.\n", __func__);
1563 * look for session is exist or not
1569 int session;
1574 session = MVXPSEC_SESSION(sid);
1575 if (__predict_false(session > MVXPSEC_MAX_SESSIONS)) {
1576 log(LOG_ERR, "%s: session number too large %d\n",
1577 __func__, session);
1580 if (__predict_false( (mv_s = sc->sc_sessions[session]) == NULL)) {
1581 log(LOG_ERR, "%s: invalid session %d\n",
1582 __func__, session);
1586 KASSERT(mv_s->sid == session);
1606 log(LOG_ERR, "%s: invalid session.\n", __func__);
1857 * Create new opencrypto session
1869 int session = -1;
1874 /* allocate driver session context */
1880 * lookup opencrypto session table
1895 session = i;
1896 hint = session + 1;
1899 if (session < 0) {
1903 session = i;
1904 hint = session + 1;
1907 if (session < 0) {
1909 /* session full */
1920 sc->sc_sessions[session] = mv_s;
1922 log(LOG_DEBUG, "%s: new session %d allocated\n", __func__, session);
1925 sid = MVXPSEC_SID(device_unit(sc->sc_dev), session);
1928 /* setup the session key ... */
1955 /* create per session IV (compatible with KAME IPsec) */
1992 "H/W Crypto session (id:%u) added.\n", session);
1998 /* sync session header(it's never touched after here) */
2008 sc->sc_sessions[session] = NULL;
2009 hint = session;
2013 "%s: Failed to add H/W crypto session (id:%u): err=%d\n",
2014 __func__, session, err);
2021 * remove opencrypto session
2028 int session;
2031 session = MVXPSEC_SESSION(sid);
2032 KASSERTMSG(session >= 0, "session=%d", session);
2033 KASSERTMSG(session < MVXPSEC_MAX_SESSIONS, "session=%d max=%d",
2034 session, MVXPSEC_MAX_SESSIONS);
2037 mv_s = sc->sc_sessions[session];
2040 "%s: inactivate session %d\n", __func__, session);
2042 /* inactivate mvxpsec session */
2043 sc->sc_sessions[session] = NULL;
2053 "H/W Crypto session (id: %d) deleted.\n", session);
2062 * process data with existing session
2077 * lookup session
2646 * Set initial vector of cipher to the session.
2657 /* use per session IV (compatible with KAME IPsec) */
2687 * set a encryption or decryption key to the session
2767 * set MAC key to the session