]> git.proxmox.com Git - corosync-pve.git/commitdiff
cherry-pick: totemsrp: Reduce MTU to left room second mcast
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 10 Oct 2019 16:12:24 +0000 (18:12 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 10 Oct 2019 16:12:24 +0000 (18:12 +0200)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
debian/patches/0013-totemsrp-Reduce-MTU-to-left-room-second-mcast.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/0013-totemsrp-Reduce-MTU-to-left-room-second-mcast.patch b/debian/patches/0013-totemsrp-Reduce-MTU-to-left-room-second-mcast.patch
new file mode 100644 (file)
index 0000000..eecc2d3
--- /dev/null
@@ -0,0 +1,44 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Jan Friesse <jfriesse@redhat.com>
+Date: Mon, 7 Oct 2019 15:26:22 +0200
+Subject: [PATCH] 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>
+(cherry picked from commit ee8b8993d98b3f6af9c058194228fc534fcd0796)
+Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
+---
+ exec/totemsrp.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/exec/totemsrp.c b/exec/totemsrp.c
+index e988c531..9ea3d689 100644
+--- a/exec/totemsrp.c
++++ b/exec/totemsrp.c
+@@ -805,7 +805,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",
+@@ -5092,7 +5092,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 (
index 26042797ddf86cf6b337a5de0a432678909f7279..67eb9421f4ecd55bc585be251ae6eb34e0af0a3a 100644 (file)
@@ -10,3 +10,4 @@
 0010-logging-Add-CS_PRI_NODE_ID-and-CS_PRI_RING_ID.patch
 0011-totemknet-Add-locking-for-log-call.patch
 0012-totempg-Check-sanity-length-of-received-message.patch
+0013-totemsrp-Reduce-MTU-to-left-room-second-mcast.patch