IB/hfi1: Enable the transmit side of the datagram ipoib netdev
authorPiotr Stankiewicz <piotr.stankiewicz@intel.com>
Mon, 11 May 2020 16:07:13 +0000 (12:07 -0400)
committerJason Gunthorpe <jgg@mellanox.com>
Thu, 21 May 2020 14:23:58 +0000 (11:23 -0300)
This patch hooks the transmit side of the datagram netdev with
ipoib by setting the rdma_netdev_get_params function for the
hfi1 ib_device_ops structue. It also enables the receiving side
by adding the AIP capability into the default capabilities.

Link: https://lore.kernel.org/r/20200511160712.173205.65700.stgit@awfm-01.aw.intel.com
Reviewed-by: Mike Marciniszyn <mike.marciniszyn@intel.com>
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Piotr Stankiewicz <piotr.stankiewicz@intel.com>
Signed-off-by: Kaike Wan <kaike.wan@intel.com>
Signed-off-by: Dennis Dalessandro <dennis.dalessandro@intel.com>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
drivers/infiniband/hw/hfi1/common.h
drivers/infiniband/hw/hfi1/verbs.c

index 6062545136401a0d4e9ccb894e0e0be5751c661f..ff423e546b807cf2c474720dce6f3dfd67040ec9 100644 (file)
                                 HFI1_CAP_PKEY_CHECK |                  \
                                 HFI1_CAP_MULTI_PKT_EGR |               \
                                 HFI1_CAP_EXTENDED_PSN |                \
+                                HFI1_CAP_AIP |                         \
                                 ((HFI1_CAP_HDRSUPP |                   \
                                   HFI1_CAP_MULTI_PKT_EGR |             \
                                   HFI1_CAP_STATIC_RATE_CTRL |          \
index 19d5d0061b012f3a8be993f8f90bb4b674657413..43ddced15951b71c98ace2d87365832250b2bd78 100644 (file)
@@ -66,6 +66,7 @@
 #include "vnic.h"
 #include "fault.h"
 #include "affinity.h"
+#include "ipoib.h"
 
 static unsigned int hfi1_lkey_table_size = 16;
 module_param_named(lkey_table_size, hfi1_lkey_table_size, uint,
@@ -1795,6 +1796,7 @@ static const struct ib_device_ops hfi1_dev_ops = {
        .modify_device = modify_device,
        /* keep process mad in the driver */
        .process_mad = hfi1_process_mad,
+       .rdma_netdev_get_params = hfi1_ipoib_rn_get_params,
 };
 
 /**