|
@@ -2019,7 +2019,7 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle,
|
|
|
if (unlikely(!tcp_snd_wnd_test(tp, skb, mss_now)))
|
|
|
break;
|
|
|
|
|
|
- if (tso_segs == 1) {
|
|
|
+ if (tso_segs == 1 || !max_segs) {
|
|
|
if (unlikely(!tcp_nagle_test(tp, skb, mss_now,
|
|
|
(tcp_skb_is_last(sk, skb) ?
|
|
|
nonagle : TCP_NAGLE_PUSH))))
|
|
@@ -2032,7 +2032,7 @@ static bool tcp_write_xmit(struct sock *sk, unsigned int mss_now, int nonagle,
|
|
|
}
|
|
|
|
|
|
limit = mss_now;
|
|
|
- if (tso_segs > 1 && !tcp_urg_mode(tp))
|
|
|
+ if (tso_segs > 1 && max_segs && !tcp_urg_mode(tp))
|
|
|
limit = tcp_mss_split_point(sk, skb, mss_now,
|
|
|
min_t(unsigned int,
|
|
|
cwnd_quota,
|