1. 26 6月, 2013 1 次提交
    • R
      fcoe: Use correct API to set vlan tag for FCoE Ethertype skbs · 2884d423
      Robert Love 提交于
      fcoe_xmit was coded such that it would skip the vlan net device/layer
      and instead set some vlan flags and transmit on the real net device.
      The real net device has code that would add the vlan tag for fcoe skbs.
      This avoids some extra processing for data frames and provides a small
      performance improvement.
      
      Since fcoe_xmit was not using the vlan net device, __vlan_put_tag
      within the real net device's xmit routine was ultimately being
      called to set the vlan tag.
      
      With the below change the behavior of __vlan_put_tag changed slightly,
      it now sets the skb->protocol = vlan_proto. vlan_proto was not a field
      being set by fcoe_xmit, so the skb->protocol is now not being set to
      ETH_P_8021Q, as it should be.
      
      This patch converts fcoe_xmit to use the vlan_put_tag routine which
      will tag the skb and fcoe will continue to transmit fcoe skbs on the
      real net device.
      
      For reference, the below change was the one that altered the
      __vlan_put_tag behavior.
      
        commit 86a9bad3
        Author: Patrick McHardy <kaber@trash.net>
        Date:   Fri Apr 19 02:04:30 2013 +0000
      
            net: vlan: add protocol argument to packet tagging functions
      
            Add a protocol argument to the VLAN packet tagging functions. In case of HW
            tagging, we need that protocol available in the ndo_start_xmit functions,
            so it is stored in a new field in the skb. The new field fits into a hole
            (on 64 bit) and doesn't increase the sks's size.
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      Acked-by: NNeil Horman <nhorman@tuxdriver.com>
      Acked-by: NJohn Fastabend <john.r.fastabend@intel.com>
      2884d423
  2. 17 6月, 2013 1 次提交
  3. 14 6月, 2013 1 次提交
    • R
      tcm_qla2xxx: Fix residual for underrun commands that fail · b5aff3d2
      Roland Dreier 提交于
      Suppose an initiator sends a DATA IN command with an allocation length
      shorter than the FC transfer length -- we get a target message like
      
          TARGET_CORE[qla2xxx]: Expected Transfer Length: 256 does not match SCSI CDB Length: 0 for SAM Opcode: 0x12
      
      In that case, the target core adjusts the data_length and sets
      se_cmd->residual_count for the underrun.  But now suppose that command
      fails and we end up in tcm_qla2xxx_queue_status() -- that function
      unconditionally overwrites residual_count with the already adjusted
      data_length, and the initiator will burp with a message like
      
          qla2xxx [0000:00:06.0]-301d:0: Dropped frame(s) detected (0x100 of 0x100 bytes).
      
      Fix this by adding on to the existing underflow residual count instead.
      Signed-off-by: NRoland Dreier <roland@purestorage.com>
      Cc: Giridhar Malavali <giridhar.malavali@qlogic.com>
      Cc: Chad Dupuis <chad.dupuis@qlogic.com>
      Cc: stable <stable@vger.kernel.org>
      Signed-off-by: NNicholas Bellinger <nab@linux-iscsi.org>
      b5aff3d2
  4. 01 6月, 2013 1 次提交
  5. 21 5月, 2013 1 次提交
  6. 13 5月, 2013 2 次提交
  7. 11 5月, 2013 3 次提交
    • N
      libfc: extend ex_lock to protect all of fc_seq_send · fb00cc23
      Neil Horman 提交于
      This warning was reported recently:
      
      WARNING: at drivers/scsi/libfc/fc_exch.c:478 fc_seq_send+0x14f/0x160 [libfc]()
      (Not tainted)
      Hardware name: ProLiant DL120 G7
      Modules linked in: tcm_fc target_core_iblock target_core_file target_core_pscsi
      target_core_mod configfs dm_round_robin dm_multipath 8021q garp stp llc bnx2fc
      cnic uio fcoe libfcoe libfc scsi_transport_fc scsi_tgt autofs4 sunrpc
      pcc_cpufreq ipv6 hpilo hpwdt e1000e microcode iTCO_wdt iTCO_vendor_support
      serio_raw shpchp ixgbe dca mdio sg ext4 mbcache jbd2 sd_mod crc_t10dif pata_acpi
      ata_generic ata_piix hpsa dm_mirror dm_region_hash dm_log dm_mod [last unloaded:
      scsi_wait_scan]
      Pid: 5464, comm: target_completi Not tainted 2.6.32-272.el6.x86_64 #1
      Call Trace:
       [<ffffffff8106b747>] ? warn_slowpath_common+0x87/0xc0
       [<ffffffff8106b79a>] ? warn_slowpath_null+0x1a/0x20
       [<ffffffffa025f7df>] ? fc_seq_send+0x14f/0x160 [libfc]
       [<ffffffffa035cbce>] ? ft_queue_status+0x16e/0x210 [tcm_fc]
       [<ffffffffa030a660>] ? target_complete_ok_work+0x0/0x4b0 [target_core_mod]
       [<ffffffffa030a766>] ? target_complete_ok_work+0x106/0x4b0 [target_core_mod]
       [<ffffffffa030a660>] ? target_complete_ok_work+0x0/0x4b0 [target_core_mod]
       [<ffffffff8108c760>] ? worker_thread+0x170/0x2a0
       [<ffffffff810920d0>] ? autoremove_wake_function+0x0/0x40
       [<ffffffff8108c5f0>] ? worker_thread+0x0/0x2a0
       [<ffffffff81091d66>] ? kthread+0x96/0xa0
       [<ffffffff8100c14a>] ? child_rip+0xa/0x20
       [<ffffffff81091cd0>] ? kthread+0x0/0xa0
       [<ffffffff8100c140>] ? child_rip+0x0/0x20
      
      It occurs because fc_seq_send can have multiple contexts executing within it at
      the same time, and fc_seq_send doesn't consistently use the ep->ex_lock that
      protects this structure.  Because of that, its possible for one context to clear
      the INIT bit in the ep->esb_state field while another checks it, leading to the
      above stack trace generated by the WARN_ON in the function.
      
      We should probably undertake the effort to convert access to the fc_exch
      structures to use rcu, but that a larger work item.  To just fix this specific
      issue, we can just extend the ex_lock protection through the entire fc_seq_send
      path
      Signed-off-by: NNeil Horman <nhorman@tuxdriver.com>
      Reported-by: NGris Ge <fge@redhat.com>
      CC: Robert Love <robert.w.love@intel.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      fb00cc23
    • M
      libfc: Correct check for initiator role · 732bdb9d
      Mark Rustad 提交于
      The service_params field is being checked against the symbol
      FC_RPORT_ROLE_FCP_INITIATOR where it really should be checked
      against FCP_SPPF_INIT_FCN.
      Signed-off-by: NMark Rustad <mark.d.rustad@intel.com>
      Tested-by: NJack Morgan <jack.morgan@intel.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      732bdb9d
    • K
      libfcoe: Fix Conflicting FCFs issue in the fabric · e6c10b7c
      Krishna Mohan 提交于
      When multiple FCFs in use, and first FIP Advertisement received is
      with "Available for Login" i.e A bit set to 0, FCF selection will fail.
      The fix is to remove the assumption in the code that first FCF is only
      allowed selectable FCF.
      Consider the scenario fip->fcfs contains FCF1(fabricname X, marked A=0)
      FCF2(fabricname Y, marked A=1). list_first_entry(first) points to FCF1
      and 1st iteration we ignore the FCF and on 2nd iteration we compare
      FCF1 & FCF2 fabric name and we fails to perform FCF selection.
      Signed-off-by: NKrishna Mohan <krmohan@cisco.com>
      Reviewed-by: NBhanu Prakash Gollapudi <bprakash@broadcom.com>
      Signed-off-by: NRobert Love <robert.w.love@intel.com>
      e6c10b7c
  8. 10 5月, 2013 16 次提交
  9. 08 5月, 2013 1 次提交
  10. 07 5月, 2013 3 次提交
  11. 05 5月, 2013 2 次提交
  12. 03 5月, 2013 8 次提交