summaryrefslogtreecommitdiffstats
path: root/net/dccp/ccids/lib/packet_history.h
diff options
context:
space:
mode:
authorGerrit Renker <gerrit@erg.abdn.ac.uk>2008-09-04 07:30:19 +0200
committerGerrit Renker <gerrit@erg.abdn.ac.uk>2008-09-04 07:45:42 +0200
commit68c89ee53571a441799c03d5e240c6441bced620 (patch)
treea355d77fd0bf9e57375601286bf4b792456b423e /net/dccp/ccids/lib/packet_history.h
parent22338f09bd60434a3f1d6608f0fa55972067985f (diff)
downloadop-kernel-dev-68c89ee53571a441799c03d5e240c6441bced620.zip
op-kernel-dev-68c89ee53571a441799c03d5e240c6441bced620.tar.gz
dccp ccid-3: Update the computation of X_recv
This updates the computation of X_recv with regard to Errata 610/611 for RFC 4342 and draft rfc3448bis-06, ensuring that at least an interval of 1 RTT is used to compute X_recv. The change is wrapped into a new function ccid3_hc_rx_x_recv(). Further changes: ---------------- * feedback is not sent when no data packets arrived (bytes_recv == 0), as per rfc3448bis-06, 6.2; * take the timestamp for the feedback /after/ dccp_send_ack() returns, to avoid taking the transmission time into account (in case layer-2 is busy); * clearer handling of failure in ccid3_first_li(). Signed-off-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
Diffstat (limited to 'net/dccp/ccids/lib/packet_history.h')
-rw-r--r--net/dccp/ccids/lib/packet_history.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/net/dccp/ccids/lib/packet_history.h b/net/dccp/ccids/lib/packet_history.h
index ba5832b..6552be6 100644
--- a/net/dccp/ccids/lib/packet_history.h
+++ b/net/dccp/ccids/lib/packet_history.h
@@ -93,7 +93,8 @@ struct tfrc_rx_hist_entry {
* @rtt_sample_prev: Used during RTT sampling, points to candidate entry
* @rtt_estimate: Receiver RTT estimate
* @packet_size: Packet size in bytes (as per RFC 3448, 3.1)
- * @bytes_recvd: Number of bytes received since last sending feedback
+ * @bytes_recvd: Number of bytes received since @bytes_start
+ * @bytes_start: Start time for counting @bytes_recvd
*/
struct tfrc_rx_hist {
struct tfrc_rx_hist_entry *ring[TFRC_NDUPACK + 1];
@@ -105,6 +106,7 @@ struct tfrc_rx_hist {
/* Receiver sampling of application payload lengths */
u32 packet_size,
bytes_recvd;
+ ktime_t bytes_start;
};
/**
@@ -169,6 +171,15 @@ static inline u32 tfrc_rx_hist_rtt(const struct tfrc_rx_hist *h)
return h->rtt_estimate;
}
+static inline void tfrc_rx_hist_restart_byte_counter(struct tfrc_rx_hist *h)
+{
+ h->bytes_recvd = 0;
+ h->bytes_start = ktime_get_real();
+}
+
+extern u32 tfrc_rx_hist_x_recv(struct tfrc_rx_hist *h, const u32 last_x_recv);
+
+
extern void tfrc_rx_hist_add_packet(struct tfrc_rx_hist *h,
const struct sk_buff *skb, const u64 ndp);
OpenPOWER on IntegriCloud