diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 493876cfa59726172b3085d7eb1aa56d3c6ed41e..41ba0f6eb66c21b872d1c2fcd55dbc15f4b41ef6 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -2968,7 +2968,13 @@ void tcp_send_fin(struct sock *sk) * Note: in the latter case, FIN packet will be sent after a timeout, * as TCP stack thinks it has already been transmitted. */ +#ifdef CONFIG_LTQ_TOE_DRIVER + /* don't piggyback the FIN for large packets (TSO) + bug in HW will add FIN flag for all the segmented packets */ + if (tskb && (tcp_send_head(sk) || tcp_under_memory_pressure(sk)) && (tskb->len < tcp_current_mss(sk))) { +#else if (tskb && (tcp_send_head(sk) || tcp_under_memory_pressure(sk))) { +#endif coalesce: TCP_SKB_CB(tskb)->tcp_flags |= TCPHDR_FIN; TCP_SKB_CB(tskb)->end_seq++;