瀏覽代碼

totemsrp: Reduce MTU to left room second mcast

Messages sent during recovery phase are encapsulated so such message has
extra size of mcast structure. This is not so big problem for UDPU,
because most of the switches are able to fragment and defragment packet
but it is problem for knet, because totempg is using maximum packet size
(65536 bytes) and when another header is added during retransmition,
then packet is too large.

Solution is to reduce mtu by 2 * sizeof (struct mcast).

Signed-off-by: Jan Friesse <jfriesse@redhat.com>
Reviewed-by: Fabio M. Di Nitto <fdinitto@redhat.com>
Jan Friesse 6 年之前
父節點
當前提交
ee8b8993d9
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      exec/totemsrp.c

+ 2 - 2
exec/totemsrp.c

@@ -803,7 +803,7 @@ static void totempg_mtu_changed(void *context, int net_mtu)
 {
 	struct totemsrp_instance *instance = context;
 
-	instance->totem_config->net_mtu = net_mtu - sizeof (struct mcast);
+	instance->totem_config->net_mtu = net_mtu - 2 * sizeof (struct mcast);
 
 	log_printf (instance->totemsrp_log_level_debug,
 		    "Net MTU changed to %d, new value is %d",
@@ -5112,7 +5112,7 @@ void main_iface_change_fn (
 }
 
 void totemsrp_net_mtu_adjust (struct totem_config *totem_config) {
-	totem_config->net_mtu -= sizeof (struct mcast);
+	totem_config->net_mtu -= 2 * sizeof (struct mcast);
 }
 
 void totemsrp_service_ready_register (