Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ae19c548 authored by Vlad Yasevich's avatar Vlad Yasevich
Browse files

sctp: remove 'resent' bit from the chunk



The 'resent' bit is used to make sure that we don't update
rto estimate based on retransmitted chunks.  However, we already
have the 'rto_pending' bit that we test when need to update rto,
so 'resent' bit is just extra.  Additionally, we currently have
a bug in that we always set a 'resent' bit and thus rto estimate
is only updated by Heartbeats.

Signed-off-by: default avatarVlad Yasevich <vladislav.yasevich@hp.com>
parent d598b166
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -757,7 +757,6 @@ struct sctp_chunk {
#define SCTP_NEED_FRTX 0x1
#define SCTP_NEED_FRTX 0x1
#define SCTP_DONT_FRTX 0x2
#define SCTP_DONT_FRTX 0x2
	__u16	rtt_in_progress:1,	/* This chunk used for RTT calc? */
	__u16	rtt_in_progress:1,	/* This chunk used for RTT calc? */
		resent:1,		/* Has this chunk ever been resent. */
		has_tsn:1,		/* Does this chunk have a TSN yet? */
		has_tsn:1,		/* Does this chunk have a TSN yet? */
		has_ssn:1,		/* Does this chunk have a SSN yet? */
		has_ssn:1,		/* Does this chunk have a SSN yet? */
		singleton:1,		/* Only chunk in the packet? */
		singleton:1,		/* Only chunk in the packet? */
@@ -1065,7 +1064,7 @@ void sctp_transport_route(struct sctp_transport *, union sctp_addr *,
			  struct sctp_sock *);
			  struct sctp_sock *);
void sctp_transport_pmtu(struct sctp_transport *);
void sctp_transport_pmtu(struct sctp_transport *);
void sctp_transport_free(struct sctp_transport *);
void sctp_transport_free(struct sctp_transport *);
void sctp_transport_reset_timers(struct sctp_transport *, int);
void sctp_transport_reset_timers(struct sctp_transport *);
void sctp_transport_hold(struct sctp_transport *);
void sctp_transport_hold(struct sctp_transport *);
void sctp_transport_put(struct sctp_transport *);
void sctp_transport_put(struct sctp_transport *);
void sctp_transport_update_rto(struct sctp_transport *, __u32);
void sctp_transport_update_rto(struct sctp_transport *, __u32);
+9 −16
Original line number Original line Diff line number Diff line
@@ -429,9 +429,6 @@ int sctp_packet_transmit(struct sctp_packet *packet)
	list_for_each_entry_safe(chunk, tmp, &packet->chunk_list, list) {
	list_for_each_entry_safe(chunk, tmp, &packet->chunk_list, list) {
		list_del_init(&chunk->list);
		list_del_init(&chunk->list);
		if (sctp_chunk_is_data(chunk)) {
		if (sctp_chunk_is_data(chunk)) {

			if (!chunk->resent) {

			/* 6.3.1 C4) When data is in flight and when allowed
			/* 6.3.1 C4) When data is in flight and when allowed
			 * by rule C5, a new RTT measurement MUST be made each
			 * by rule C5, a new RTT measurement MUST be made each
			 * round trip.  Furthermore, new RTT measurements
			 * round trip.  Furthermore, new RTT measurements
@@ -443,10 +440,6 @@ int sctp_packet_transmit(struct sctp_packet *packet)
				chunk->rtt_in_progress = 1;
				chunk->rtt_in_progress = 1;
				tp->rto_pending = 1;
				tp->rto_pending = 1;
			}
			}
			}

			chunk->resent = 1;

			has_data = 1;
			has_data = 1;
		}
		}


+0 −1
Original line number Original line Diff line number Diff line
@@ -1405,7 +1405,6 @@ static void sctp_check_transmitted(struct sctp_outq *q,
				 * instance).
				 * instance).
				 */
				 */
				if (!tchunk->tsn_gap_acked &&
				if (!tchunk->tsn_gap_acked &&
				    !tchunk->resent &&
				    tchunk->rtt_in_progress) {
				    tchunk->rtt_in_progress) {
					tchunk->rtt_in_progress = 0;
					tchunk->rtt_in_progress = 0;
					rtt = jiffies - tchunk->sent_at;
					rtt = jiffies - tchunk->sent_at;
+0 −1
Original line number Original line Diff line number Diff line
@@ -1205,7 +1205,6 @@ struct sctp_chunk *sctp_chunkify(struct sk_buff *skb,
	INIT_LIST_HEAD(&retval->list);
	INIT_LIST_HEAD(&retval->list);
	retval->skb		= skb;
	retval->skb		= skb;
	retval->asoc		= (struct sctp_association *)asoc;
	retval->asoc		= (struct sctp_association *)asoc;
	retval->resent  	= 0;
	retval->has_tsn		= 0;
	retval->has_tsn		= 0;
	retval->has_ssn         = 0;
	retval->has_ssn         = 0;
	retval->rtt_in_progress	= 0;
	retval->rtt_in_progress	= 0;