1. 21 Apr, 2017 2 commits
    • Yonatan Cohen's avatar
      IB/rxe: Add port protocol stats · 0b1e5b99
      Yonatan Cohen authored
      Expose new counters using the get_hw_stats callback.
      We expose the following counters:
      
      +---------------------+----------------------------------------+
      |      Name           |           Description                  |
      |---------------------+----------------------------------------|
      |sent_pkts            | number of sent pkts                    |
      |---------------------+----------------------------------------|
      |rcvd_pkts            | number of received packets             |
      |---------------------+----------------------------------------|
      |out_of_sequence      | number of errors due to packet         |
      |                     | transport sequence number              |
      |---------------------+----------------------------------------|
      |duplicate_request    | number of received duplicated packets. |
      |                     | A request that previously executed is  |
      |                     | named duplicated.                      |
      |---------------------+----------------------------------------|
      |rcvd_rnr_err         | number of received RNR by completer    |
      |---------------------+----------------------------------------|
      |send_rnr_err         | number of sent RNR by responder        |
      |---------------------+----------------------------------------|
      |rcvd_seq_err         | number of out of sequence packets      |
      |                     | received                               |
      |---------------------+----------------------------------------|
      |ack_deffered         | number of deferred handling of ack     |
      |                     | packets.                               |
      |---------------------+----------------------------------------|
      |retry_exceeded_err   | number of times retry exceeded         |
      |---------------------+----------------------------------------|
      |completer_retry_err  | number of times completer decided to   |
      |                     | retry                                  |
      |---------------------+----------------------------------------|
      |send_err             | number of failed send packet           |
      +---------------------+----------------------------------------+
      Signed-off-by: default avatarYonatan Cohen <yonatanc@mellanox.com>
      Reviewed-by: default avatarMoni Shoua <monis@mellanox.com>
      Reviewed-by: default avatarAndrew Boyer <andrew.boyer@dell.com>
      Signed-off-by: default avatarLeon Romanovsky <leon@kernel.org>
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      0b1e5b99
    • Doug Ledford's avatar
      cxgb4: Convert PDBG to pr_debug the second · 339e7575
      Doug Ledford authored
      A couple spots were missed in the original patch to implement this
      change.  Add those spots.
      
      Fixes: a9a42886 (cxgb4: Convert PDBG to pr_debug)
      Signed-off-by: default avatarDoug Ledford <dledford@redhat.com>
      339e7575
  2. 20 Apr, 2017 35 commits
  3. 17 Apr, 2017 3 commits
    • David S. Miller's avatar
      Merge branch 'mlx5-RDMA-netdevice' · 70d40b36
      David S. Miller authored
      Saeed Mahameed says:
      
      ====================
      Mellanox, mlx5 RDMA net device support
      
      This series provides the lower level mlx5 support of RDMA netdevice
      creation API [1] suggested and introduced by Intel's HFI OPA VNIC
      netdevice driver [2], to enable IPoIB mlx5 RDMA netdevice creation.
      
      mlx5 IPoIB RDMA netdev will serve as an acceleration netdevice for the current
      IPoIB ULP generic netdevice, providing:
      	- mlx5 RSS support.
      	- mlx5 HW RX,TX offloads (checksum, TSO, LRO, etc ..).
      	- Full mlx5 HW features transparent to the ULP itself.
      
      The idea here is to reuse and benefit from the already implemented mlx5e netdevice
      management and channels API for both etherent and RDMA netdevices, since both IPoIB
      and Ethernet netdevices share same common mlx5 HW resources (with some small
      exceptions) and share most of the control/data path logic, it is more natural to
      have them share the same code.
      
      The differences between IPoIB and Ethernet netdevices can be summarized to:
      
      Steering:
      In mlx5, IPoIB traffic is sent and received from an underlay special QP, and in Ethernet
      the traffic is handled by vports and vport steering is managed by e-switch or FW.
      
      For IPoIB traffic to get steered correctly the only thing we need to do is to create RSS
      HW contexts for RX and TX HW contexts for TX (similar to mlx5e) with the underlay QP attached to
      them (underlay QP will be 0 in case of Ethernet).
      
      RX,TX:
      Since IPoIB traffic is different, slightly modified RX and TX handlers are required,
      still we do some code reuse in data path via common helper functions.
      
      All of the other generic netdevice and mlx5 aspects will be shared between mlx5 Ethernet
      and IPoIB netdevices, e.g.
      	- Channels creation and handling (RQs,SQs,CQs, NAPI, interrupt moderation, etc..)
      	- Offloads, checksum, GRO, LRO, TSO, and more.
              - netdevice logic and non Ethernet specific ndos (open/close, etc..)
      
      In order to achieve what we want:
      
      In patchet 1 to 3, Erez added the supported for underlay QP in mlx5_ifc and refactored
      the mlx5 steering code to accept the underlay QP as a parameter for creating steering
      objects and enabled flow steering for IB link.
      
      Then we are going to use the mlx5e netdevice profile, which is already used to separate between
      NIC and VF representors netdevices, to create new type of IPoIB netdevice profile.
      
      For that, one small refactoring is required to make mlx5e netdevice profile management
      more genetic and agnostic to link type which is done in patch #4.
      
      In patch #5, we introduce ipoib.c to host all of mlx5 IPoIB (mlx5i) specific logic and a
      skeleton for the IPoIB mlx5 netdevice profile, and we will start filling it in next patches,
      using mlx5e already existing APIs.
      
      Patch #6 and #7, Implement init/cleanup RX mlx5i netdev profile handlers to create mlx5 RSS
      resources, same as mlx5e but without vlan and L2 steering tables.
      
      Patch #8, Implement init/cleanup TX mlx5i netdev profile handlers, to create TX resources
      same as mlx5e but with one TC (tc = 0) support.
      
      Patch #9, Implement mlx5i open/close ndos, where we reuese the mlx5e channels API, to start/stop TX/RX channels.
      
      Patch #10, Create the underlay QP and attach it to mlx5i RSS and TX HW contexts.
      
      Patch #11 and #12, Break down the mlx5e xmit flow into smaller helper function and implement the
      mlx5i IPoIB xmit routine.
      
      Patch #13 and #14, Have an RX handler per netdevice profile. We already do this before this series
      in a non clean way to separate between NIC netdev and VF representor RX handlers, in patch 13 we make
      the RX handler generic and bound to a profile and in patch 14 we implement the IPoIB RX handlers.
      
      Patch #15, Small cleanup to avoid e-switch with IPoIB netdev.
      
      In order to enable mlx5 IPoIB, a merge between the IPoIB RDMA netdev offolad support [3]
      - which was alread submitted to the rdma mailing list - and this series is required
      plus an extra small patch [4] which will connect between both sides and actually enables the offload.
      
      Once both patch-sets are merged into linux we will have to submit the extra small patch [4], to enable
      the feature.
      
      Thanks,
      Saeed.
      
      [1] https://patchwork.kernel.org/patch/9676637/
      
      [2] https://lwn.net/Articles/715453/
          https://patchwork.kernel.org/patch/9587815/
      
      [3] https://patchwork.kernel.org/patch/9672069/
      [4] https://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux.git/commit/?id=0141db6a686e32294dee015b7d07706162ba48d8
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      70d40b36
    • Erez Shitrit's avatar
      hw/mlx5: Add New bit to check over QP creation · 93d576af
      Erez Shitrit authored
      Add check for bit IB_QP_CREATE_NETIF_QP while creating QP.
      Signed-off-by: default avatarErez Shitrit <erezsh@mellanox.com>
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      93d576af
    • Saeed Mahameed's avatar
      net/mlx5e: E-switch vport manager is valid for ethernet only · 955bc480
      Saeed Mahameed authored
      Currently the driver support only ethernet eswitch, and we want to
      protect downstream IPoIB netdev from trying to access it in IB link.
      Signed-off-by: default avatarSaeed Mahameed <saeedm@mellanox.com>
      Reviewed-by: default avatarErez Shitrit <erezsh@mellanox.com>
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      955bc480