1. 11 9月, 2009 7 次提交
  2. 05 9月, 2009 3 次提交
    • V
      [SCSI] fcoe, libfc: adds per cpu exch pool within exchange manager(EM) · e4bc50be
      Vasu Dev 提交于
      Adds per cpu exch pool for these reasons:-
      
       1. Currently an EM instance is shared across all cpus to manage
          all exches for all cpus. This required em_lock across all
          cpus for an exch alloc, free, lookup and reset each frame
          and that made em_lock expensive, so instead having per cpu
          exch pool with their own per cpu pool lock will likely reduce
          locking contention in fast path for an exch alloc, free and
          lookup.
      
       2. Per cpu exch pool will likely improve cache hit ratio since
          all frames of an exch will be processed on the same cpu on
          which exch originated.
      
      This patch is only prep work to help in keeping complexity of next
      patch low, so this patch only sets up per cpu exch pool and related
      helper funcs to be used by next patch. The next patch fully makes
      use of per cpu exch pool in all code paths ie. tx, rx and reset.
      
      Divides per EM exch id range equally across all cpus to setup per
      cpu exch pool. This division is such that lower bits of exch id
      carries cpu number info on which exch originated, later a simple
      bitwise AND operation on exch id of incoming frame with fc_cpu_mask
      retrieves cpu number info to direct all frames to same cpu on which
      exch originated. This required a global fc_cpu_mask and fc_cpu_order
      initialized to max possible cpus number nr_cpu_ids rounded up to 2's
      power, this will be used in mapping exch id and exch ptr array
      index in pool during exch allocation, find or reset code paths.
      
      Adds a check in fc_exch_mgr_alloc() to ensure specified min_xid
      lower bits are zero since these bits are used to carry cpu info.
      
      Adds and initializes struct fc_exch_pool with all required fields
      to manage exches in pool.
      
      Allocates per cpu struct fc_exch_pool with memory for exches array
      for range of exches per pool. The exches array memory is followed
      by struct fc_exch_pool.
      
      Adds fc_exch_ptr_get/set() helper functions to get/set exch ptr in
      pool exches array at specified array index.
      
      Increases default FCOE_MAX_XID to 0x0FFF from 0x07EF, so that more
      exches are available per cpu after above described exch id range
      division across all cpus to each pool.
      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>
      e4bc50be
    • J
      [SCSI] fcoe: libfcoe: extra semicolon in CHECK_LOGGING macros causes compile error · a69b06bc
      Joe Eykholt 提交于
      If using code like this:
      	if (foo)
      		FCOE_DBG("foo\n);
      	else
      		FCOE_DBG("bar\n");
      
      one gets compile errors because FCOE_DBG expands with its own semicolon,
      making one too many for the if-statement.
      
      Remove the offending semicolon in fcoe.h and also a similar case
      in libfcoe.c.
      Signed-off-by: NJoe Eykholt <jeykholt@cisco.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      a69b06bc
    • R
      [SCSI] fcoe: Add format spacing to FCOE_NETDEV_DBG debug macro · ee610c67
      Robert Love 提交于
      There's currently no space between the interface name and the
      user specified format/string. This patch adds a space and a colon
      to the output to separate the interface name and the user
      specified string.
      
      So, instead of "ethXfoo" it will read "ethX: foo".
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      ee610c67
  3. 23 8月, 2009 2 次提交
    • 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
    • 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
  4. 22 6月, 2009 1 次提交
  5. 09 6月, 2009 1 次提交
    • V
      [SCSI] fcoe: removes fcoe_watchdog · 1047f221
      Vasu Dev 提交于
      Removes periodic fcoe_watchdog timer used across all fcoe interface
      maintained in fcoe_hostlist instead added new fcoe_queue_timer
      per fcoe interface.
      
      Added timer is armed only when some pending skb need to be flushed
      as oppose to periodic 1 second fcoe_watchdog, since now
      fcoe_queue_timer is used on demand thus set this to 2 jiffies.
      
      Now fcoe_queue_timer is much simple than fcoe_watchdog using lock to
      process all fcoe interface from fcoe_hostlist.
      
      I noticed +ve performance result with using 2 jiffies timer as
      this helps flushing fcoe_pending_queue quickly.
      Signed-off-by: NVasu Dev <vasu.dev@intel.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      1047f221
  6. 03 4月, 2009 2 次提交