[Stgt-devel] Adding iser_task object (was: dd fails with iSER)

Pete Wyckoff pw
Wed Aug 15 21:44:26 CEST 2007

erezz at voltaire.com wrote on Wed, 15 Aug 2007 22:28 +0300:
> >erezz at voltaire.com wrote on Wed, 15 Aug 2007 12:26 +0300:
> >> At first, I thought that this will be easy to fix - just move the va &
> >> stag from the conn object to the task object. However, when ep_read
> >> (iscsi_iser_read in iSER's case) is called, the task isn't allocated
> >> yet. iSER must save the data from the received iSER header in some task
> >> object (e.g. iser_task).
> > 
> > You could add a new transport call .ep_task_init and call that near
> > the iscsi_alloc_task() in iscsi_scsi_cmd_rx_start().  It gets the
> > newly allocated struct iscsi_task.  The TCP case would be a noop.
> > The RDMA case would take the cached rem_stag values from the
> > connection structure and stick them in the task struct.  This is all
> > done synchronously while working on the single received PDU so
> > should be safe.  You only need to call ->ep_task_init(task) in the
> > SCSI command case, not TM functions or other places that will not do
> > RDMA data transfers.
> Do you mean to say that after do_recv is called and the va & stag are saved on conn_info, we can be sure that no other new command will be received before iscsi_alloc task is called? If yes, it should be easy, and I already have some of the code for it.

Yes, I believe that is the case.  If the receive processing in
iscsid.c were parallel, we would be in trouble.  But it's not.

		-- Pete

More information about the stgt mailing list