1. 13 2月, 2011 7 次提交
  2. 22 12月, 2010 9 次提交
  3. 26 10月, 2010 3 次提交
    • R
      [SCSI] fcoe: Fix broken NPIV with correction to MAC validation · 0ee31cb5
      Robert Love 提交于
      A previous patch attempted to validate the destination
      MAC address of a FCoE frame by checking that MAC
      address against the received port's MAC address. The
      implementation seems fine on the surface, but any
      VN_Ports added using the NPIV feature will have their
      own MAC addresses and these MACs were not being checked,
      which prevented any NPIV VN_Ports from receiving frames.
      
      In other words, the following patch has broken NPIV.
      
      519e5135
       [SCSI] fcoe: adds src and dest mac address
                    checking for fcoe frames
      
      Part of the offending patch is correct, but the part
      that broke NPIV was attempting to satisfy FC-BB-5
      section D.5, 2.1-
      
      (discard frames that) "contain a destination MAC
      address/destination N_Port_ID pair that was not
      assigned by an FCF to one of the VN_Ports on the ENode"
      
      The language does _not_ say to compare the destination
      FC-MAP/destination N_Port_ID, but instead to compare
      the destination MAC address/destination N_Port_ID.
      
      >From the FC-BB-5 specification,
      
      "A properly formed FPMA is one in which the 24 most
      significant bits equal the Fabric’s FC-MAP value and
      the least significant 24 bits equal the N_Port_ID
      assigned to the VN_Port by the FCF."
      
      This means that we need to compare the FC Frame's
      destination FCID against the embedded FCID in the
      destination MAC address. This patch checks the lower
      24 bits of the destination MAC address against
      destination FCID in the Fibre Channel frame.
      
      For MAC validation the first line of defense is the
      hardware MAC filtering. Each VN_Port will have a
      unicast MAC addresses added to the hardware's
      filtering table. The Ethernet driver should drop any
      MACs not destined for a programmed MAC. This patch
      adds a second line of defense that very specfically
      compares an element in the FC frame against an element
      in the Ethernet header, which is appropriate for the
      FCoE layer.
      
      Many alternative approaches were considered, including
      a LLD callback from libfc. The second most reasonable
      approach seemed to be walking the list of NPIV ports
      and check each of their MAC addresses against the
      destination MAC address of the received frame. The
      problem with this approach was that it is likely that
      performance would suffer with the more NPIV ports added
      to the system since every received frame would need to
      walk this list, comparing each entry's MAC.
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@suse.de>
      0ee31cb5
    • K
      [SCSI] libfcoe: VN2VN connection setup causing stack memory corruption. · 2dc02ee5
      Kiran Patil 提交于
      Fix: When FIP frame is received, function fcoe_ctlr_vn_recv calls function
      fcoe_ctlr_vn_parse which does memset for addr (&buf.rdata) which leads to
      memory corruption. Code was trying to treat "buf" as struct but it was defined
      as union. Fix is to change from union to struct for "buf" in function fcoe_ctlr_vn_recv.
      
      Technical Details: N/A
      Signed-off-by: NKiran Patil <kiran.patil@intel.com>
      Acked-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>
      2dc02ee5
    • V
      [SCSI] fcoe: set default FIP mode as FIP_MODE_FABRIC · 3067817a
      Vasu Dev 提交于
      Since sometimes current FIP_MODE_AUTO mode falls back to non-FIP
      mode while DCB link still getting ready in fabric mode with
      its peer switch, it falls back after few libfc flogi retries
      and that is not we want while working with FIP enabled
      switches in FABRIC mode, therefore sets default as FIP_MODE_FABRIC
      as discussed and agreed before in this mail thread
      http://www.open-fcoe.org/pipermail/devel/2010-August/010511.htmlSigned-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>
      3067817a
  4. 28 7月, 2010 21 次提交