netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thomas Graf <tgraf@suug.ch>
To: "David S. Miller" <davem@davemloft.net>
Cc: netdev@oss.sgi.com
Subject: [PATCH 6/11] [NET] Convert sk_no_largesend into SOCK_NO_LARGESEND flag
Date: Wed, 9 Mar 2005 20:49:19 +0100	[thread overview]
Message-ID: <20050309194919.GN31837@postel.suug.ch> (raw)
In-Reply-To: <20050309194521.GH31837@postel.suug.ch>


Signed-off-by: Thomas Graf <tgraf@suug.ch>

diff -Nru linux-2.6.11-rc4.orig/include/net/sock.h linux-2.6.11-rc4/include/net/sock.h
--- linux-2.6.11-rc4.orig/include/net/sock.h	2005-03-09 01:03:45.000000000 +0100
+++ linux-2.6.11-rc4/include/net/sock.h	2005-03-09 01:08:01.000000000 +0100
@@ -134,7 +134,6 @@
   *	@sk_sndbuf - size of send buffer in bytes
   *	@sk_flags - %SO_LINGER (l_onoff), %SO_BROADCAST, %SO_KEEPALIVE, %SO_OOBINLINE settings
   *	@sk_no_check - %SO_NO_CHECK setting, wether or not checkup packets
-  *	@sk_no_largesend - whether to sent large segments or not
   *	@sk_route_caps - route capabilities (e.g. %NETIF_F_TSO)
   *	@sk_lingertime - %SO_LINGER l_linger setting
   *	@sk_hashent - hash entry in several tables (e.g. tcp_ehash)
@@ -206,7 +205,6 @@
 	int			sk_sndbuf;
 	unsigned long 		sk_flags;
 	char		 	sk_no_check;
-	unsigned char		sk_no_largesend;
 	int			sk_route_caps;
 	unsigned long	        sk_lingertime;
 	int			sk_hashent;
@@ -387,6 +385,7 @@
 	SOCK_USE_WRITE_QUEUE, /* wheter to call sk->sk_write_space in sock_wfree */
 	SOCK_DBG, /* %SO_DEBUG setting */
 	SOCK_RCVTSTAMP, /* %SO_TIMESTAMP setting */
+	SOCK_NO_LARGESEND, /* whether to sent large segments or not */
 };
 
 static inline void sock_set_flag(struct sock *sk, enum sock_flags flag)
diff -Nru linux-2.6.11-rc4.orig/include/net/tcp.h linux-2.6.11-rc4/include/net/tcp.h
--- linux-2.6.11-rc4.orig/include/net/tcp.h	2005-03-08 18:11:24.000000000 +0100
+++ linux-2.6.11-rc4/include/net/tcp.h	2005-03-09 01:06:29.000000000 +0100
@@ -1914,7 +1914,7 @@
 {
 	sk->sk_route_caps = dst->dev->features;
 	if (sk->sk_route_caps & NETIF_F_TSO) {
-		if (sk->sk_no_largesend || dst->header_len)
+		if (sock_flag(sk, SOCK_NO_LARGESEND) || dst->header_len)
 			sk->sk_route_caps &= ~NETIF_F_TSO;
 	}
 }
diff -Nru linux-2.6.11-rc4.orig/include/net/tcp_ecn.h linux-2.6.11-rc4/include/net/tcp_ecn.h
--- linux-2.6.11-rc4.orig/include/net/tcp_ecn.h	2005-03-08 18:11:24.000000000 +0100
+++ linux-2.6.11-rc4/include/net/tcp_ecn.h	2005-03-09 01:06:42.000000000 +0100
@@ -33,7 +33,7 @@
 	if (sysctl_tcp_ecn && !(sk->sk_route_caps & NETIF_F_TSO)) {
 		TCP_SKB_CB(skb)->flags |= TCPCB_FLAG_ECE|TCPCB_FLAG_CWR;
 		tp->ecn_flags = TCP_ECN_OK;
-		sk->sk_no_largesend = 1;
+		sock_set_flag(sk, SOCK_NO_LARGESEND);
 	}
 }
 
diff -Nru linux-2.6.11-rc4.orig/net/ipv4/tcp_input.c linux-2.6.11-rc4/net/ipv4/tcp_input.c
--- linux-2.6.11-rc4.orig/net/ipv4/tcp_input.c	2005-03-08 18:11:28.000000000 +0100
+++ linux-2.6.11-rc4/net/ipv4/tcp_input.c	2005-03-09 01:07:20.000000000 +0100
@@ -977,7 +977,7 @@
 	 * Not good, but alternative is to resegment the queue. */
 	if (sk->sk_route_caps & NETIF_F_TSO) {
 		sk->sk_route_caps &= ~NETIF_F_TSO;
-		sk->sk_no_largesend = 1;
+		sock_set_flag(sk, SOCK_NO_LARGESEND);
 		tp->mss_cache = tp->mss_cache_std;
 	}
 
