dd836b
--- rdma-core-22.1.orig/redhat/rdma.ifup-ib	2019-08-27 10:15:27.537044097 -0400
dd836b
+++ rdma-core-22.1/redhat/rdma.ifup-ib	2019-08-27 10:14:42.453131658 -0400
dd836b
@@ -110,19 +110,25 @@ if [ -e /sys/class/net/${DEVICE}/mode ];
dd836b
     # cycle, allowing people to change the mode without rebooting
dd836b
     if [ "${CONNECTED_MODE}" = yes ]; then
dd836b
         echo connected > /sys/class/net/${DEVICE}/mode
dd836b
-	# cap the MTU where we should based upon mode
dd836b
+	# set default MTU based upon mode if none specified
dd836b
 	[ -z "$MTU" ] && MTU=65520
dd836b
-	[ "$MTU" -gt 65520 ] && MTU=65520
dd836b
     else
dd836b
         echo datagram > /sys/class/net/${DEVICE}/mode
dd836b
-	# cap the MTU where we should based upon mode
dd836b
+	# set default MTU based upon mode if none specified
dd836b
 	[ -z "$MTU" ] && MTU=2044
dd836b
-	[ "$MTU" -gt 4092 ] && MTU=4092
dd836b
+    fi
dd836b
+    # cap the MTU to roughly the same as Ethernet's max MTU
dd836b
+    if [ "$MTU" -gt 65520 ]; then
dd836b
+        MTU=65520
dd836b
+        net_log $"Warning: capping device ${DEVICE} MTU to ${MTU}."
dd836b
     fi
dd836b
 fi
dd836b
 
dd836b
 if [ -n "${MTU}" ]; then
dd836b
     ip link set dev ${DEVICE} mtu ${MTU}
dd836b
+    if [ "$?" ]; then
dd836b
+        net_log $"Error setting device ${DEVICE} MTU to ${MTU}, using HW default."
dd836b
+    fi
dd836b
 fi
dd836b
 
dd836b
 # slave device?