[openib-general] questions about gen2 srp driver

chas williams - CONTRACTOR chas at cmf.nrl.navy.mil
Mon Feb 6 12:48:35 PST 2006


i have been looking at the srp driver in the gen2 trunk (and the version
that is in the latest 2.6.15 kernels).  i have a couple questions about
its behavior and i am hoping someone can answer them.

it seems to take scsi_host->host_lock with a spin_lock_irq() inside
a couple of work queues.  i believe work queues run at process 
context and not interrupt context.  therefore, one should probably
use spin_lock_irqsave()?

secondly, there seems to be only one pair of lkeys/rkeys for a
given srp "virtual" host.  in srp_map_data() i see the rkey is
assigned to the buffer:

	buf->key = cpu_to_be32(target->srp_host->mr->rkey);

but the virtual host adapter template says:

        .can_queue                      = SRP_SQ_SIZE,
        .cmd_per_lun                    = SRP_SQ_SIZE,

if there is only a single set of rdma keys how can the driver support
more than one command (particularly on a target with multiple lun's)
outstanding command?  i didn't think the srp_post_send() was synchronus
with respect to the completion of the current rdma request?



More information about the general mailing list