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:
committed by
Martin K. Petersen
parent
09620eeb62
commit
4b60c82736
@@ -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.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user