From: Leandro <leandroal@gmail.com>
To: dccp@vger.kernel.org
Subject: [PATCH 6/25] Reduce allowed sending rate by a factor that accounts for packet header size
Date: Thu, 01 Nov 2007 00:30:18 +0000 [thread overview]
Message-ID: <200710312130.18806.leandroal@gmail.com> (raw)
[CCID-4] Reduce allowed sending rate by a factor that accounts for packet header size
Signed-off-by: Leandro Melo de Sales <leandro@embedded.ufcg.edu.br>
Signed-off-by: Tommi Saviranta <wnd@iki.fi>
Index: leandro.new/net/dccp/ccids/ccid4.c
=================================--- leandro.new.orig/net/dccp/ccids/ccid4.c
+++ leandro.new/net/dccp/ccids/ccid4.c
@@ -135,6 +135,17 @@ static u32 ccid4_hc_tx_idle_rtt(struct c
}
/**
+ * ccid4_hc_tx_x_header_penalty - Update allower sending rate X
+ * @hctx: half-connection to adjust
+ * This function adjusts sending rate according to [TFRC-SP, Section 5]
+ */
+static inline void ccid4_hc_tx_x_header_penalty(struct ccid4_hc_tx_sock *hctx)
+{
+ hctx->ccid4hctx_x *= hctx->ccid4hctx_s;
+ do_div(hctx->ccid4hctx_x, (hctx->ccid4hctx_s + CCID4HCTX_H));
+}
+
+/**
* ccid4_hc_tx_update_x - Update allowed sending rate X
* @stamp: most recent time if available - can be left NULL.
* This function tracks draft rfc3448bis, check there for latest details.
@@ -170,6 +181,7 @@ static void ccid4_hc_tx_update_x(struct
hctx->ccid4hctx_x = max(hctx->ccid4hctx_x,
(((__u64)hctx->ccid4hctx_s) << 6) /
TFRC_T_MBI);
+ ccid4_hc_tx_x_header_penalty(hctx);
} else if (ktime_us_delta(now, hctx->ccid4hctx_t_ld)
- (s64)hctx->ccid4hctx_rtt >= 0) {
@@ -178,6 +190,8 @@ static void ccid4_hc_tx_update_x(struct
max(min(2 * hctx->ccid4hctx_x, min_rate),
scaled_div(((__u64)hctx->ccid4hctx_s) << 6,
hctx->ccid4hctx_rtt));
+
+ ccid4_hc_tx_x_header_penalty(hctx);
hctx->ccid4hctx_t_ld = now;
}
Index: leandro.new/net/dccp/ccids/ccid4.h
=================================--- leandro.new.orig/net/dccp/ccids/ccid4.h
+++ leandro.new/net/dccp/ccids/ccid4.h
@@ -71,6 +71,11 @@
/* Mininum sending rate as per CCID-4 draft */
#define MIN_SEND_RATE 10000
+/* The header size on data packets is estimated as 36 bytes as per CCID-4
+ * draft, [Section 5].
+ */
+#define CCID4HCTX_H 36
+
enum ccid4_options {
TFRC_OPT_LOSS_EVENT_RATE = 192,
TFRC_OPT_LOSS_INTERVALS = 193,
next reply other threads:[~2007-11-01 0:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-11-01 0:30 Leandro [this message]
2007-11-03 6:28 ` [PATCH 6/25] Reduce allowed sending rate by a factor that accounts for packet header size Ian McDonald
2007-11-08 10:15 ` Gerrit Renker
2007-11-09 13:14 ` [PATCH 6/25] Reduce allowed sending rate by a factor that Tommi Saviranta
2007-11-09 15:03 ` [PATCH 6/25] Reduce allowed sending rate by a factor that accounts for packet header size Gerrit Renker
2007-11-09 20:46 ` [PATCH 6/25] Reduce allowed sending rate by a factor that Tommi Saviranta
2007-11-10 12:09 ` [PATCH 6/25] Reduce allowed sending rate by a factor that accounts for packet header size Gerrit Renker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200710312130.18806.leandroal@gmail.com \
--to=leandroal@gmail.com \
--cc=dccp@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.