1. 28 8月, 2017 1 次提交
  2. 26 8月, 2017 1 次提交
    • S
      i40evf: prevent VF close returning before state transitions to DOWN · fe2647ab
      Sudheer Mogilappagari 提交于
      Currently i40evf_close() can return before state transitions to
      __I40EVF_DOWN because of the latency involved in processing and
      receiving response from PF driver and scheduling of VF watchdog_task.
      Due to this inconsistency an immediate call to i40evf_open() fails
      because state is still DOWN_PENDING.
      
      When a VF interface is in up state and we try to add it as slave,
      The bonding driver calls dev_close() and dev_open() in short duration
      resulting in dev_open returning error. The ifenslave command needs
      to be run again for dev_open to succeed.
      
      This fix ensures that watchdog timer is scheduled immediately after
      admin queue operations are scheduled in i40evf_down(). In addition a
      wait condition is added at the end of i40evf_close so that function
      wont return when state is still DOWN_PENDING. The timeout value is
      chosen after some profiling and includes some buffer.
      Signed-off-by: NSudheer Mogilappagari <sudheer.mogilappagari@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      fe2647ab
  3. 02 6月, 2017 3 次提交
    • J
      virtchnl: finish conversion to virtchnl interface · ff3f4cc2
      Jesse Brandeburg 提交于
      This patch implements the complete version of the virtchnl.h file
      with final renames, and fixes the related code in i40e and i40evf.
      
      It also expands comments, and adds details on the usage of
      certain fields.
      
      In addition, due to the changes a couple of casts are needed
      to prevent errors found by sparse after renaming some fields.
      Signed-off-by: NJesse Brandeburg <jesse.brandeburg@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      ff3f4cc2
    • J
      i40evf/virtchnl: whitespace cleanups · f0adc6e8
      Jesse Brandeburg 提交于
      This patch fixes up a bunch of whitespace issues introduced
      by the previous automated change of name from i40e to virtchnl.
      Signed-off-by: NJesse Brandeburg <jesse.brandeburg@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      f0adc6e8
    • J
      virtchnl: rename i40e to generic virtchnl · 310a2ad9
      Jesse Brandeburg 提交于
      This morphs all the i40e and i40evf references to/in virtchnl.h
      to be generic, using only automated methods. Updates all the
      callers to use the new names.  A followup patch provides separate
      clean ups for messy line conversions from these "automatic"
      changes, to make them more reviewable.
      
      Was executed with the following sed script:
      sed -i -f transform_script drivers/net/ethernet/intel/i40e/i40e_client.c
      sed -i -f transform_script drivers/net/ethernet/intel/i40e/i40e_prototype.h
      sed -i -f transform_script drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c
      sed -i -f transform_script drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.h
      sed -i -f transform_script drivers/net/ethernet/intel/i40evf/i40e_common.c
      sed -i -f transform_script drivers/net/ethernet/intel/i40evf/i40e_prototype.h
      sed -i -f transform_script drivers/net/ethernet/intel/i40evf/i40evf.h
      sed -i -f transform_script drivers/net/ethernet/intel/i40evf/i40evf_client.c
      sed -i -f transform_script drivers/net/ethernet/intel/i40evf/i40evf_main.c
      sed -i -f transform_script drivers/net/ethernet/intel/i40evf/i40evf_virtchnl.c
      sed -i -f transform_script include/linux/avf/virtchnl.h
      
      transform_script:
      ----8<----
      s/I40E_VIRTCHNL_SUPPORTED_QTYPES/SAVE_ME_SUPPORTED_QTYPES/g
      s/I40E_VIRTCHNL_VF_CAP/SAVE_ME_VF_CAP/g
      
      s/I40E_VIRTCHNL_/VIRTCHNL_/g
      s/i40e_virtchnl_/virtchnl_/g
      s/i40e_vfr_/virtchnl_vfr_/g
      s/I40E_VFR_/VIRTCHNL_VFR_/g
      
      s/VIRTCHNL_OP_ADD_ETHER_ADDRESS/VIRTCHNL_OP_ADD_ETH_ADDR/g
      s/VIRTCHNL_OP_DEL_ETHER_ADDRESS/VIRTCHNL_OP_DEL_ETH_ADDR/g
      s/VIRTCHNL_OP_FCOE/VIRTCHNL_OP_RSVD/g
      
      s/SAVE_ME_SUPPORTED_QTYPES/I40E_VIRTCHNL_SUPPORTED_QTYPES/g
      s/SAVE_ME_VF_CAP/I40E_VIRTCHNL_VF_CAP/g
      ----8<----
      Signed-off-by: NJesse Brandeburg <jesse.brandeburg@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      310a2ad9
  4. 31 5月, 2017 2 次提交
  5. 20 4月, 2017 1 次提交
  6. 07 4月, 2017 1 次提交
  7. 29 3月, 2017 2 次提交
  8. 15 3月, 2017 1 次提交
  9. 12 2月, 2017 1 次提交
  10. 07 12月, 2016 1 次提交
  11. 23 9月, 2016 1 次提交
    • S
      i40evf: Fix link state event handling · 3f341acc
      Sridhar Samudrala 提交于
      Currently disabling the link state from PF via
      	ip link set enp5s0f0 vf 0 state disable
      doesn't disable the CARRIER on the VF.
      
      This patch updates the carrier and starts/stops the tx queues based on the
      link state notification from PF.
      
        PF: enp5s0f0, VF: enp5s2
        #modprobe i40e
        #echo 2 > /sys/class/net/enp5s0f0/device/sriov_numvfs
        #ip link set enp5s2 up
        #ip -d link show enp5s2
        175: enp5s2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
            link/ether ea:4d:60:bc:6f:85 brd ff:ff:ff:ff:ff:ff promiscuity 0 addrgenmode eui64
        #ip link set enp5s0f0 vf 0 state disable
        #ip -d link show enp5s0f0
        171: enp5s0f0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
            link/ether 68:05:ca:2e:72:68 brd ff:ff:ff:ff:ff:ff promiscuity 0 addrgenmode eui64 numtxqueues 72 numrxqueues 72 portid 6805ca2e7268
            vf 0 MAC 00:00:00:00:00:00, spoof checking on, link-state disable, trust off
            vf 1 MAC 00:00:00:00:00:00, spoof checking on, link-state auto, trust off
        #ip -d link show enp5s2
        175: enp5s2: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN mode DEFAULT group default qlen 1000
             link/ether ea:4d:60:bc:6f:85 brd ff:ff:ff:ff:ff:ff promiscuity 0 addrgenmode eui64 numtxqueues 16 numrxqueues 16
      Signed-off-by: NSridhar Samudrala <sridhar.samudrala@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      3f341acc
  12. 20 8月, 2016 1 次提交
  13. 28 6月, 2016 1 次提交
  14. 14 5月, 2016 1 次提交
  15. 06 5月, 2016 1 次提交
  16. 28 4月, 2016 1 次提交
  17. 27 4月, 2016 1 次提交
  18. 18 2月, 2016 1 次提交
  19. 04 2月, 2016 1 次提交
    • M
      i40evf: allow channel bonding of VFs · 209dc4da
      Mitch Williams 提交于
      In some modes, bonding would not enslave VF interfaces. This is due to
      bonding calling change_mtu and the immediately calling open. Because of
      the asynchronous nature of the admin queue mechanism, the VF returns
      -EBUSY to the open call, because it knows the previous operation hasn't
      finished yet. This causes bonding to fail with a less-than-useful error
      message.
      
      To fix this, remove the check for pending operations at the beginning of
      open. But this introduces a new bug where the driver will panic on a
      quick close/open cycle. To fix that, we add a new driver state,
      __I40EVF_DOWN_PENDING, that the driver enters when down is called. The
      driver finally transitions to a fully DOWN state when it receives
      confirmation from the PF driver that all the queues are disabled. This
      allows open to complete even if there is a pending mtu change, and
      bonding is finally happy.
      
      Change-ID: I06f4c7e435d5bacbfceaa7c3f209e0ff04be21cc
      Signed-off-by: NMitch Williams <mitch.a.williams@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      209dc4da
  20. 13 12月, 2015 1 次提交
  21. 03 12月, 2015 1 次提交
  22. 02 12月, 2015 2 次提交
  23. 26 11月, 2015 2 次提交
  24. 15 10月, 2015 1 次提交
  25. 08 10月, 2015 1 次提交
  26. 04 10月, 2015 1 次提交
    • M
      i40evf: don't blow away MAC address · 8552d854
      Mitch Williams 提交于
      Under certain circumstances, we can get an extra VF_RESOURCES message
      from the PF driver at runtime. When this happens, we need to parse it
      because our VSI may have changed out from underneath us, and that will
      affect our relationship with the PF driver.
      
      However, parsing the resources message also blows away our current MAC
      address in the hardware struct, usually with all zeros. When this
      happens, the next time the interface is opened, it will have no MAC
      address and will a) not work and b) complain.
      
      Fix this issue by restoring the current MAC address from the netdev
      struct after we parse the resource message.
      
      Change-ID: I6cd1b624fc20432f81dc901166c8de195b8e0e65
      Signed-off-by: NMitch Williams <mitch.a.williams@intel.com>
      Tested-by: NAndrew Bowers <andrewx.bowers@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      8552d854
  27. 23 7月, 2015 4 次提交
  28. 15 4月, 2015 1 次提交
  29. 27 3月, 2015 1 次提交
    • M
      i40evf: delay releasing rings · e284fc88
      Mitch Williams 提交于
      When the VF interface is closed, we cannot immediately free our rings
      and RX buffers, because the hardware hasn't yet stopped accessing this
      memory. This shows up as a panic or memory corruption when the device is
      brought down while under heavy stress.
      
      To fix this, delay releasing resources until we receive acknowledgment
      from the PF driver that the rings have indeed been stopped. Because of
      this delay, we also need to check to make sure that all of our admin
      queue requests have been handled before allowing the device to be
      opened.
      
      Change-ID: I44edd35529ce2fa2a9512437a3a8e6f14ed8ed63
      Signed-off-by: NMitch Williams <mitch.a.williams@intel.com>
      Tested-by: NJim Young <james.m.young@intel.com>
      Signed-off-by: NJeff Kirsher <jeffrey.t.kirsher@intel.com>
      e284fc88
  30. 14 1月, 2015 2 次提交