diff options
author | Dave Olson <dave.olson@qlogic.com> | 2008-04-16 21:01:12 -0700 |
---|---|---|
committer | Roland Dreier <rolandd@cisco.com> | 2008-04-16 21:01:12 -0700 |
commit | 826d801009fb3c82832f2d92149446cce354bf61 (patch) | |
tree | 564534dee75be00b019b78b130ec6eb7e5a81e7d /drivers/infiniband/hw/ipath/ipath_qp.c | |
parent | 5d1ce03dd335abaef50dc615137cac2a22c5cee0 (diff) |
IB/ipath: Enable 4KB MTU
Enable use of 4KB MTU. Since the driver uses more pinned memory for
receive buffers when the 4KB MTU is enabled, whether or not the fabric
supports that MTU, add a "mtu4096" module parameter that can be used to
limit the MTU to 2KB when it is known that 4KB MTUs can't be used
anyway.
Signed-off-by: Dave Olson <dave.olson@qlogic.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ipath/ipath_qp.c')
-rw-r--r-- | drivers/infiniband/hw/ipath/ipath_qp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/infiniband/hw/ipath/ipath_qp.c b/drivers/infiniband/hw/ipath/ipath_qp.c index 087ed3166479..5c8094a03643 100644 --- a/drivers/infiniband/hw/ipath/ipath_qp.c +++ b/drivers/infiniband/hw/ipath/ipath_qp.c @@ -516,13 +516,13 @@ int ipath_modify_qp(struct ib_qp *ibqp, struct ib_qp_attr *attr, goto inval; /* - * Note: the chips support a maximum MTU of 4096, but the driver - * hasn't implemented this feature yet, so don't allow Path MTU - * values greater than 2048. + * don't allow invalid Path MTU values or greater than 2048 + * unless we are configured for a 4KB MTU */ - if (attr_mask & IB_QP_PATH_MTU) - if (attr->path_mtu > IB_MTU_2048) - goto inval; + if ((attr_mask & IB_QP_PATH_MTU) && + (ib_mtu_enum_to_int(attr->path_mtu) == -1 || + (attr->path_mtu > IB_MTU_2048 && !ipath_mtu4096))) + goto inval; if (attr_mask & IB_QP_PATH_MIG_STATE) if (attr->path_mig_state != IB_MIG_MIGRATED && |