tcp.c (fb3477c0f45aad5dfb2de559949872770e6cd431) | tcp.c (d41a69f1d390fa3f2546498103cdcd78b30676ff) |
---|---|
1/* 2 * INET An implementation of the TCP/IP protocol suite for the LINUX 3 * operating system. INET is implemented using the BSD Socket 4 * interface as the means of communication with the user level. 5 * 6 * Implementation of the Transmission Control Protocol(TCP). 7 * 8 * Authors: Ross Biro --- 1122 unchanged lines hidden (view full) --- 1131 err = -EINVAL; 1132 goto out_err; 1133 } 1134 } 1135 1136 /* This should be in poll */ 1137 sk_clear_bit(SOCKWQ_ASYNC_NOSPACE, sk); 1138 | 1/* 2 * INET An implementation of the TCP/IP protocol suite for the LINUX 3 * operating system. INET is implemented using the BSD Socket 4 * interface as the means of communication with the user level. 5 * 6 * Implementation of the Transmission Control Protocol(TCP). 7 * 8 * Authors: Ross Biro --- 1122 unchanged lines hidden (view full) --- 1131 err = -EINVAL; 1132 goto out_err; 1133 } 1134 } 1135 1136 /* This should be in poll */ 1137 sk_clear_bit(SOCKWQ_ASYNC_NOSPACE, sk); 1138 |
1139 mss_now = tcp_send_mss(sk, &size_goal, flags); 1140 | |
1141 /* Ok commence sending. */ 1142 copied = 0; 1143 | 1139 /* Ok commence sending. */ 1140 copied = 0; 1141 |
1142restart: 1143 mss_now = tcp_send_mss(sk, &size_goal, flags); 1144 |
|
1144 err = -EPIPE; 1145 if (sk->sk_err || (sk->sk_shutdown & SEND_SHUTDOWN)) 1146 goto out_err; 1147 1148 sg = !!(sk->sk_route_caps & NETIF_F_SG); 1149 1150 while (msg_data_left(msg)) { 1151 int copy = 0; --- 9 unchanged lines hidden (view full) --- 1161 if (copy <= 0 || !tcp_skb_can_collapse_to(skb)) { 1162new_segment: 1163 /* Allocate new segment. If the interface is SG, 1164 * allocate skb fitting to single page. 1165 */ 1166 if (!sk_stream_memory_free(sk)) 1167 goto wait_for_sndbuf; 1168 | 1145 err = -EPIPE; 1146 if (sk->sk_err || (sk->sk_shutdown & SEND_SHUTDOWN)) 1147 goto out_err; 1148 1149 sg = !!(sk->sk_route_caps & NETIF_F_SG); 1150 1151 while (msg_data_left(msg)) { 1152 int copy = 0; --- 9 unchanged lines hidden (view full) --- 1162 if (copy <= 0 || !tcp_skb_can_collapse_to(skb)) { 1163new_segment: 1164 /* Allocate new segment. If the interface is SG, 1165 * allocate skb fitting to single page. 1166 */ 1167 if (!sk_stream_memory_free(sk)) 1168 goto wait_for_sndbuf; 1169 |
1170 if (sk_flush_backlog(sk)) 1171 goto restart; 1172 |
|
1169 skb = sk_stream_alloc_skb(sk, 1170 select_size(sk, sg), 1171 sk->sk_allocation, 1172 skb_queue_empty(&sk->sk_write_queue)); 1173 if (!skb) 1174 goto wait_for_memory; 1175 1176 /* --- 2086 unchanged lines hidden --- | 1173 skb = sk_stream_alloc_skb(sk, 1174 select_size(sk, sg), 1175 sk->sk_allocation, 1176 skb_queue_empty(&sk->sk_write_queue)); 1177 if (!skb) 1178 goto wait_for_memory; 1179 1180 /* --- 2086 unchanged lines hidden --- |