31 Mar, 2011

1 commit


31 Dec, 2010

1 commit


28 Jul, 2010

1 commit


05 Dec, 2009

1 commit


05 Sep, 2009

1 commit


09 Jun, 2009

1 commit


24 May, 2009

1 commit

  • When we create the tcp/ip connection by calling ep_connect, we currently
    just go by the routing table info.

    I think there are two problems with this.

    1. Some drivers do not have access to a routing table. Some drivers like
    qla4xxx do not even know about other ports.

    2. If you have two initiator ports on the same subnet, the user may have
    set things up so that session1 was supposed to be run through port1. and
    session2 was supposed to be run through port2. It looks like we could
    end with both sessions going through one of the ports.

    Fixes for cxgb3i from Karen Xie.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     

30 Dec, 2008

2 commits

  • cxgb3i does not offload the processing of the header,
    but it will always process the padding. This patch
    adds a padding offload flag to detect when the LLD
    supports this.

    The patch also modifies the header processing so that
    we do not try to read/bypass the header dugest in the
    skb. cxgb3i will not include it with the header like
    with other offload cards.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     
  • cxgb3i is unlike qla4xxx and bnx2i in that it does not offload entire
    scsi commands or iscsi sequences. Instead it only offloads the transfer
    of a ISCSI DATA_IN pdu's data, the digests and padding. This patch fixes up the
    iscsi tcp recv path so that it exports its skb recv processing so
    cxgb3i and other drivers can call them. All they have to do is pass
    the function the skb with the hdr or data pdu header and this function
    will do the rest.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     

13 Oct, 2008

2 commits

  • The segment->done functions return a iscsi error value which gives
    a lot more info than conn failed, so this patch has us return
    that value. I also add a new one for xmit failures.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     
  • If the driver knows when hardware is removed like with cxgb3i,
    bnx2i, qla4xxx and iser then we will want to remove the sessions/devices
    that are bound to that device before removing the host.

    cxgb3i and in the future bnx2i will remove the host and that will
    remove all the sessions on the hba. iser can call iscsi_kill_session
    when it gets an event that indicates that a hca is removed.
    And when qla4xxx is hooked in to the lib (it is only hooked into
    the class right now) it can call iscsi remove host like the
    partial offload card drivers.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     

12 Jul, 2008

4 commits

  • This adds two new attrs used for creating initiator ports and
    binding sessions to hardware.

    The session level initiatorname:

    Since bnx2i does a scsi_host per host device, we need to add the
    iface initiator port settings on the session, so we can create
    multiple initiator ports (each with different inames) per device/scsi_host.

    The current iname reflects that qla4xxx can have one iname per hba, and we are
    allocating a host per session for software. The iname on the host will
    remain so we can export and set the hba level qla4xxx setting.

    The ifacename attr:

    To bind a session to a some peice of hardware in userspace we maintain
    some mappings, but during boot or iscsid restart (iscsid contains the user
    space part of the driver) we need to be able to figure out which of those
    host mappings abstractions maps to certain sessions. This patch adds
    a ifacename attr, which userspace can set to id the host side of the
    endpoint across pivot_roots and iscsid restarts.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     
  • Add sysfs representation for the endpoint, so userspace can match the
    host and session to the endpoint. This will allow us to set the host's
    parent correctly at host creation time.

    The next patches will convert tcp and iser, and fix iser's dma_mask
    bug.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     
  • bnx2i allocates a host per netdevice but will use libiscsi,
    so this unbinds the session from the host in that code.

    This will also be useful for the iser parent device dma settings
    fixes.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     
  • iscsi offload (bnx2i and qla4xx) allocate a scsi host per hba,
    so the session creation path needs a shost/host_no argument.
    Software iscsi/iser will follow the same behabior as before
    where it allcoates a host per session, but in the future iser
    will probably look more like bnx2i where the host's parent is
    the hardware (rnic for iser and for bnx2i it is the nic), because
    it does not use a socket layer like how iscsi_tcp does.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     

12 Jan, 2008

3 commits

  • During root boot and shutdown the target could send us nops.
    At this time iscsid cannot be running, so the target will drop
    the session and the boot or shutdown will hang.

    To handle this and allow us to better control when to check the network
    this patch moves the nop handling to the kernel.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     
  • We were using the device delete sysfs file to remove each device
    then logout. Now in 2.6.21 this will not work because
    the sysfs delete file returns immediately and does not wait for
    the device removal to complete. This causes a hang if a cache sync
    is needed during shutdown. Before .21, that approach had other
    problems, so this patch fixes the shutdown code so that we remove the target
    and unbind the session before logging out and shut down the session

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     
  • This patch adds logical unit reset support. This should work for ib_iser,
    but I have not finished testing that driver so it is not hooked in yet.

    This patch also temporarily reverts the iscsi_tcp r2t write out patch.
    That code is completely rewritten in this patchset.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     