@@ -4507,7 +4507,7 @@
 
 		TCP_ECN_rcv_synack(tp, th);
 		if (tp->ecn_flags&TCP_ECN_OK)
-			sk->sk_no_largesend = 1;
+			sock_set_flag(sk, SOCK_NO_LARGESEND);
 
 		tp->snd_wl1 = TCP_SKB_CB(skb)->seq;
 		tcp_ack(sk, skb, FLAG_SLOWPATH);
@@ -4645,7 +4645,7 @@
 
 		TCP_ECN_rcv_syn(tp, th);
 		if (tp->ecn_flags&TCP_ECN_OK)
-			sk->sk_no_largesend = 1;
+			sock_set_flag(sk, SOCK_NO_LARGESEND);
 
 		tcp_sync_mss(sk, tp->pmtu_cookie);
 		tcp_initialize_rcv_mss(sk);
diff -Nru linux-2.6.11-rc4.orig/net/ipv4/tcp_minisocks.c linux-2.6.11-rc4/net/ipv4/tcp_minisocks.c
--- linux-2.6.11-rc4.orig/net/ipv4/tcp_minisocks.c	2005-03-08 18:11:28.000000000 +0100
+++ linux-2.6.11-rc4/net/ipv4/tcp_minisocks.c	2005-03-09 01:07:30.000000000 +0100
@@ -841,7 +841,7 @@
 		newtp->rx_opt.mss_clamp = req->mss;
 		TCP_ECN_openreq_child(newtp, req);
 		if (newtp->ecn_flags&TCP_ECN_OK)
-			newsk->sk_no_largesend = 1;
+			sock_set_flag(newsk, SOCK_NO_LARGESEND);
 
 		tcp_ca_init(newtp);
 
diff -Nru linux-2.6.11-rc4.orig/net/ipv4/tcp_output.c linux-2.6.11-rc4/net/ipv4/tcp_output.c
--- linux-2.6.11-rc4.orig/net/ipv4/tcp_output.c	2005-03-08 18:11:28.000000000 +0100
+++ linux-2.6.11-rc4/net/ipv4/tcp_output.c	2005-03-09 01:07:56.000000000 +0100
@@ -1040,7 +1040,7 @@
 
 		if (sk->sk_route_caps & NETIF_F_TSO) {
 			sk->sk_route_caps &= ~NETIF_F_TSO;
-			sk->sk_no_largesend = 1;
+			sock_set_flag(sk, SOCK_NO_LARGESEND);
 			tp->mss_cache = tp->mss_cache_std;
 		}
 
@@ -1669,7 +1669,7 @@
 				/* SWS override triggered forced fragmentation.
 				 * Disable TSO, the connection is too sick. */
 				if (sk->sk_route_caps & NETIF_F_TSO) {
-					sk->sk_no_largesend = 1;
+					sock_set_flag(sk, SOCK_NO_LARGESEND);
 					sk->sk_route_caps &= ~NETIF_F_TSO;
 					tp->mss_cache = tp->mss_cache_std;
 				}

  parent reply	other threads:[~2005-03-09 19:49 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-09 19:45 [PATCHSET] [NET] Various sock struct reorderings Thomas Graf
2005-03-09 19:46 ` [PATCH 1/11] [NET] Reorder struct inet_sock Thomas Graf
2005-03-09 19:47 ` [PATCH 2/11] [NET] Convert sk_zapped into SOCK_ZAPPED flag Thomas Graf
2005-03-09 19:54   ` Patrick McHardy
2005-03-09 19:56     ` Thomas Graf
2005-03-09 20:05       ` Patrick McHardy
2005-03-09 20:23         ` Thomas Graf
2005-03-09 19:47 ` [PATCH 3/11] [NET] Convert sk_user_write_queue into SOCK_USE_WRITE_QUEUE flag Thomas Graf
2005-03-09 19:48 ` [PATCH 4/11] [NET] Convert sk_debug into SOCK_DBG flag Thomas Graf
2005-03-09 19:48 ` [PATCH 5/11] [NET] Convert sk_rcvtstamp into SOCK_RCVTSTAMP flag Thomas Graf
2005-03-09 19:49 ` Thomas Graf [this message]
2005-03-09 19:49 ` [PATCH 7/11] [NET] Convert sk_localroute into SOCK_LOCALROUTE flag Thomas Graf
2005-03-09 19:50 ` [PATCH 8/11] [NET] Convert sk_queue_shrunk into SOCK_QUEUE_SHRUNK flag Thomas Graf
2005-03-09 19:51 ` [PATCH 9/11] [NET] Reorder struct sock Thomas Graf
2005-03-09 19:51 ` [PATCH 10/11] [NET] Reorder struct ipv6_pinfo Thomas Graf
2005-03-09 19:52 ` [PATCH 11/11] [NET] Reorder struct tcp_options_received Thomas Graf

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=20050309194919.GN31837@postel.suug.ch \
    --to=tgraf@suug.ch \
    --cc=davem@davemloft.net \
    --cc=netdev@oss.sgi.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).