1. 28 Feb, 2018 33 commits
  2. 27 Feb, 2018 7 commits
    • David S. Miller's avatar
      Merge branch 'mlx4-misc' · 3f5a6830
      David S. Miller authored
      Tariq Toukan says:
      
      ====================
      mlx4_en misc for 4.17
      
      This patchset contains misc enhancements from the team
      to the mlx4 Eth driver.
      
      Patch 1 by Eran adds physical layer counters.
      Patch 2 by Eran cleans-up a redundant warn print.
      Patch 3 combines the checks of two end cases into a single if statement.
      Patch 4 takes common code structures out of the #ifdef, following your
      comment on a previous patch.
      
      Series generated against net-next commit:
      f74290fd Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      3f5a6830
    • Tariq Toukan's avatar
      net/mlx4_en: RX csum, pre-define enabled protocols for IP status masking · a970d8db
      Tariq Toukan authored
      Pre-define a mask for IP status of a completion, that tests the
      MLX4_CQE_STATUS_IPV6 only in case CONFIG_IPV6 is enabled.
      Use it for IP status testing upon completion, instead of separating
      the datapath into two flows.
      This takes common code structures (such as closing parenthesis)
      back to their original place, and makes code more readable.
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Suggested-by: default avatarDavid S. Miller <davem@davemloft.net>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      a970d8db
    • Tariq Toukan's avatar
      net/mlx4_en: Combine checks of end-cases in RX completion function · 1cb8b121
      Tariq Toukan authored
      Combine two end-cases in the same if statement with a single return value.
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      1cb8b121
    • Eran Ben Elisha's avatar
      net/mlx4_en: Remove unnecessary warn print in reset config · 4f32e1c4
      Eran Ben Elisha authored
      In mlx4_en_reset_config, there was a redundant warn print that was left
      from previous versions of this function. No warn is needed anymore.
      
      This warn can be confusing when RX-FCS is changed:
      Turn OFF RX-FCS:
        mlx4_en: eth1: Changing device configuration rx filter(0) rx vlan(1)
      Turn ON RX-FCS:
        mlx4_en: eth1: Changing device configuration rx filter(0) rx vlan(1)
      Signed-off-by: default avatarEran Ben Elisha <eranbe@mellanox.com>
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      4f32e1c4
    • Eran Ben Elisha's avatar
      net/mlx4_en: Add physical RX/TX bytes/packets counters · f26d0d25
      Eran Ben Elisha authored
      Add physical RX/TX packets/bytes counters into ethtool output to monitor
      all traffic that was received and transmitted on the port. These
      counters are available only for none Virtual Function.
      Signed-off-by: default avatarEran Ben Elisha <eranbe@mellanox.com>
      Signed-off-by: default avatarTariq Toukan <tariqt@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      f26d0d25
    • David S. Miller's avatar
      Merge branch 'mlxsw-Offloading-encapsulated-SPAN' · 431c7ec3
      David S. Miller authored
      Jiri Pirko says:
      
      ====================
      mlxsw: Offloading encapsulated SPAN
      
      Petr says:
      
      This patch series introduces support for mirroring with GRE
      encapsulation. It offloads tc action mirred mirror from a mlxsw port to
      either a gretap or an ip6gretap netdevice.
      
      Spectrum hardware needs to know all the details of the requested
      encapsulation: source and destination MAC and IP addresses, details of
      VLAN tagging, etc. The only variables are the encapsulated packet
      itself, and TOS field, which may be inherited. To that end, mlxsw driver
      resolves the route that encapsulated packets would take, queries the
      corresponding neighbor, and with that configuration in hand, configures
      the mirroring in the hardware.
      
      The driver also hooks into event handlers for netdevice changes, FIB and
      neighbor events, and reconsiders the configuration on each such change.
      When the new configuration differs from the currently-offloaded one, the
      existing offload is removed and replaced with a new one.
      
      It is possible to mirror to {ip6,}gretap from a matchall rule as well as
      from a flower match.
      
      ** Note that with this patch set, mlxsw build depends on NET_IPGRE and
         IPV6_GRE.
      
      Current limitations:
      
      - There has to be a route that directs packets to an mlxsw port. We
        intend to extend the logic to support other netdevice types in the
        future, but the eventual egress netdevice will have to be an mlxsw
        port in any case.
      
      - Offload reconfiguration due to changes in netdevice configuration
        creates a window of time where packets are not mirrored. Under some
        circumstances this can be prevented by configuring an unused port
        analyzer and migrating mirrors over to that. However that's currently
        not implemented.
      
      - Remote address of a tunnel device needs to be set, there may not be a
        GRE key, checksumming or sequence numbers, and TTL needs to be fixed
        (non-inherit). These are hard requirements imposed by the underlying
        hardware.
      
      - TOS of a tunnel device needs to be "inherit". The hardware supports a
        fixed TOS, but that's currently not implemented.
      
      The series start with two patches, #1 and #2, that publish one function
      and add support for querying IPv6 tunnel parameters.
      
      In patches #3 and #4, we introduce helpers to GRE and tunneling code
      that we will use later in the patchset from the SPAN code.
      
      Patches #5 and #6 introduce support for encapsulated SPAN in reg.h.
      
      The following seven patches, #7-#13, then prepare the SPAN codebase for
      introduction of mirroring to netdevices that don't correspond to front
      panel ports.
      
      Then #14 and #15 pull all this together to implement mirroring to
      {ip6,}gretap netdevices.
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      431c7ec3
    • Petr Machata's avatar
      mlxsw: spectrum_span: Support mirror to ip6gretap · 8f08a528
      Petr Machata authored
      Similarly to mirror-to-gretap, this enables mirroring to IPv6 gretap
      netdevice.
      Signed-off-by: default avatarPetr Machata <petrm@mellanox.com>
      Reviewed-by: default avatarIdo Schimmel <idosch@mellanox.com>
      Signed-off-by: default avatarJiri Pirko <jiri@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      8f08a528