03 Jun, 2007

4 commits

  • iSCSI must support software iscsi (iscsi_tcp, iser), hardware iscsi (qla4xxx),
    and partial offload (broadcom). To be able to allow each stack or driver
    or port (virtual or physical) to be able to log into the same target portal
    we use the initiator tuple [[HWADDRESS | NETDEVNAME], INITIATOR_NAME] and
    the target tuple [TARGETNAME, CONN_ADDRESS, CONN_PORT] to id a session.
    This patch adds the netdev name, which is used by software iscsi when
    it binds a session to a netdevice using the SO_BINDTODEVICE sock opt.
    It cannot use HWADDRESS because if someone did vlans then the same netdevice
    will have the same mac and the initiator,target id will not be unique.

    Signed-off-by: Mike Christie
    Cc: Roland Dreier
    Cc: David C Somayajulu
    Signed-off-by: James Bottomley

    Mike Christie
     
  • This patch exports the local address for the session. For
    qla4xxx this is the ip of the hba's port. For software
    this is the src addr of the socket.

    Signed-off-by: Mike Christie
    Cc: David C Somayajulu
    Signed-off-by: James Bottomley

    Mike Christie
     
  • Userspace will want to know what the driver/FW/HW capabilites
    when it comes to some operations like if the hardware can
    do discovery or if it can store iscsi info like what target
    was used for boot. This patch adds some new caps so userspace
    can tell if the driver supports hardware/fw based sendtargets
    discovery and if the hardware has some flash which may be
    holding or can contain some iscsi target info
    .
    Signed-off-by: Mike Christie
    Cc: David C Somayajulu
    Signed-off-by: James Bottomley

    Mike Christie
     
  • This patch allows us to set can_queue and cmds_per_lun from userspace
    when we create the session/host. From there we can set it on a per
    target basis. The patch fully converts iscsi_tcp, but only hooks
    up ib_iser for cmd_per_lun since it currently has a lots of preallocations
    based on can_queue.

    Signed-off-by: Mike Christie
    Cc: Roland Dreier
    Signed-off-by: James Bottomley

    Mike Christie
     

02 Jun, 2007

4 commits


29 Jun, 2006

2 commits

  • This patch adds or modifies the transport class functions
    used to notify userspace of session state events.

    We modify the session addition up event and add a destruction event
    to notify userspace of session creation, relogin and destruction.

    And we modify the conn error event to be sent by broadcast
    since multiple listeners may want to listen for it.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     
  • Patch from david.somayajulu@qlogic.com:

    Add target discovery event. We may have a setup where the iscsi traffic
    is on a different netowrk than the other network traffic. In this case
    we will want to do discovery though the iscsi card. This patch adds
    a event to the transport class that can be used by hw iscsi cards that
    support this.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     

10 May, 2006

2 commits

  • debugged by Ming and Rohan:

    The problem Ming and Rohan debugged was that during a normal session
    login, open-iscsi is not incrementing the exp_statsn counter. It was
    stuck at zero. From the RFC, it looks like if the login response PDU has
    a successful status then we should be incrementing that value. Also from
    the RFC, it looks like if when we drop a connection then reconnect, we
    should be using the exp_statsn from the old connection in the next
    relogin attempt.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     
  • add transport end point callbacks so iscsi drivers that cannot connect
    from userspace, like iscsi tcp, using sockets do not have to
    implement their own socket infrastructure.

    Signed-off-by: Or Gerlitz
    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Or Gerlitz
     

15 Apr, 2006

