1. 05 12月, 2009 17 次提交
  2. 11 9月, 2009 17 次提交
  3. 05 9月, 2009 1 次提交
    • V
      [SCSI] fcoe, libfc: fully makes use of per cpu exch pool and then removes em_lock · b2f0091f
      Vasu Dev 提交于
      1. Updates fcoe_rcv() to queue incoming frames to the fcoe per
         cpu thread on which this frame's exch was originated and simply
         use current cpu for request exch not originated by initiator.
         It is redundant to add this code under CONFIG_SMP, so removes
         CONFIG_SMP uses around this code.
      
      2. Updates fc_exch_em_alloc, fc_exch_delete, fc_exch_find to use
         per cpu exch pools, here fc_exch_delete is rename of older
         fc_exch_mgr_delete_ep since ep/exch are now deleted in pools
         of EM and so brief new name is sufficient and better name.
      
         Updates these functions to map exch id to their index into exch
         pool using fc_cpu_mask, fc_cpu_order and EM min_xid.
         This mapping is as per detailed explanation about this in
         last patch and basically this is just as lower fc_cpu_mask
         bits of exch id as cpu number and upper bit sum of EM min_xid
         and exch index in pool.
      
         Uses pool next_index to keep track of exch allocation from
         pool along with pool_max_index as upper bound of exches array
         in pool.
      
      3. Adds exch pool ptr to fc_exch to free exch to its pool in
         fc_exch_delete.
      
      4. Updates fc_exch_mgr_reset to reset all exch pools of an EM,
         this required adding fc_exch_pool_reset func to reset exches
         in pool and then have fc_exch_mgr_reset call fc_exch_pool_reset
         for each pool within each EM for a lport.
      
      5. Removes no longer needed exches array, em_lock, next_xid, and
         total_exches from struct fc_exch_mgr, these are not needed after
         use of per cpu exch pool, also removes not used max_read,
         last_read from struct fc_exch_mgr.
      
      6. Updates locking notes for exch pool lock with fc_exch lock and
         uses pool lock in exch allocation, lookup and reset.
      Signed-off-by: NVasu Dev <vasu.dev@intel.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      b2f0091f
  4. 23 8月, 2009 5 次提交
    • V
      [SCSI] fcoe: removes phys_dev and renames real_dev to netdev. · 1d1b88dc
      Vasu Dev 提交于
      The phys_dev was used only to locate common offload EM instance for all
      FCoE instances on a eth devices in function fcoe_em_config, so just updated
      fcoe_em_config to look for actual real eth device in locating common offload
      EM instance and then no need to store phys_dev in fcoe_softc, so removes
      phys_dev from fcoe_softc also.
      
      Renames fcoe_softc real_dev to netdev and updates all its uses to use netdev.
      
      So effectively no functional change, use of single netdev instead phys_dev
      and real_dev saves one pointer memory in fcoe_softc, also real_dev used here
      was confusing with vlan driver terminology since real_dev in vlan driver is
      referred to physical eth device.
      Signed-off-by: NVasu Dev <vasu.dev@intel.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      1d1b88dc
    • Y
      [SCSI] fcoe: Remove ifdef for NETIF_F_FCOE_CRC and NETIF_F_FSO · 15a521b4
      Yi Zou 提交于
      Remove the extra ifdef for NETIF_F_FSO and NETIF_F_FCOE_CRC since they are
      already defined in the current kernel as in include/linux/netdevice.h.
      Signed-off-by: NYi Zou <yi.zou@intel.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      15a521b4
    • V
      [SCSI] fcoe, libfc: adds offload EM per eth device with only single xid range per EM · d7179680
      Vasu Dev 提交于
      Updates fcoe_em_config to allocate a single instance of sharable offload
      EM for supported lp->lro_xid per eth device, and then share this EM
      for subsequently more lports creation on same eth device (e.g when using
      VLAN).
      
      Adds tiny fcoe_oem_match function for offload EM to return true for read
      types IO to have read IO exchanges allocated from offload shared EM.
      
      Removes fc_em_alloc_xid function completely which was needed to manage
      two xid ranges within a EM, this is not needed any more with allocation
      of separate sharable offload EM per eth device. Instead this patch adds
      simple xid allocation logic to manage single xid range.
      
      Adds fc_exch_em_alloc with mp->next_xid as cursor to allocate new xid
      from single xid range of EM, uses mp->next_xid instead removed mp->last_xid
      which slightly increase probability of finding empty xid on exch allocation.
      
      Removes restriction of not allowing use of xid zero along with changing
      two xid range change to single xid range.
      
      Makes fc_fcp_ddp_setup calling conditional to only xid allocated from
      shared offload EM.
      Signed-off-by: NVasu Dev <vasu.dev@intel.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      d7179680
    • V
      [SCSI] fcoe: modifies fcoe_hostlist_lock uses as prep work to add shared offload EM · e8af4d43
      Vasu Dev 提交于
      Modifies fcoe_hostlist_lock uses such that a new EM allocation in
      fcoe_em_config and adding new fcoe_softc using fcoe_hostlist_add
      are atomic, this is to ensure that a shared offload EM gets allocated
      only once per eth device for its all lports.
      Signed-off-by: NVasu Dev <vasu.dev@intel.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      e8af4d43
    • V
      [SCSI] fcoe, fnic, libfc: modifies current code paths to use EM anchor list · 52ff878c
      Vasu Dev 提交于
      Modifies current code to use EM anchor list in EM allocation, EM free,
      EM reset, exch allocation and exch lookup code paths.
      
       1. Modifies fc_exch_mgr_alloc to accept EM match function and then
          have allocated EM added to the lport using fc_exch_mgr_add API
          while also updating EM kref for newly added EM.
      
       2. Updates fc_exch_mgr_free API to accept only lport pointer instead
          EM and then have this API free all EMs of the lport from EM anchor
          list.
      
       3. Removes single lport pointer link from the EM, which was used in
          associating lport pointer in newly allocated exchange. Instead have
          lport pointer passed along new exchange allocation call path and
          then store passed lport pointer in newly allocated exchange, this
          will allow a single EM instance to be used across more than one
          lport and used in EM reset to reset only lport specific exchanges.
      
       4. Modifies fc_exch_mgr_reset to reset all EMs from the EM anchor list
          of the lport, adds additional exch lport pointer (ep->lp) check for
          shared EM case to reset exchange specific to a lport requested reset.
      
       5. Updates exch allocation API fc_exch_alloc to use EM anchor list and
          its anchor match func pointer. The fc_exch_alloc will walk the list
          of EMs until it finds a match, a match will be either null match
          func pointer or call to match function returning true value.
      
       6. Updates fc_exch_recv to accept incoming frame on local port using
          only lport pointer and frame pointer without specifying EM instance
          of incoming frame. Instead modified fc_exch_recv to locate EM for the
          incoming frame by matching xid of incoming frame against a EM xid range.
          This change was required to use EM list in libfc Rx path and after this
          change the lport fc_exch_mgr pointer emp is not needed anymore, so
          removed emp pointer.
      
       7. Updates fnic for removed lport emp pointer and above modified libfc APIs
          fc_exch_recv, fc_exch_mgr_alloc and fc_exch_mgr_free.
      
       8. Removes exch_get and exch_put from libfc_function_template as these
          are no longer needed with EM anchor list and its match function use.
          Also removes its default function fc_exch_get.
      
      A defect this patch introduced regarding the libfc initialization order in
      the fnic driver was fixed by Joe Eykholt <jeykholt@cisco.com>.
      Signed-off-by: NVasu Dev <vasu.dev@intel.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      52ff878c