Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1ba0158f authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Nicholas Bellinger
Browse files

target/tcm_fc: use CPU affinity for responses



The libfc stack assigns exchange IDs based on the CPU the request
was received on, so we need to send the responses via the same CPU.
Otherwise the send logic gets confuses and responses will be delayed,
causing exchange timeouts on the initiator side.

Signed-off-by: default avatarHannes Reinecke <hare@suse.com>
Cc: stable@vger.kernel.org # 4.5+
Signed-off-by: default avatarNicholas Bellinger <nab@linux-iscsi.org>
parent 8962a4d2
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -572,7 +572,7 @@ static void ft_send_work(struct work_struct *work)
	if (target_submit_cmd(&cmd->se_cmd, cmd->sess->se_sess, fcp->fc_cdb,
	if (target_submit_cmd(&cmd->se_cmd, cmd->sess->se_sess, fcp->fc_cdb,
			      &cmd->ft_sense_buffer[0], scsilun_to_int(&fcp->fc_lun),
			      &cmd->ft_sense_buffer[0], scsilun_to_int(&fcp->fc_lun),
			      ntohl(fcp->fc_dl), task_attr, data_dir,
			      ntohl(fcp->fc_dl), task_attr, data_dir,
			      TARGET_SCF_ACK_KREF))
			      TARGET_SCF_ACK_KREF | TARGET_SCF_USE_CPUID))
		goto err;
		goto err;


	pr_debug("r_ctl %x target_submit_cmd %p\n", fh->fh_r_ctl, cmd);
	pr_debug("r_ctl %x target_submit_cmd %p\n", fh->fh_r_ctl, cmd);