Loading net/ipv4/tcp.c +8 −26 Original line number Diff line number Diff line Loading @@ -898,7 +898,7 @@ static unsigned int tcp_xmit_size_goal(struct sock *sk, u32 mss_now, struct tcp_sock *tp = tcp_sk(sk); u32 new_size_goal, size_goal; if (!large_allowed || !sk_can_gso(sk)) if (!large_allowed) return mss_now; /* Note : tcp_tso_autosize() will eventually split this later */ Loading Loading @@ -1103,27 +1103,11 @@ static int linear_payload_sz(bool first_skb) return 0; } static int select_size(const struct sock *sk, bool sg, bool first_skb, bool zc) static int select_size(bool first_skb, bool zc) { const struct tcp_sock *tp = tcp_sk(sk); int tmp = tp->mss_cache; if (sg) { if (zc) return 0; if (sk_can_gso(sk)) { tmp = linear_payload_sz(first_skb); } else { int pgbreak = SKB_MAX_HEAD(MAX_TCP_HEADER); if (tmp >= pgbreak && tmp <= pgbreak + (MAX_SKB_FRAGS - 1) * PAGE_SIZE) tmp = pgbreak; } } return tmp; return linear_payload_sz(first_skb); } void tcp_free_fastopen_req(struct tcp_sock *tp) Loading Loading @@ -1188,7 +1172,7 @@ int tcp_sendmsg_locked(struct sock *sk, struct msghdr *msg, size_t size) int flags, err, copied = 0; int mss_now = 0, size_goal, copied_syn = 0; bool process_backlog = false; bool sg, zc = false; bool zc = false; long timeo; flags = msg->msg_flags; Loading Loading @@ -1269,8 +1253,6 @@ int tcp_sendmsg_locked(struct sock *sk, struct msghdr *msg, size_t size) if (sk->sk_err || (sk->sk_shutdown & SEND_SHUTDOWN)) goto do_error; sg = !!(sk->sk_route_caps & NETIF_F_SG); while (msg_data_left(msg)) { int copy = 0; int max = size_goal; Loading Loading @@ -1298,7 +1280,7 @@ int tcp_sendmsg_locked(struct sock *sk, struct msghdr *msg, size_t size) goto restart; } first_skb = tcp_rtx_and_write_queues_empty(sk); linear = select_size(sk, sg, first_skb, zc); linear = select_size(first_skb, zc); skb = sk_stream_alloc_skb(sk, linear, sk->sk_allocation, first_skb); if (!skb) Loading Loading @@ -1344,7 +1326,7 @@ int tcp_sendmsg_locked(struct sock *sk, struct msghdr *msg, size_t size) if (!skb_can_coalesce(skb, i, pfrag->page, pfrag->offset)) { if (i >= sysctl_max_skb_frags || !sg) { if (i >= sysctl_max_skb_frags) { tcp_mark_push(tp, skb); goto new_segment; } Loading net/ipv4/tcp_input.c +0 −3 Original line number Diff line number Diff line Loading @@ -1358,9 +1358,6 @@ static struct sk_buff *tcp_shift_skb_data(struct sock *sk, struct sk_buff *skb, int len; int in_sack; if (!sk_can_gso(sk)) goto fallback; /* Normally R but no L won't result in plain S */ if (!dup_sack && (TCP_SKB_CB(skb)->sacked & (TCPCB_LOST|TCPCB_SACKED_RETRANS)) == TCPCB_SACKED_RETRANS) Loading Loading
net/ipv4/tcp.c +8 −26 Original line number Diff line number Diff line Loading @@ -898,7 +898,7 @@ static unsigned int tcp_xmit_size_goal(struct sock *sk, u32 mss_now, struct tcp_sock *tp = tcp_sk(sk); u32 new_size_goal, size_goal; if (!large_allowed || !sk_can_gso(sk)) if (!large_allowed) return mss_now; /* Note : tcp_tso_autosize() will eventually split this later */ Loading Loading @@ -1103,27 +1103,11 @@ static int linear_payload_sz(bool first_skb) return 0; } static int select_size(const struct sock *sk, bool sg, bool first_skb, bool zc) static int select_size(bool first_skb, bool zc) { const struct tcp_sock *tp = tcp_sk(sk); int tmp = tp->mss_cache; if (sg) { if (zc) return 0; if (sk_can_gso(sk)) { tmp = linear_payload_sz(first_skb); } else { int pgbreak = SKB_MAX_HEAD(MAX_TCP_HEADER); if (tmp >= pgbreak && tmp <= pgbreak + (MAX_SKB_FRAGS - 1) * PAGE_SIZE) tmp = pgbreak; } } return tmp; return linear_payload_sz(first_skb); } void tcp_free_fastopen_req(struct tcp_sock *tp) Loading Loading @@ -1188,7 +1172,7 @@ int tcp_sendmsg_locked(struct sock *sk, struct msghdr *msg, size_t size) int flags, err, copied = 0; int mss_now = 0, size_goal, copied_syn = 0; bool process_backlog = false; bool sg, zc = false; bool zc = false; long timeo; flags = msg->msg_flags; Loading Loading @@ -1269,8 +1253,6 @@ int tcp_sendmsg_locked(struct sock *sk, struct msghdr *msg, size_t size) if (sk->sk_err || (sk->sk_shutdown & SEND_SHUTDOWN)) goto do_error; sg = !!(sk->sk_route_caps & NETIF_F_SG); while (msg_data_left(msg)) { int copy = 0; int max = size_goal; Loading Loading @@ -1298,7 +1280,7 @@ int tcp_sendmsg_locked(struct sock *sk, struct msghdr *msg, size_t size) goto restart; } first_skb = tcp_rtx_and_write_queues_empty(sk); linear = select_size(sk, sg, first_skb, zc); linear = select_size(first_skb, zc); skb = sk_stream_alloc_skb(sk, linear, sk->sk_allocation, first_skb); if (!skb) Loading Loading @@ -1344,7 +1326,7 @@ int tcp_sendmsg_locked(struct sock *sk, struct msghdr *msg, size_t size) if (!skb_can_coalesce(skb, i, pfrag->page, pfrag->offset)) { if (i >= sysctl_max_skb_frags || !sg) { if (i >= sysctl_max_skb_frags) { tcp_mark_push(tp, skb); goto new_segment; } Loading
net/ipv4/tcp_input.c +0 −3 Original line number Diff line number Diff line Loading @@ -1358,9 +1358,6 @@ static struct sk_buff *tcp_shift_skb_data(struct sock *sk, struct sk_buff *skb, int len; int in_sack; if (!sk_can_gso(sk)) goto fallback; /* Normally R but no L won't result in plain S */ if (!dup_sack && (TCP_SKB_CB(skb)->sacked & (TCPCB_LOST|TCPCB_SACKED_RETRANS)) == TCPCB_SACKED_RETRANS) Loading