]> git.ipfire.org Git - people/ms/linux.git/commitdiff
IB/hfi1: Allow larger MTU without AIP
authorMike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
Tue, 8 Feb 2022 19:25:09 +0000 (14:25 -0500)
committerJason Gunthorpe <jgg@nvidia.com>
Fri, 4 Mar 2022 21:22:02 +0000 (17:22 -0400)
The AIP code signals the phys_mtu in the following query_port()
fragment:

props->phys_mtu = HFI1_CAP_IS_KSET(AIP) ? hfi1_max_mtu :
ib_mtu_enum_to_int(props->max_mtu);

Using the largest MTU possible should not depend on AIP.

Fix by unconditionally using the hfi1_max_mtu value.

Fixes: 6d72344cf6c4 ("IB/ipoib: Increase ipoib Datagram mode MTU's upper limit")
Link: https://lore.kernel.org/r/1644348309-174874-1-git-send-email-mike.marciniszyn@cornelisnetworks.com
Reviewed-by: Dennis Dalessandro <dennis.dalessandro@cornelisnetworks.com>
Signed-off-by: Mike Marciniszyn <mike.marciniszyn@cornelisnetworks.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
drivers/infiniband/hw/hfi1/verbs.c

index dc9211f3a0098fa54c1fbe934c7e7f561342a4ab..99d0743133cac70f09c705e5d264b16df36c9a3e 100644 (file)
@@ -1397,8 +1397,7 @@ static int query_port(struct rvt_dev_info *rdi, u32 port_num,
                                      4096 : hfi1_max_mtu), IB_MTU_4096);
        props->active_mtu = !valid_ib_mtu(ppd->ibmtu) ? props->max_mtu :
                mtu_to_enum(ppd->ibmtu, IB_MTU_4096);
-       props->phys_mtu = HFI1_CAP_IS_KSET(AIP) ? hfi1_max_mtu :
-                               ib_mtu_enum_to_int(props->max_mtu);
+       props->phys_mtu = hfi1_max_mtu;
 
        return 0;
 }