diff options
| -rw-r--r-- | include/net/sock.h | 3 | ||||
| -rw-r--r-- | include/net/tcp.h | 2 | ||||
| -rw-r--r-- | include/net/tcp_ecn.h | 2 | ||||
| -rw-r--r-- | net/ipv4/tcp_input.c | 6 | ||||
| -rw-r--r-- | net/ipv4/tcp_minisocks.c | 2 | ||||
| -rw-r--r-- | net/ipv4/tcp_output.c | 4 |
6 files changed, 9 insertions, 10 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 994ba0c83b11..94b74b2e9172 100644 --- a/include/net/sock.h +++ b/include/net/sock.h @@ -134,7 +134,6 @@ struct sock_common { * @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 @@ struct sock { 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 @@ enum sock_flags { SOCK_USE_WRITE_QUEUE, /* whether 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 --git a/include/net/tcp.h b/include/net/tcp.h index 0c62cdc5b2f0..503810a70e21 100644 --- a/include/net/tcp.h +++ b/include/net/tcp.h @@ -1915,7 +1915,7 @@ static inline void tcp_v4_setup_caps(struct sock *sk, struct dst_entry *dst) { 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 --git a/include/net/tcp_ecn.h b/include/net/tcp_ecn.h index 773c00b5a89b..dc1456389a97 100644 --- a/include/net/tcp_ecn.h +++ b/include/net/tcp_ecn.h @@ -33,7 +33,7 @@ static inline void TCP_ECN_send_syn(struct sock *sk, struct tcp_sock *tp, 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 --git a/net/ipv4/tcp_input.c b/net/ipv4/tcp_input.c index 8a71e824e17e..15dac88c898c 100644 --- a/net/ipv4/tcp_input.c +++ b/net/ipv4/tcp_input.c @@ -977,7 +977,7 @@ tcp_sacktag_write_queue(struct sock *sk, struct sk_buff *ack_skb, u32 prior_snd_ * 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 @@ static int tcp_rcv_synsent_state_process(struct sock *sk, struct sk_buff *skb, 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 @@ discard: 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 --git a/net/ipv4/tcp_minisocks.c b/net/ipv4/tcp_minisocks.c index 1e2265c086ba..2faf1a9c3eba 100644 --- a/net/ipv4/tcp_minisocks.c +++ b/net/ipv4/tcp_minisocks.c @@ -841,7 +841,7 @@ struct sock *tcp_create_openreq_child(struct sock *sk, struct open_request *req, 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 --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index de77c8547b23..ba0645d0008b 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -1040,7 +1040,7 @@ int tcp_retransmit_skb(struct sock *sk, struct sk_buff *skb) 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 @@ int tcp_write_wakeup(struct sock *sk) /* 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; } |
