Licensing Information
Open Source Used In Cisco Nexus 9000 Series 7.0(3)I5(1)
3236
}
/*
* If there is a direction change for this context then we mark it as
* unregistered and re-register is for the new direction. This is not
* a very expensive operation and currently only tends to happen when
* user-space application are doing benchmarks
*
* DM - we should be checking for pending requests before unregistering.
*/
if (q->ixp_q_ccrd && ixp->ixp_registered &&
ixp->ixp_crd_flags != (q->ixp_q_ccrd->crd_flags & CRD_F_ENCRYPT)) {
dprintk("%s - detected direction change on session\n", __FUNCTION__);
ixp->ixp_registered = 0;
}
/*
* if we are registered, call straight into the perform code
*/
if (ixp->ixp_registered) {
ixp_q_process(q);
return 0;
}
/*
* the only part of the context not set in newsession is the direction
* dependent parts
*/
if (q->ixp_q_ccrd) {
ixp->ixp_crd_flags = (q->ixp_q_ccrd->crd_flags & CRD_F_ENCRYPT);
if (q->ixp_q_ccrd->crd_flags & CRD_F_ENCRYPT) {
ixp->ixp_ctx.operation = q->ixp_q_acrd ?
IX_CRYPTO_ACC_OP_ENCRYPT_AUTH : IX_CRYPTO_ACC_OP_ENCRYPT;
} else {
ixp->ixp_ctx.operation = q->ixp_q_acrd ?
IX_CRYPTO_ACC_OP_AUTH_DECRYPT : IX_CRYPTO_ACC_OP_DECRYPT;
}
} else {
/* q->ixp_q_acrd must be set if we are here */
ixp->ixp_ctx.operation = IX_CRYPTO_ACC_OP_AUTH_CALC;
}
status = list_empty(&ixp->ixp_q);
list_add_tail(&q->ixp_q_list, &ixp->ixp_q);
if (status)
schedule_work(&ixp->ixp_registration_work);
return 0;










