From: Gilad Ben-Yossef <gilad@codefidence.com>
To: netdev@vger.kernel.org
Cc: ori@comsleep.com, Gilad Ben-Yossef <gilad@codefidence.com>
Subject: [PATCH v3 7/7] Allow disabling of DSACK TCP option per route
Date: Mon, 26 Oct 2009 10:06:33 +0200 [thread overview]
Message-ID: <1256544393-12450-8-git-send-email-gilad@codefidence.com> (raw)
In-Reply-To: <1256544393-12450-1-git-send-email-gilad@codefidence.com>
Add and use no DSCAK bit in the features field.
Signed-off-by: Gilad Ben-Yossef <gilad@codefidence.com>
Sigend-off-by: Ori Finkelman <ori@comsleep.com>
Sigend-off-by: Yony Amit <yony@comsleep.com>
---
include/linux/rtnetlink.h | 1 +
net/ipv4/tcp_input.c | 8 ++++++--
2 files changed, 7 insertions(+), 2 deletions(-)
diff --git a/include/linux/rtnetlink.h b/include/linux/rtnetlink.h
index 6784b34..e78b60c 100644
--- a/include/linux/rtnetlink.h
+++ b/include/linux/rtnetlink.h
@@ -381,6 +381,7 @@ enum
#define RTAX_FEATURE_NO_TSTAMP 0x00000004
#define RTAX_FEATURE_ALLFRAG 0x00000008
#define RTAX_FEATURE_NO_WSCALE 0x00000010
+#define RTAX_FEATURE_NO_DSACK 0x00000020
struct rta_session
{
diff --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c
index 4f5e914..4262da5 100644
--- a/net/ipv4/tcp_input.c
+++ b/net/ipv4/tcp_input.c
@@ -4080,8 +4080,10 @@ static inline int tcp_sack_extend(struct tcp_sack_block *sp, u32 seq,
static void tcp_dsack_set(struct sock *sk, u32 seq, u32 end_seq)
{
struct tcp_sock *tp = tcp_sk(sk);
+ struct dst_entry *dst = __sk_dst_get(sk);
- if (tcp_is_sack(tp) && sysctl_tcp_dsack) {
+ if (tcp_is_sack(tp) && sysctl_tcp_dsack &&
+ !dst_feature(dst, RTAX_FEATURE_NO_DSACK)) {
int mib_idx;
if (before(seq, tp->rcv_nxt))
@@ -4110,13 +4112,15 @@ static void tcp_dsack_extend(struct sock *sk, u32 seq, u32 end_seq)
static void tcp_send_dupack(struct sock *sk, struct sk_buff *skb)
{
struct tcp_sock *tp = tcp_sk(sk);
+ struct dst_entry *dst = __sk_dst_get(sk);
if (TCP_SKB_CB(skb)->end_seq != TCP_SKB_CB(skb)->seq &&
before(TCP_SKB_CB(skb)->seq, tp->rcv_nxt)) {
NET_INC_STATS_BH(sock_net(sk), LINUX_MIB_DELAYEDACKLOST);
tcp_enter_quickack_mode(sk);
- if (tcp_is_sack(tp) && sysctl_tcp_dsack) {
+ if (tcp_is_sack(tp) && sysctl_tcp_dsack &&
+ !dst_feature(dst, RTAX_FEATURE_NO_DSACK)) {
u32 end_seq = TCP_SKB_CB(skb)->end_seq;
if (after(TCP_SKB_CB(skb)->end_seq, tp->rcv_nxt))
--
1.5.6.3
prev parent reply other threads:[~2009-10-26 8:06 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-26 8:06 [PATCH v3 0/7] Per route TCP options Gilad Ben-Yossef
2009-10-26 8:06 ` [PATCH v3 1/7] Only parse time stamp TCP option in time wait sock Gilad Ben-Yossef
2009-10-26 16:56 ` William Allen Simpson
2009-10-28 10:14 ` Gilad Ben-Yossef
2009-10-26 8:06 ` [PATCH v3 2/7] Allow tcp_parse_options to consult dst entry Gilad Ben-Yossef
2009-10-26 8:06 ` [PATCH v3 3/7] Add dst_feature to query route entry features Gilad Ben-Yossef
2009-10-26 8:06 ` [PATCH v3 4/7] Add the no SACK route option feature Gilad Ben-Yossef
2009-10-26 16:38 ` William Allen Simpson
2009-10-28 10:18 ` Gilad Ben-Yossef
2009-10-26 8:06 ` [PATCH v3 5/7] Allow disabling TCP timestamp options per route Gilad Ben-Yossef
2009-10-26 8:06 ` [PATCH v3 6/7] Allow to turn off TCP window scale opt " Gilad Ben-Yossef
2009-10-26 8:06 ` Gilad Ben-Yossef [this message]
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=1256544393-12450-8-git-send-email-gilad@codefidence.com \
--to=gilad@codefidence.com \
--cc=netdev@vger.kernel.org \
--cc=ori@comsleep.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).