usnic: fix wraparound sequence number issue
Sequence numbers will wrap around; it is not sufficient to check for (seq-1) -- must use the SEQ_DIFF macro to properly handle the wraparound. This bug wasn't serious; it just meant we might retransmit one or two extra times when retransmits were triggerd and the sequence numbers wrapped around their sliding windows.
Этот коммит содержится в:
родитель
4de4a263f5
Коммит
d624e0d60f
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013-2015 Cisco Systems, Inc. All rights reserved.
|
* Copyright (c) 2013-2016 Cisco Systems, Inc. All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -207,8 +207,7 @@ opal_btl_usnic_ack_send(
|
|||||||
/* send the seq of the lowest item in the window that
|
/* send the seq of the lowest item in the window that
|
||||||
we've received */
|
we've received */
|
||||||
ack->ss_base.us_btl_header->ack_seq =
|
ack->ss_base.us_btl_header->ack_seq =
|
||||||
endpoint->endpoint_next_contig_seq_to_recv - 1;
|
SEQ_DIFF(endpoint->endpoint_next_contig_seq_to_recv, 1);
|
||||||
|
|
||||||
ack->ss_len = sizeof(opal_btl_usnic_btl_header_t);
|
ack->ss_len = sizeof(opal_btl_usnic_btl_header_t);
|
||||||
|
|
||||||
#if MSGDEBUG1
|
#if MSGDEBUG1
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013-2015 Cisco Systems, Inc. All rights reserved.
|
* Copyright (c) 2013-2016 Cisco Systems, Inc. All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -92,7 +92,7 @@ opal_btl_usnic_piggyback_ack(
|
|||||||
if (endpoint->endpoint_ack_needed) {
|
if (endpoint->endpoint_ack_needed) {
|
||||||
opal_btl_usnic_remove_from_endpoints_needing_ack(endpoint);
|
opal_btl_usnic_remove_from_endpoints_needing_ack(endpoint);
|
||||||
sseg->ss_base.us_btl_header->ack_seq =
|
sseg->ss_base.us_btl_header->ack_seq =
|
||||||
endpoint->endpoint_next_contig_seq_to_recv - 1;
|
SEQ_DIFF(endpoint->endpoint_next_contig_seq_to_recv, 1);
|
||||||
sseg->ss_base.us_btl_header->ack_present = 1;
|
sseg->ss_base.us_btl_header->ack_present = 1;
|
||||||
#if MSGDEBUG1
|
#if MSGDEBUG1
|
||||||
opal_output(0, "Piggy-backing ACK for sequence %"UDSEQ"\n",
|
opal_output(0, "Piggy-backing ACK for sequence %"UDSEQ"\n",
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (c) 2013-2015 Cisco Systems, Inc. All rights reserved.
|
* Copyright (c) 2013-2016 Cisco Systems, Inc. All rights reserved.
|
||||||
* $COPYRIGHT$
|
* $COPYRIGHT$
|
||||||
*
|
*
|
||||||
* Additional copyrights may follow
|
* Additional copyrights may follow
|
||||||
@ -145,8 +145,9 @@ void opal_btl_usnic_print_stats(
|
|||||||
/* Number of un-acked sends (i.e., sends for which we're
|
/* Number of un-acked sends (i.e., sends for which we're
|
||||||
still waiting for ACK) */
|
still waiting for ACK) */
|
||||||
send_unacked =
|
send_unacked =
|
||||||
endpoint->endpoint_next_seq_to_send -
|
SEQ_DIFF(endpoint->endpoint_next_seq_to_send,
|
||||||
endpoint->endpoint_ack_seq_rcvd - 1;
|
SEQ_DIFF(endpoint->endpoint_ack_seq_rcvd, 1));
|
||||||
|
|
||||||
if (send_unacked > su_max) su_max = send_unacked;
|
if (send_unacked > su_max) su_max = send_unacked;
|
||||||
if (send_unacked < su_min) su_min = send_unacked;
|
if (send_unacked < su_min) su_min = send_unacked;
|
||||||
|
|
||||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user