1. 09 Aug, 2017 2 commits
    • Cliff Spradlin's avatar
      igb: protect TX timestamping from API misuse · 26bd4e2d
      Cliff Spradlin authored
      HW timestamping can only be requested for a packet if the NIC is first
      setup via ioctl(SIOCSHWTSTAMP). If this step was skipped, then the igb
      driver still allowed TX packets to request HW timestamping. In this
      situation, the _IGB_PTP_TX_IN_PROGRESS flag was set and would never
      clear. This prevented any future HW timestamping requests to succeed.
      
      Fix this by checking that the NIC is configured for HW TX timestamping
      before accepting a HW TX timestamping request.
      Signed-off-by: default avatarCliff Spradlin <cspradlin@google.com>
      Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      26bd4e2d
    • Gangfeng Huang's avatar
      igb: Fix error of RX network flow classification · 94221ae7
      Gangfeng Huang authored
      After add an ethertype filter, if user change the adapter speed several
      times, the error "ethtool -N: etype filters are all used" is reported by
      igb driver.
      
      In older patch, function igb_nfc_filter_exit() and igb_nfc_filter_restore()
      is not paried. igb_nfc_filter_restore() exist in igb_up(), but function
      igb_nfc_filter_exit() is exist in __igb_close(). In the process of speed
      changing, only igb_nfc_filter_restore() is called, it will take a position
      of ethertype bitmap.
      
      Reproduce steps:
      Step 1: Add a etype filter by ethtool
      $ethtool -N eth0 flow-type ether proto 0x88F8 action 1
      Step 2: Change the adapter speed to 100M/full duplex
      $ethtool -s eth0 speed 100 duplex full
      Step 3: Change the adapter speed to 1000M/full duplex
      ethtool -s eth0 speed 1000 duplex full
      Repeat step2 and step3, then dmesg the system log, you can find the error
      message, add new ethtype filter is also failed.
      
      This fixing is move igb_nfc_filter_exit() from __igb_close() to igb_down()
      to make igb_nfc_filter_restore()/igb_nfc_filter_exit() is paired.
      Signed-off-by: default avatarGangfeng Huang <gangfeng.huang@ni.com>
      Tested-by: default avatarAaron Brown <aaron.f.brown@intel.com>
      Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
      94221ae7
  2. 07 Aug, 2017 38 commits