1
0

scsi: qla2xxx: Add fw_started flags to qpair

Add fw_started flag to qpair to reduce cache thrash.  This reduce access
to qla_hw_data structure by each qpair.

Signed-off-by: Quinn Tran <quinn.tran@cavium.com>
Signed-off-by: Himanshu Madhani <himanshu.madhani@cavium.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
Quinn Tran
2017-06-13 20:47:21 -07:00
committed by Martin K. Petersen
parent 09620eeb62
commit 4b60c82736
4 changed files with 28 additions and 8 deletions

View File

@@ -3262,6 +3262,7 @@ struct qla_qpair {
/* move vha->flags.difdix_supported here */
uint32_t difdix_supported:1;
uint32_t delete_in_progress:1;
uint32_t fw_started:1;
uint16_t id; /* qp number used with FW */
uint16_t vp_idx; /* vport ID */
@@ -4183,6 +4184,26 @@ struct qla2_sgx {
srb_t *sp;
};
#define QLA_FW_STARTED(_ha) { \
int i; \
_ha->flags.fw_started = 1; \
_ha->base_qpair->fw_started = 1; \
for (i = 0; i < _ha->max_qpairs; i++) { \
if (_ha->queue_pair_map[i]) \
_ha->queue_pair_map[i]->fw_started = 1; \
} \
}
#define QLA_FW_STOPPED(_ha) { \
int i; \
_ha->flags.fw_started = 0; \
_ha->base_qpair->fw_started = 0; \
for (i = 0; i < _ha->max_qpairs; i++) { \
if (_ha->queue_pair_map[i]) \
_ha->queue_pair_map[i]->fw_started = 0; \
} \
}
/*
* Macros to help code, maintain, etc.
*/