Skip to content
  1. Mar 01, 2018
  2. Feb 28, 2018
    • David S. Miller's avatar
      Merge tag 'mlx5-updates-2018-02-23' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux · fb66cb07
      David S. Miller authored
      
      
      Saeed Mahameed says:
      
      mlx5-update-2018-02-23 (IB representors)
      
      From: Mark Bloch <markb@mellanox.com>
      =========
      Add IB representor when in switchdev mode
      
      The following series adds support for an IB (RAW Ethernet only) device
      representor which is created when the user switches to switchdev mode.
      
      Today when switching to switchdev mode the only representors which are
      created are net devices. Each netdev is a representor of a virtual
      function and any data sent via the representor is received on the virtual
      function, and any data sent via the virtual function is received by the
      representor.
      
      For the mlx5 driver the main use of this functionality is to be able to
      use Open vSwitch on the hypervisor in order to manage/control traffic
      from/to the virtual functions. Open vSwitch can also work with  DPDK
      devices and not just net devices, this series exposes an IB device, which
      Mellanox PMD driver uses, which then can be used by Open vSwitch DPDK.
      
      An IB device representor exposes only RAW Ethernet QP capabilities and
      the ability to create flow rules to direct traffic to its RX queues. The
      state of the IB device (ACTIVE/DOWN etc..) is based on the state of the
      corresponding net device representor. No other RDMA/RoCE functionality is
      currently supported and no GID table is exposed.
      =========
      
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      fb66cb07
    • 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
    • Petr Machata's avatar
      mlxsw: spectrum_span: Support mirror to gretap · 27cf76fe
      Petr Machata authored
      
      
      When a user requests mirror from a mlxsw physical port (possibly based
      on an ACL match) to a gretap netdevice, the driver needs to resolve the
      request to a particular physical port that the mirrored packets will
      egress through, and a suite of configuration keys (importantly, IP and
      MAC addresses). That means calling into routing and neighbor kernel code
      to simulate the decisions made by the system for packets passing through
      a gretap netdevice.
      
      Add a new instance of mlxsw_sp_span_entry_ops to support this.
      
      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>
      27cf76fe
    • Petr Machata's avatar
      mlxsw: Move a mirroring check to mlxsw_sp_span_entry_create · 52a6444c
      Petr Machata authored
      
      
      The check for whether a mirror port (which is a mlxsw front panel port)
      belongs to the same mlxsw instance as the mirrored port, is currently
      only done in spectrum_acl, even though it's applicable for the matchall
      case as well. Thus move it to mlxsw_sp_span_entry_create().
      
      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>
      52a6444c