1. 02 Apr, 2017 1 commit
    • Russell King's avatar
      net: phy: avoid setting unsupported EEE advertisments · 83ea067f
      Russell King authored
      We currently allow userspace to set any EEE advertisments it desires,
      whether or not the PHY supports them.  For example:
      
       # ethtool --set-eee eth1 advertise 0xffffffff
       # ethtool --show-eee eth1
       EEE Settings for eth1:
              EEE status: disabled
              Tx LPI: disabled
              Supported EEE link modes:  100baseT/Full
                                         1000baseT/Full
                                         10000baseT/Full
              Advertised EEE link modes:  100baseT/Full
                                          1000baseT/Full
                                          1000baseKX/Full
                                          10000baseT/Full
                                          10000baseKX4/Full
                                          10000baseKR/Full
      
      Clearly, this is not sane, we should only allow link modes that are
      supported to be advertised (as we do elsewhere.)  Ensure that we mask
      the MDIO_AN_EEE_ADV value with the capabilities retrieved from the
      MDIO_PCS_EEE_ABLE register.
      Reviewed-by: default avatarFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: default avatarRussell King <rmk+kernel@armlinux.org.uk>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      83ea067f
  2. 01 Apr, 2017 21 commits
  3. 31 Mar, 2017 1 commit
    • Paolo Abeni's avatar
      sock: avoid dirtying sk_stamp, if possible · 6c7c98ba
      Paolo Abeni authored
      sock_recv_ts_and_drops() unconditionally set sk->sk_stamp for
      every packet, even if the SOCK_TIMESTAMP flag is not set in the
      related socket.
      If selinux is enabled, this cause a cache miss for every packet
      since sk->sk_stamp and sk->sk_security share the same cacheline.
      With this change sk_stamp is set only if the SOCK_TIMESTAMP
      flag is set, and is cleared for the first packet, so that the user
      perceived behavior is unchanged.
      
      This gives up to 5% speed-up under udp-flood with small packets.
      Signed-off-by: default avatarPaolo Abeni <pabeni@redhat.com>
      Acked-by: default avatarEric Dumazet <edumazet@google.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      6c7c98ba
  4. 30 Mar, 2017 16 commits
  5. 29 Mar, 2017 1 commit
    • David S. Miller's avatar
      Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/next-queue · 397df709
      David S. Miller authored
      Jeff Kirsher says:
      
      ====================
      40GbE Intel Wired LAN Driver Updates 2017-03-29
      
      This series contains updates to i40e and i40evf only.
      
      Preethi changes the default driver mode of operation to descriptor
      write-back for VF.
      
      Alex cleans up and addresses several issues in the way that i40e handles
      private flags.  Modifies the driver to use the length of the packet
      instead of the DD status bit to determine if a new descriptor is ready
      to be processed.  Refactors the driver by pulling the code responsible
      for fetching the receive buffer and synchronizing DMA into a single
      function.  Also pulled the code responsible for handling buffer
      recycling and page counting and distributed it through several functions,
      so we can commonize the bits that handle either freeing or recycling the
      buffers.  Cleans up the code in preparation for us adding support for
      build_skb().  Changed the way we handle the maximum frame size for the
      receive path so it is more consistent with other drivers.
      
      Paul enables XL722 to use the direct read/write method since it does not
      support the AQ command to read/write the control register.
      
      Christopher fixes a case where we miss an arq element if a new one is
      added before we enable interrupts and exit the loop.
      
      Jake cleans up a pointless goto statement.  Also cleaned up a flag that
      was not being used.
      
      Carolyn does round 2 for adding a delay to the receive queue to
      accommodate the hardware needs.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      397df709