Przeglądaj źródła

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 lat temu
rodzic
commit
ee8b8993d9
1 zmienionych plików z 2 dodań i 2 usunięć
  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;
 	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,
 	log_printf (instance->totemsrp_log_level_debug,
 		    "Net MTU changed to %d, new value is %d",
 		    "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) {
 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 (
 void totemsrp_service_ready_register (