From: Jon M. <jon...@er...> - 2019-12-22 02:26:29
|
This reverts commit a4dfa72d0acd1c99a160e25c099849ae37ad13fd The above change turned out to be too aggressive, as it sometimes overwhelms the virtio ring buffer and leads it to block all transmsssion during up to 30 seconds. The basic problem is that the link congestion control algorithm is only considering the transmission queue length, disregarding the fact that each "packet" in the queue now may correspond to a dozen actual network packets. We will introduce a better solution to this in a later commit. Signed-off-by: Jon Maloy <jon...@er...> --- include/uapi/linux/tipc_config.h | 5 ----- net/tipc/link.c | 4 ++-- net/tipc/udp_media.c | 4 ++-- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/include/uapi/linux/tipc_config.h b/include/uapi/linux/tipc_config.h index 4dfc056..15a3219 100644 --- a/include/uapi/linux/tipc_config.h +++ b/include/uapi/linux/tipc_config.h @@ -185,11 +185,6 @@ #define TIPC_DEF_LINK_WIN 50 #define TIPC_MAX_LINK_WIN 8191 -/* - * Default MTU for UDP media - */ - -#define TIPC_DEF_LINK_UDP_MTU 14000 struct tipc_node_info { __be32 addr; /* network address of node */ diff --git a/net/tipc/link.c b/net/tipc/link.c index 467c53a..2531f94 100644 --- a/net/tipc/link.c +++ b/net/tipc/link.c @@ -527,7 +527,7 @@ bool tipc_link_create(struct net *net, char *if_name, int bearer_id, * tipc_link_bc_create - create new link to be used for broadcast * @n: pointer to associated node * @mtu: mtu to be used initially if no peers - * @window: send window to be used + * @window: packet window to be used as base for send window * @inputq: queue to put messages ready for delivery * @namedq: queue to put binding table update messages ready for delivery * @link: return value, pointer to put the created link @@ -2267,7 +2267,7 @@ int tipc_link_bc_sync_rcv(struct tipc_link *l, struct tipc_msg *hdr, l->stats.recv_nacks++; - /* Ignore if peers_snd_nxt goes beyond receive window */ + /* Ignore if peers_snd_nxt goes beyond receive packet window */ if (more(peers_snd_nxt, l->rcv_nxt + l->window)) return rc; diff --git a/net/tipc/udp_media.c b/net/tipc/udp_media.c index d6620ad5..dcc4ba7 100644 --- a/net/tipc/udp_media.c +++ b/net/tipc/udp_media.c @@ -731,7 +731,8 @@ static int tipc_udp_enable(struct net *net, struct tipc_bearer *b, err = -EINVAL; goto err; } - b->mtu = b->media->mtu; + b->mtu = dev->mtu - sizeof(struct iphdr) + - sizeof(struct udphdr); #if IS_ENABLED(CONFIG_IPV6) } else if (local.proto == htons(ETH_P_IPV6)) { udp_conf.family = AF_INET6; @@ -830,7 +831,6 @@ struct tipc_media udp_media_info = { .tolerance = TIPC_DEF_LINK_TOL, .min_win = TIPC_DEF_LINK_WIN, .max_win = TIPC_DEF_LINK_WIN, - .mtu = TIPC_DEF_LINK_UDP_MTU, .type_id = TIPC_MEDIA_TYPE_UDP, .hwaddr_len = 0, .name = "udp" -- 2.1.4 |