1. 29 Aug, 2019 8 commits
    • Ioana Radulescu's avatar
      dpaa2-eth: Add pause frame support · 8eb3cef8
      Ioana Radulescu authored
      Starting with firmware version MC10.18.0, we have support for
      L2 flow control. Asymmetrical configuration (Rx or Tx only) is
      supported, but not pause frame autonegotioation.
      
      Pause frame configuration is done via ethtool. By default, we start
      with flow control enabled on both Rx and Tx. Changes are propagated
      to hardware through firmware commands, using two flags (PAUSE,
      ASYM_PAUSE) to specify Rx and Tx pause configuration, as follows:
      
      PAUSE | ASYM_PAUSE | Rx pause | Tx pause
      ----------------------------------------
        0   |     0      | disabled | disabled
        0   |     1      | disabled | enabled
        1   |     0      | enabled  | enabled
        1   |     1      | enabled  | disabled
      
      The hardware can automatically send pause frames when the number
      of buffers in the pool goes below a predefined threshold. Due to
      this, flow control is incompatible with Rx frame queue taildrop
      (both mechanisms target the case when processing of ingress
      frames can't keep up with the Rx rate; for large frames, the number
      of buffers in the pool may never get low enough to trigger pause
      frames as long as taildrop is enabled). So we set pause frame
      generation and Rx FQ taildrop as mutually exclusive.
      Signed-off-by: default avatarIoana Radulescu <ruxandra.radulescu@nxp.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8eb3cef8
    • Ioana Radulescu's avatar
      dpaa2-eth: Use stored link settings · cce62943
      Ioana Radulescu authored
      Whenever a link state change occurs, we get notified and save
      the new link settings in the device's private data. In ethtool
      get_link_ksettings, use the stored state instead of interrogating
      the firmware each time.
      Signed-off-by: default avatarIoana Radulescu <ruxandra.radulescu@nxp.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      cce62943
    • Ioana Radulescu's avatar
      dpaa2-eth: Remove support for changing link settings · f7fe7e3d
      Ioana Radulescu authored
      We only support fixed-link for now, so there is no point in
      offering users the option to change link settings via ethtool.
      
      Functionally there is no change, since firmware prevents us from
      changing link parameters anyway.
      Signed-off-by: default avatarIoana Radulescu <ruxandra.radulescu@nxp.com>
      Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f7fe7e3d
    • David S. Miller's avatar
      Merge branch 'mlxsw-Various-updates' · 198836fd
      David S. Miller authored
      Ido Schimmel says:
      
      ====================
      mlxsw: Various updates
      
      Patch #1 from Amit removes 56G speed support. The reasons for this are
      detailed in the commit message.
      
      Patch #2 from Shalom ensures that the hardware does not auto negotiate
      the number of used lanes. For example, if a four lane port supports 100G
      over both two and four lanes, it will not advertise the two lane link
      mode.
      
      Patch #3 bumps the firmware version supported by the driver.
      
      Patch #4 from Petr adds ethtool counters to help debug the internal PTP
      implementation in mlxsw. I copied Richard on this patch in case he has
      comments.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      198836fd
    • Petr Machata's avatar
      mlxsw: spectrum_ptp: Add counters for GC events · dc4f3eb0
      Petr Machata authored
      On Spectrum-1, timestamped PTP packets and the corresponding timestamps need to
      be kept in caches until both are available, at which point they are matched up
      and packets forwarded as appropriate. However, not all packets will ever see
      their timestamp, and not all timestamps will ever see their packet. It is
      necessary to dispose of such abandoned entries, so a garbage collector was
      introduced in commit 5d23e415 ("mlxsw: spectrum: PTP: Garbage-collect
      unmatched entries").
      
      If these GC events happen often, it is a sign of a problem. However because this
      whole mechanism is taking place behind the scenes, there is no direct way to
      determine whether garbage collection took place.
      
      Therefore to fix this, on Spectrum-1 only, expose four artificial ethtool
      counters for the GC events: GCd timestamps and packets, in TX and RX directions.
      
      Cc: Richard Cochran <richardcochran@gmail.com>
      Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      dc4f3eb0
    • Ido Schimmel's avatar
      mlxsw: Bump firmware version to 13.2000.1886 · 45bd6341
      Ido Schimmel authored
      The new version supports extended error reporting from firmware via a
      new TLV in the EMAD packet. Similar to netlink extended ack.
      
      It also fixes an issue in the PCI code that can result in false AER
      errors under high Tx rate.
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      45bd6341
    • Shalom Toledo's avatar
      mlxsw: spectrum: Prevent auto negotiation on number of lanes · 3f61967f
      Shalom Toledo authored
      After 50G-1-lane and 100G-2-lanes link modes were introduced, the driver
      is facing situations in which the hardware auto negotiates not only on
      speed and type, but also on number of lanes.
      
      Prevent auto negotiation on number of lanes by allowing only port speeds
      that can be supported on a given port according to its width.
      Signed-off-by: default avatarShalom Toledo <shalomt@mellanox.com>
      Acked-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3f61967f
    • Amit Cohen's avatar
      mlxsw: Remove 56G speed support · b97cd891
      Amit Cohen authored
      Commit 275e928f ("mlxsw: spectrum: Prevent force of 56G") prevented
      the driver from setting a speed of 56G when auto-negotiation is off.
      This is the only speed supported by mlxsw that cannot be set when
      auto-negotiation is off, which makes it difficult to write generic
      tests.
      
      Further, the speed is not supported by newer ASICs such as Spectrum-2
      and to the best of our knowledge it is not used by current users.
      
      Therefore, remove 56G support from mlxsw.
      Signed-off-by: default avatarAmit Cohen <amitc@mellanox.com>
      Signed-off-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      b97cd891
  2. 28 Aug, 2019 32 commits