4 commits

  • There is a lot of code duplcited between iscsi_tcp
    and the upcoming iscsi_iser driver. This patch puts
    the duplicated code in a lib. There is more code
    to move around but this takes care of the
    basics. For iscsi_offload if they use the lib we will
    probably move some things around. For example in the
    queuecommand we will not assume that the LLD wants
    to do queue_work, but it is better to handle that
    later when we know for sure what iscsi_offload looks
    like (we could probably do this for iscsi_iser though to).

    Ideally I would like to get the iscsi_transports modules
    to a place where all they really have to do is put data
    on the wire, but how to do that will hopefully be more clear
    when we see other modules like iscsi_offload. Or maybe
    iscsi_offload will not use the lib and it will just be
    iscsi_iser and iscsi_tcp and maybe the iscsi_tcp_tgt if that
    is allowed in mainline.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     
  • The current iscsi_tcp eh is not nicely setup for dm-multipath
    and performs some extra task management functions when they
    are not needed.

    The attached patch:

    - Fixes the TMF issues. If a session is rebuilt
    then we do not send aborts.

    - Fixes the problem where if the host reset fired, we would
    return SUCCESS even though we had not really done anything
    yet. This ends up causing problem with scsi_error.c's TUR.

    - If someone has turned on the userspace nop daemon code to try
    and detect network problems before the scsi command timeout
    we can now drop and clean up the session before the scsi command
    timesout and fires the eh speeding up the time it takes for a
    command to go from one patch to another. For network problems
    we fail the command with DID_BUS_BUSY so if failfast is set
    scsi_decide_disposition fails the command up to dm for it to
    try on another path.

    - And we had to add some basic iscsi session block code. Previously
    if we were trying to repair a session we would retrun a MLQUEUE code
    in the queuecommand. This worked but it was not the most efficient
    or pretty thing to do since it would take a while to relogin
    to the target. For iscsi_tcp/open-iscsi a lot of the iscsi error handler
    is in userspace the block code is pretty bare. We will be
    adding to that for qla4xxx.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     
  • For iscsi boot when going from initramfs to the real root we
    need to stop the userpsace iscsi daemon. To later restart it
    iscsid needs to be able to rebuild itself and part of that
    process is matching a session running the kernel with the
    iscsid representation. To do this the attached patch
    adds several required iscsi values. If the LLD does not provide
    them becuase, login is done in userspace, then the transport
    class and userspace set ths up for the LLD.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     
  • from hare@suse.de and michaelc@cs.wisc.edu

    hw iscsi like qla4xxx does not allocate a host per session and
    for userspace it is difficult to restart iscsid using the
    "iscsi handles" for the session and connection, so this
    patch just has the class or userspace allocate the id for
    the session and connection.

    Note: this breaks userspace and requires users to upgrade to the newest
    open-iscsi tools. Sorry about his but open-iscsi is still too new to
    say we have a stable user-kernel api and we were not good nough
    designers to know that other hw iscsi drivers and iscsid itself would
    need such changes. Actually we sorta did but at the time we did not
    have the HW available to us so we could only guess.

    Luckily, the only tools hooking into the class are the open-iscsi ones
    or other tools like iscsitart hook into the open-iscsi engine from
    userspace or prgroams like anaconda call our tools so they are not affected.

    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     

05 Feb, 2006

1 commit

  • From:
    michaelc@cs.wisc.edu
    fujita.tomonori@lab.ntt.co.jp
    da-x@monatomic.org

    and err path fixup from:
    ogerlitz@voltaire.com

    This patch cleans up that interface by having the lld and class
    pass a iscsi_cls_session or iscsi_cls_conn between each other when
    the function is used by HW and SW iscsi llds. This way the lld
    does not have to remember if it has to send a handle or pointer
    and a handle or pointer to connection, session or host.

    This also has the class verify the session handle that gets passed from
    userspace instead of using the pointer passed into the kernel directly.

    Signed-off-by: Mike Christie
    Signed-off-by: Alex Aizman
    Signed-off-by: Dmitry Yusupov
    Signed-off-by: James Bottomley

    Mike Christie
     

15 Jan, 2006

1 commit

  • This is the second version of the patch to address Christoph's comments.
    Instead of doing the lib, I just kept everything in scsi_trnapsort_iscsi.c
    like the FC and SPI class. This was becuase the driver model and sysfs
    class is tied to the session and connection setup so separating did not
    buy very much at this time.

    The reason for this patch was becuase HW iscsi LLDs like qla4xxx cannot
    use the iscsi class becuase the scsi_host was tied to the interface and
    class code. This patch just seperates the session from scsi host so
    that LLDs that allocate the host per some resource like pci device
    can still use the class.

    This is also fixes a couple refcount bugs that can be triggered
    when users have a sysfs file open, close the session, then
    read or write to the file.

    Signed-off-by: Alex Aizman
    Signed-off-by: Dmitry Yusupov
    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Mike Christie
     

06 Aug, 2005

1 commit

  • open-iscsi-headers.patch - common header files:
    - iscsi_if.h (user/kernel #defines and user/kernel events);
    - iscsi_proto.h (RFC3720 #defines and types);
    - scsi_transport_iscsi.h (transport API, transport #defines and types).

    Signed-off-by: Alex Aizman
    Signed-off-by: Dmitry Yusupov
    Signed-off-by: Mike Christie
    Signed-off-by: James Bottomley

    Alex Aizman