diff options
| author | Thomas Graf <tgraf@suug.ch> | 2005-03-16 02:15:15 +0100 |
|---|---|---|
| committer | Thomas Graf <tgraf@suug.ch> | 2005-03-16 02:15:15 +0100 |
| commit | edca4cb448ccb4d88ecfcb9edf320eb3f9fd7828 (patch) | |
| tree | 03e0f9701494157521d4fe0706b0b9705f9d5af1 /include/net | |
| parent | a585a039c6e03702d0b32145013aba2f66cbc128 (diff) | |
[NET] Convert sk_no_largesend into SOCK_NO_LARGESEND flag
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
| -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 |
3 files changed, 3 insertions, 4 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); } } |
