1. 12 4月, 2010 1 次提交
  2. 11 4月, 2010 1 次提交
  3. 05 12月, 2009 6 次提交
    • Y
      [SCSI] libfcoe: add checking disable flag in FIP_FKA_ADV · 8cdffdcc
      Yi Zou 提交于
      When the D bit is set if the FKA_ADV_Period of the FIP Discovery
      Advertisement, the ENode should not transmit period ENode FIP Keep Alive and
      VN_Port FIP Keep Alive (FC-BB-5 Rev2, 7.8.3.13).
      
      Note that fcf->flags is taken directly from the fip_header, I am claiming one
      bit for the purpose of the FIP_FKA_Period D bit as FIP_FL_FK_ADV_B, and use
      FIP_HEADER_FLAGS as bitmask for bits used in fip_header.
      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@suse.de>
      8cdffdcc
    • J
      [SCSI] libfcoe: fcoe: simplify receive FLOGI response · 386309ce
      Joe Eykholt 提交于
      There was a locking problem where the fip->lock was held during
      the call to update_mac().  The rtnl_lock() must be taken before
      the fip->lock, not the other way around.  This fixes that.
      
      Now that fcoe_ctlr_recv_flog() is called only from the response handler
      to a FLOGI request, some checking can be eliminated.  Instead of calling
      update_mac(), just fill in the granted_mac address for the passed-in
      frame (skb).
      
      Eliminate the passed-in source MAC address since it is also in the skb.
      
      Also, in fcoe, call fcoe_set_src_mac() directly instead of going thru
      the fip function pointer.  This will generate less code.
      Then, since fip isn't needed for LOGO response, use lport as the arg.
      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>
      386309ce
    • J
      [SCSI] libfcoe: FIP should report link to libfc whether selected or not · dd42dac4
      Joe Eykholt 提交于
      The fnic driver with FIP is reporting link up, even though it's down.
      
      When the interface is shut down by the switch, we receive a clear
      virtual link, and set the state reported to libfc as down, although
      we still report it up.  Clearly wrong.  That causes the subsequent
      link down event not to be reported, and /sys shows the host "Online".
      
      Currently, in FIP mode, if an FCF times out, then link to libfc
      is reported as down, to stop FLOGIs.  That interferes with the LLD
      link down being reported.
      
      Users really need to know the physical link information, to diagnose
      cabling issues, so physical link status should be reported to libfc.
      
      If the selected FCF needs to be reported, that should be done
      separately, in a later patch.
      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>
      dd42dac4
    • J
      [SCSI] libfcoe: Allow FIP to be disabled by the driver · 22bcd225
      Joe Eykholt 提交于
      Allow FIP to be disabled by the driver for devices
      that want to use libfcoe in non-FIP mode.
      
      The driver merely sets the fcoe_ctlr mode to the state which
      should be entered when the link comes up.  The default is auto.
      No change is needed for fcoe.c which uses auto mode.
      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>
      22bcd225
    • R
      [SCSI] libfcoe: formatting and comment cleanups · 70b51aab
      Robert Love 提交于
      Ensures that there are kernel-doc style comments for all
      routines and structures.
      
      There were also a few instances of fc_lport's named 'lp'
      which were switched to 'lport' as per the libfc/libfcoe/fcoe
      naming convention.
      
      Also, emacs 'indent-region' and 'tabify' were ran on libfcoe.c.
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      70b51aab
    • C
      [SCSI] libfcoe, fcoe: libfcoe NPIV support · 11b56188
      Chris Leech 提交于
      The FIP code in libfcoe needed several changes to support NPIV
      
      1) dst_src_addr needs to be managed per-n_port-ID for FPMA fabrics with NPIV
         enabled.  Managing the MAC address is now handled in fcoe, with some slight
         changes to update_mac() and a new get_src_addr() function pointer.
      
      2) The libfc elsct_send() hook is used to setup FCoE specific response
         handlers for FIP encapsulated ELS exchanges.  This lets the FCoE specific
         handling know which VN_Port the exchange is for, and doesn't require
         tracking OX_IDs.  It might be possible to roll back to the full FIP frame
         in these, but for now I've just stashed the contents of the MAC address
         descriptor in the skb context block for later use.  Also, because
         fcoe_elsct_send() just passes control on to fc_elsct_send(), all transmits
         still come through the normal frame_send() path.
      
      3) The NPIV changes added a mutex hold in the keep alive sending, the lport
         mutex is protecting the vport list.  We can't take a mutex from a timer,
         so move the FIP keep alive logic to the link work struct.
      Signed-off-by: NChris Leech <christopher.leech@intel.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      11b56188
  4. 18 5月, 2009 1 次提交
    • V
      fcoe: adds spma mode support · 184dd345
      Vasu Dev 提交于
      If we can find a type NETDEV_HW_ADDR_T_SAN mac address from the
      corresponding netdev for a fcoe interface then sets up added the
      fc->ctlr.spma flag and stores spma mode address in ctl_src_addr.
      
      In case the spma flag is set then:-
      
       1. Adds spma mode MAC address in ctl_src_addr as secondary
          MAC address, the FLOGI for FIP and pre-FIP will go out
          using this address.
       2. Cleans up stored spma MAC address in ctl_src_addr in
          fcoe_netdev_cleanup.
       3. Sets up spma bit in fip_flags for FIP solicitations along
          with exiting FPMA bit setting.
       4. Initialize the FLOGI FIP MAC descriptor to stored spma
          MAC address in ctl_src_addr. This is used as proposed
          FCoE MAC address from initiator along with both SPMA
          and FPMA bit set in FIP solicitation, in response the
          switch may grant any FPMA or SPMA mode MAC address to
          initiator.
      
      Removes FIP descriptor type checking against ELS type
      ELS_FLOGI in fcoe_ctlr_encaps to update a FIP MAC descriptor,
      instead now checks against FIP_DT_FLOGI.
      
      I've tested this with available FPMA-only FCoE switch but
      since data_src_addr is updated using same old code for
      both FPMA and SPMA modes with FIP or pre-FIP links, so added
      SPMA mode will work with SPMA-only switch also provided that
      switch grants a valid MAC address.
      Signed-off-by: NVasu Dev <vasu.dev@intel.com>
      Signed-off-by: NYi Zou <yi.zou@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      184dd345
  5. 03 4月, 2009 6 次提交
  6. 14 3月, 2009 1 次提交
    • Y
      [SCSI] libfc: add support of large receive offload by ddp in fc_fcp · b277d2aa
      Yi Zou 提交于
      When LLD supports direct data placement (ddp) for large receive of an scsi
      i/o coming into fc_fcp, we call into libfc_function_template's ddp_setup()
      to prepare for a ddp of large receive for this read I/O. When I/O is complete,
      we call the corresponding ddp_done() to get the length of data ddped as well
      as to let LLD do clean up.
      
      fc_fcp_ddp_setup()/fc_fcp_ddp_done() are added to setup and complete a ddped
      read I/O described by the given fc_fcp_pkt. They would call into corresponding
      ddp_setup/ddp_done implemented by the fcoe layer. Eventually, fcoe layer calls
      into LLD's ddp_setup/ddp_done provided through net_device
      Signed-off-by: NYi Zou <yi.zou@intel.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      b277d2aa
  7. 10 3月, 2009 2 次提交
    • V
      [SCSI] fcoe: Out of order tx frames was causing several check condition SCSI status · c826a314
      Vasu Dev 提交于
      frames followed by these errors in log.
      
      	[sdp] Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE,SUGGEST_OK
      	[sdp] Sense Key : Aborted Command [current]
      	[sdp] Add. Sense: Data phase error
      
      This was causing some test apps to exit due to write failure under heavy
      load.
      
      This was due to a race around adding and removing tx frame skb in
      fcoe_pending_queue, Chris Leech helped me to find that brief unlocking
      period when pulling skb from fcoe_pending_queue in various contexts
      (fcoe_watchdog and fcoe_xmit) and then adding skb back into fcoe_pending_queue
      up on a failed fcoe_start_io could change skb/tx frame order in
      fcoe_pending_queue. Thanks Chris.
      
      This patch allows only single context to pull skb from fcoe_pending_queue
      at any time to prevent above described ordering issue/race by use of
      fcoe_pending_queue_active flag.
      
      This patch simplified fcoe_watchdog with modified fcoe_check_wait_queue by
      use of FCOE_LOW_QUEUE_DEPTH instead previously used several conditionals
      to clear and set lp->qfull.
      
      I think FCOE_MAX_QUEUE_DEPTH with FCOE_LOW_QUEUE_DEPTH  will work better
      in re/setting lp->qfull and these could be fine tuned for performance.
      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>
      c826a314
    • R
      [SCSI] libfc, fcoe: Remove unnecessary cast by removing inline wrapper · fc47ff6b
      Robert Love 提交于
      Comment from "Andrew Morton <akpm@linux-foundation.org>"
      
      > +{
      > +     return (struct fcoe_softc *)lport_priv(lp);
      
      unneeded/undesirable cast of void*.  There are probably zillions of
      instances of this - there always are.
      
      This whole inline function was unnecessary. The FCoE layer knows
      that it's data structure is stored in the lport private data, it
      can just access it from lport_priv().
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      fc47ff6b
  8. 30 12月, 2008 1 次提交