From 11f2ccb9570569a57ac0ef0148efcd9b35d7a6b6 Mon Sep 17 00:00:00 2001 From: Aswin Karuvally Date: Sun, 1 Feb 2026 18:39:38 +0530 Subject: [PATCH] hsci: Automatically set appropriate MTU for HSCI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Aswin Karuvally Signed-off-by: Jan Höppner --- hsci/hsci | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/hsci/hsci b/hsci/hsci index 5540e82f..8f884c9a 100755 --- a/hsci/hsci +++ b/hsci/hsci @@ -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