hsci: fix packet loss caused by large MTU

For maximum performance the MTU of an HSCI interface was set to the value
of the MTU of its HiperSockets interface. However, the MTU of a
HiperSockets interface can be very large, and when the data packets are
not sent over the HiperSocket but over the corresponding ethernet
interface (which usually has a smaller MTU size) then it can happen that
the large packets are silently dropped. One example would be communication
from an HSCI in one CEC to another HSCI in another CEC via Ethernet.

To solve the problem, the MTU setting in this tool is removed, and the
default MTU value is used. Thus, the minimum value of the MTUs of the both
converged interfaces is used as the MTU of the HSCI interface.

Fixes: 0566a492ae ("s390-tools: add hsci tool")
Signed-off-by: Wenjia Zhang <wenjia@linux.ibm.com>
Reviewed-by: Alexandra Winter <wintera@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Wenjia Zhang
2021-02-02 11:25:04 +01:00
committed by Jan Höppner
parent 14ca7c5080
commit dfd9f52873

View File

@@ -253,16 +253,6 @@ function add_hsci {
return 1 return 1
fi fi
# use hsdev MTU
if [ -e /sys/class/net/$hsdev/mtu ]; then
hs_mtu="$(cat /sys/class/net/$hsdev/mtu)"
ip link set dev $hsci mtu $hs_mtu >/dev/null 2>&1
if [ $? -ne 0 ]; then
echo "Error: Failed to set MTU for $hsci " >&2
clean_up
return 1
fi
fi
ip link set dev $hsci up >/dev/null 2>&1 ip link set dev $hsci up >/dev/null 2>&1
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Error: Failed to set $hsci up" >&2 echo "Error: Failed to set $hsci up" >&2