mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
hsci: Automatically set appropriate MTU for HSCI
At present, the hsci tool creates HiperSockets Converged Interface (HSCI) with MTU of 1500 bytes regardless of the values of MTU for the external and HiperSockets interface from which it is formed. This can degrade performance or worse, affect network connectivity through the converged interface. Update the tool to automatically set MTU of HSCI as the lower of the MTU values of external and HiperSockets interface. Reviewed-by: Alexandra Winter <wintera@linux.ibm.com> Signed-off-by: Aswin Karuvally <aswin@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
5b909a40cb
commit
11f2ccb957
@@ -365,6 +365,13 @@ function add_hsci {
|
||||
fi
|
||||
fi
|
||||
|
||||
#### Set MTU for the veth pair
|
||||
ndev_mtu="$(cat /sys/class/net/${ndev}/mtu)"
|
||||
hsdev_mtu="$(cat /sys/class/net/${hsdev}/mtu)"
|
||||
hsci_mtu=$(( ndev_mtu < hsdev_mtu ? ndev_mtu : hsdev_mtu ))
|
||||
ip link set dev $hscibp mtu $hsci_mtu
|
||||
ip link set dev $hsci mtu $hsci_mtu
|
||||
|
||||
#### Set veth pair to UP
|
||||
ip link set dev $hscibp up >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
|
||||
Reference in New Issue
Block a user