From: Stephen Hemminger <shemminger@vyatta.com>
To: Hannes Frederic Sowa <hannes@stressinduktion.org>
Cc: netdev@vger.kernel.org, eric.dumazet@gmail.com, davem@davemloft.net
Subject: Re: [PATCH] tcp: make sysctl_tcp_ecn namespace aware
Date: Sat, 5 Jan 2013 11:00:05 -0800 [thread overview]
Message-ID: <20130105110005.2bf230eb@nehalam.linuxnetplumber.net> (raw)
In-Reply-To: <20130105150130.GC4031@order.stressinduktion.org>
Rather than passing sysctl_tcp_ecn around as a parameter, I think it
would be clearer and more efficient to make the ECN functions namespace
aware.
Instead of:
> @@ -728,7 +728,8 @@ struct tcp_skb_cb {
> * notifications, we disable TCP ECN negociation.
> */
> static inline void
> -TCP_ECN_create_request(struct request_sock *req, const struct sk_buff *skb)
> +TCP_ECN_create_request(struct request_sock *req, const struct sk_buff *skb,
> + int sysctl_tcp_ecn)
> {
> const struct tcphdr *th = tcp_hdr(skb);
>
@@ -731,8 +730,9 @@ static inline void
TCP_ECN_create_request(struct request_sock *req, const struct sk_buff *skb)
{
const struct tcphdr *th = tcp_hdr(skb);
-
- if (sysctl_tcp_ecn && th->ece && th->cwr &&
+
+ if (sock_net(req->sk)->ipv4.sysctl_tcp_ecn &&
+ th->ece && th->cwr &&
INET_ECN_is_not_ect(TCP_SKB_CB(skb)->ip_dsfield))
inet_rsk(req)->ecn_ok = 1;
}
next prev parent reply other threads:[~2013-01-05 19:01 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-01-05 15:01 [PATCH] tcp: make sysctl_tcp_ecn namespace aware Hannes Frederic Sowa
2013-01-05 19:00 ` Stephen Hemminger [this message]
2013-01-05 19:05 ` Hannes Frederic Sowa
2013-01-06 1:18 ` Hannes Frederic Sowa
2013-01-06 1:27 ` Eric Dumazet
2013-01-06 2:10 ` Hannes Frederic Sowa
2013-01-06 2:19 ` Eric Dumazet
2013-01-07 5:10 ` David Miller
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=20130105110005.2bf230eb@nehalam.linuxnetplumber.net \
--to=shemminger@vyatta.com \
--cc=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=hannes@stressinduktion.org \
--cc=netdev@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.