Lines Matching refs:sa_index
19 uint16_t sa_index);
94 /* timeout called when no traffic and delayed rx sa_index delete */
115 * delete_sa_index is invalidated when we find the new sa_index in
117 * still looking for the new sa_index because there is no I/O and we
157 uint16_t sa_index, uint16_t handle)
162 /* if the entry exists, then just update the sa_index */
165 entry->update_sa_index = sa_index;
174 * followed by a delete of the first sa_index
182 entry->update_sa_index = sa_index;
335 uint16_t sa_index)
341 u16 lsa_index = sa_index;
357 "%s: index %d added to free pool\n", __func__, sa_index);
370 if (entry->sa_pair[i].sa_index == INVALID_EDIF_SA_INDEX)
375 "%s: ** WARNING %d** entry handle: 0x%x, lid: 0x%x, sa_index: %d\n",
377 entry->sa_pair[i].sa_index);
382 entry->sa_pair[i].sa_index, pdir);
395 "%s: freeing sa_index %d, nph: 0x%x\n",
396 __func__, entry->sa_pair[i].sa_index, entry->handle);
398 dir = (entry->sa_pair[i].sa_index <
401 entry->sa_pair[i].sa_index);
1404 * need to allocate sa_index here and save it
1477 uint16_t sa_index;
1481 /* map the spi to an sa_index */
1482 sa_index = qla_edif_sadb_get_sa_index(fcport, sa_frame);
1483 if (sa_index == RX_DELETE_NO_EDIF_SA_INDEX) {
1499 } else if (sa_index == INVALID_EDIF_SA_INDEX) {
1501 "%s: Failed to get sa_index for spi 0x%x, dir: %d\n",
1508 __func__, sa_index, sa_frame->spi, dir, fcport->loop_id);
1511 sa_frame->fast_sa_index = sa_index;
1516 "%s: Failed to add sa_ctl for spi 0x%x, dir: %d, sa_index: %d\n",
1517 __func__, sa_frame->spi, dir, sa_index);
1635 "%s: %8phN, sa_index in sa_frame: %d flags %xh\n",
1643 uint16_t sa_index = sa_frame.fast_sa_index;
1654 "%s: WARNING: no active sa_index for nport_handle 0x%x, forcing delete for sa_index 0x%x\n",
1655 __func__, fcport->loop_id, sa_index);
1660 * if we have a forced delete for rx, remove the sa_index from the edif list
1666 "%s: FORCE DELETE flag found for nport_handle 0x%x, sa_index 0x%x, forcing DELETE\n",
1667 __func__, fcport->loop_id, sa_index);
1685 /* free up the sa_ctl that was allocated with the sa_index */
1686 sa_ctl = qla_edif_find_sa_ctl_by_index(fcport, sa_index,
1695 /* release the sa_index */
1697 "%s: freeing sa_index %d, nph: 0x%x\n",
1698 __func__, sa_index, nport_handle);
1699 qla_edif_sadb_delete_sa_index(fcport, nport_handle, sa_index);
1713 "%s: adding timer, entry: %p, delete sa_index %d, lid 0x%x to edif_list\n",
1714 __func__, edif_entry, sa_index, nport_handle);
1719 * received packets with the new sa_index
1731 "%s: delete sa_index %d, lid 0x%x to edif_list. bsg done ptr %p\n",
1732 __func__, sa_index, nport_handle, bsg_job);
1734 edif_entry->delete_sa_index = sa_index;
1749 uint16_t sa_index = sa_frame.fast_sa_index;
1758 "%s: adding update sa_index %d, lid 0x%x to edif_list\n",
1759 __func__, sa_index, nport_handle);
1761 result = qla_edif_list_add_sa_update_index(fcport, sa_index,
1766 __func__, sa_index, nport_handle);
2346 * build and send the sa_update iocb to delete an rx sa_index
2466 sa_update_iocb->sa_index = cpu_to_le16(sa_frame->fast_sa_index);
2485 sa_update_iocb->port_id[0], sa_update_iocb->flags, sa_update_iocb->sa_index,
2522 sa_update_iocb->sa_index = cpu_to_le16(sa_ctl->index);
2529 sa_update_iocb->sa_index, sp->handle);
2677 u16 sa_index;
2688 sa_index = find_first_zero_bit(sa_id_map, EDIF_NUM_SA_INDEX);
2689 if (sa_index >= EDIF_NUM_SA_INDEX) {
2693 set_bit(sa_index, sa_id_map);
2697 sa_index += EDIF_TX_SA_INDEX_BASE;
2700 "%s: index retrieved from free pool %d\n", __func__, sa_index);
2702 return sa_index;
2721 /* remove an sa_index from the nport_handle and return it to the free pool */
2723 uint16_t sa_index)
2727 int dir = (sa_index < EDIF_TX_SA_INDEX_BASE) ? 0 : 1;
2756 if (entry->sa_pair[slot].sa_index == sa_index) {
2757 entry->sa_pair[slot].sa_index = INVALID_EDIF_SA_INDEX;
2760 qla_edif_add_sa_index_to_freepool(fcport, dir, sa_index);
2761 } else if (entry->sa_pair[slot].sa_index == INVALID_EDIF_SA_INDEX) {
2773 "%s: sa_index %d removed, free_slot_count: %d\n",
2774 __func__, sa_index, free_slot_count);
2804 __func__, vha, pkt->sa_index);
2809 __func__, vha, pkt->sa_index);
2814 __func__, vha, pkt->sa_index);
2819 __func__, vha, pkt->sa_index);
2832 nport_handle, pkt->sa_index, pkt->flags, sp->handle);
2843 "%s: removing edif_entry %p, new sa_index: 0x%x\n",
2844 __func__, edif_entry, pkt->sa_index);
2849 "%s: releasing edif_entry %p, new sa_index: 0x%x\n",
2850 __func__, edif_entry, pkt->sa_index);
2869 "%s: nph 0x%x, sa_index %d removed from fw\n",
2870 __func__, sp->fcport->loop_id, pkt->sa_index);
2902 "%s: %8phN SA update FAILED: sa_index: %d, new_sa_info %d, %02x%02x%02x\n",
2903 __func__, sp->fcport->port_name, pkt->sa_index, pkt->new_sa_info,
2916 /* for delete, release sa_ctl, sa_index */
2920 le16_to_cpu(pkt->sa_index), (pkt->flags & SA_FLAG_TX));
2934 "%s: freeing sa_index %d, nph: 0x%x\n",
2935 __func__, le16_to_cpu(pkt->sa_index), nport_handle);
2937 le16_to_cpu(pkt->sa_index));
2944 "%s: freeing sa_index %d, nph: 0x%x\n",
2945 __func__, pkt->sa_index, nport_handle);
2947 le16_to_cpu(pkt->sa_index));
3225 * edif update/delete sa_index list functions *
3248 /* allocate/retrieve an sa_index for a given spi */
3254 uint16_t sa_index;
3285 sa_index = qla_edif_get_sa_index_from_freepool(fcport, dir);
3286 if (sa_index == INVALID_EDIF_SA_INDEX) {
3295 entry->sa_pair[0].sa_index = sa_index;
3297 entry->sa_pair[1].sa_index = INVALID_EDIF_SA_INDEX;
3302 "%s: Created new sadb entry for nport_handle 0x%x, spi 0x%x, returning sa_index %d\n",
3303 __func__, nport_handle, sa_frame->spi, sa_index);
3305 return sa_index;
3312 if (entry->sa_pair[slot].sa_index == INVALID_EDIF_SA_INDEX) {
3318 "%s: sadb slot %d entry for lid 0x%x, spi 0x%x found, sa_index %d\n",
3320 entry->sa_pair[slot].sa_index);
3321 return entry->sa_pair[slot].sa_index;
3333 "%s: Slot 0 spi: 0x%x sa_index: %d, Slot 1 spi: 0x%x sa_index: %d\n",
3334 __func__, entry->sa_pair[0].spi, entry->sa_pair[0].sa_index,
3335 entry->sa_pair[1].spi, entry->sa_pair[1].sa_index);
3341 sa_index = qla_edif_get_sa_index_from_freepool(fcport, dir);
3342 if (sa_index == INVALID_EDIF_SA_INDEX) {
3350 entry->sa_pair[free_slot].sa_index = sa_index;
3353 "%s: sadb slot %d entry for nport_handle 0x%x, spi 0x%x added, returning sa_index %d\n",
3354 __func__, free_slot, entry->handle, sa_frame->spi, sa_index);
3356 return sa_index;
3379 /* build the rx and tx sa_index free pools -- only done at fcport init */
3413 fc_port_t *fcport, uint32_t handle, uint16_t sa_index)
3431 * match rx sa_index
3434 edif_entry->update_sa_index != sa_index) {
3449 "%s: invalidating delete_sa_index, update_sa_index: 0x%x sa_index: 0x%x, delete_sa_index: 0x%x\n",
3450 __func__, edif_entry->update_sa_index, sa_index, edif_entry->delete_sa_index);
3469 __func__, sa_ctl, sa_index);
3490 /* sa_index used by this iocb */