1. 02 Apr, 2017 4 commits
    • David S. Miller's avatar
      Merge branch 'phylib-EEE-updates' · 88f913f5
      David S. Miller authored
      Russell King says:
      
      ====================
      phylib EEE updates
      
      This series of patches depends on the previous set of changes, and is
      therefore net-next material.
      
      While testing the EEE code, I discovered a number of issues:
      
      1. It is possible to enable advertisment of EEE modes which are not
         supported by the hardware.  We omit to check the supported modes
         and mask off those modes that are not supported before writing the
         EEE advertisment register.
      
      2. We need to restart autonegotiation after a change of the EEE
         advertisment, otherwise the link partner does not see the updated
         EEE modes.
      
      3. SGMII connected PHYs are also capable of supporting EEE.
      
      Through discussion with Florian, it has been decided to remove the check
      for the PHY interface mode in patch (3).
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      88f913f5
    • Russell King's avatar
      net: phy: allow EEE with any interface mode · 32d75141
      Russell King authored
      EEE is able to work in any PHY interface mode, there is nothing which
      fundamentally restricts it to only a few modes.  For example, EEE works
      in SGMII mode with the Marvell 88E1512.
      
      Rather than just adding SGMII mode to the list, Florian suggests
      removing the list of interface modes entirely:
      
        It actually sounds like we should just kill the check entirely,
        it does not appear that any of the interface mode would not
        fundamentally be able to support EEE, because the "lowest" mode
        we support is MII, and even there it's quite possible to support
        EEE.
      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>
      32d75141
    • Russell King's avatar
      net: phy: restart phy autonegotiation after EEE advertisment change · f75abeb8
      Russell King authored
      When the EEE advertisment is changed, we should restart autonegotiation
      to update the link partner with the new EEE settings.  Add this trigger
      but only if the advertisment has changed.
      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>
      f75abeb8
    • 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 14 commits