From c62cb89abb494630c12994f702d6986de2a38fe5 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Thu, 10 Jun 2010 11:41:23 -0400 Subject: [PATCH] path mtu don't track nonsequenced packets for the purpose of mtu discovery, we need a sequence number to correlate if a large packet is acked. don't track sequence number 0 packets. a later change adds the mechanics needed for MTU pings Change-Id: I83d4466115bbd45acdc2777bfbef0ff393dd5a3f Reviewed-on: http://gerrit.openafs.org/2114 Reviewed-by: Jeffrey Altman Tested-by: Derrick Brashear Reviewed-by: Derrick Brashear --- src/rx/rx_packet.c | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/rx/rx_packet.c b/src/rx/rx_packet.c index 10a77c0a2..5ec04d29b 100644 --- a/src/rx/rx_packet.c +++ b/src/rx/rx_packet.c @@ -2218,8 +2218,10 @@ rxi_SendPacket(struct rx_call *call, struct rx_connection *conn, MUTEX_ENTER(&conn->conn_data_lock); p->header.serial = ++conn->serial; if (p->length > conn->peer->maxPacketSize) { - conn->lastPacketSize = p->length; - conn->lastPacketSizeSeq = p->header.seq; + if (p->header.seq != 0) { + conn->lastPacketSize = p->length; + conn->lastPacketSizeSeq = p->header.seq; + } } MUTEX_EXIT(&conn->conn_data_lock); /* This is so we can adjust retransmit time-outs better in the face of @@ -2372,10 +2374,12 @@ rxi_SendPacketList(struct rx_call *call, struct rx_connection *conn, conn->serial += len; for (i = 0; i < len; i++) { p = list[i]; - if ((p->length > conn->peer->maxPacketSize) && - (p->length > conn->lastPacketSize)) { - conn->lastPacketSize = p->length; - conn->lastPacketSizeSeq = p->header.seq; + if (p->length > conn->peer->maxPacketSize) { + if ((p->header.seq != 0) && + ((i == 0) || (p->length >= conn->lastPacketSize))) { + conn->lastPacketSize = p->length; + conn->lastPacketSizeSeq = p->header.seq; + } } } MUTEX_EXIT(&conn->conn_data_lock); -- 2.39.5