Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Jan 2004 07:21:29 -0800
From:      Chuck Tuffli <chuck_tuffli@agilent.com>
To:        "Justin T. Gibbs" <gibbs@scsiguy.com>
Cc:        freebsd-scsi@freebsd.org
Subject:   Re: target driver question
Message-ID:  <20040115152129.GA17831@cre85086tuf.rose.agilent.com>
In-Reply-To: <1782565408.1074141449@aslan.btc.adaptec.com>
References:  <20040114201854.GB15642@cre85086tuf.rose.agilent.com> <1782565408.1074141449@aslan.btc.adaptec.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Justin -

Thanks for the response. See below

On Wed, Jan 14, 2004 at 09:37:29PM -0700, Justin T. Gibbs wrote:
> > 
> > When this driver receives a CDB, it needs to save away some information
> > specific to that IO for later use in the CONT_TARGET_IO phase.
> 
> Can you explain what type of data this is?

This is a fibre channel target driver. So the data consists of login
information about the initiator on the other side of the link, an
exchange ID (OX_ID), and a couple of chip resources specific to this
IO.

> The two other drivers that perform target mode in FreeBSD do not require
> any data other than the init_id and tag_id to be "round-tripped" through

Does the combo of init_id and tag_id uniquely identify an IO? If so, I
guess the driver could keep track of the IO specific data in a "table"
indexed by init_id/tag_id.

> the target emulator.  I would rather not have the target emulator touch *any*
> of the private data or to see a SIM driver rely on anything other than the
> standard fields in the CTIO.  If this is absolutely necessary, we can
> add a way to refer to the ATIO from the CTIO since the ATIO lifetime
> is the lifetime of the SCSI transaction being serviced.

I think I can live with this. The above is a little bit more work, but
not a big deal. Other layered driver code that I've worked on before
either had a concept of handles or provided a hook for private (device
dependent) data. When I saw the sim_priv structure, that is what I
expected it to be.

Again, thank you for your help!

---chuck

-- 
Chuck Tuffli    <chuck_tuffli AT NO_SPAM agilent DOT com>
Agilent Technologies, Storage Area Networking



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040115152129.GA17831>