diff mbox

[REGRESSION,bisect] cxgb4 port failure with TSO traffic after commit 10d3be569243def8("tcp-tso: do not split TSO packets at retransmit time")

Message ID 1467019279.6850.145.camel@edumazet-glaptop3.roam.corp.google.com
State RFC, archived
Delegated to: David Miller
Headers show

Commit Message

Eric Dumazet June 27, 2016, 9:21 a.m. UTC
On Mon, 2016-06-27 at 14:29 +0530, Arjun V wrote:
> On Monday, June 06/27/16, 2016 at 13:36:22 +0530, Eric Dumazet wrote:
> > On Mon, 2016-06-27 at 12:47 +0530, Arjun V wrote:
> > 
> > > Eric,
> > > 
> > > Thanks for the quick patch. It didn't help much. We still see packets larger than 65536 with the patch.
> > > 
> > > Below is the dump_stack() trace I am seeing for packets larger than 65536 in our xmit routine:
> > 
> > What values do you get for skb->len ?
> >
> These are the skb->len values I am hitting in t4_eth_xmit() for around half hour run of netperf bidi(800 connections total)
> packet with skb->len 69570 detected
> packet with skb->len 66674 detected

Ok please add :

Comments

Arjun Vynipadath June 27, 2016, 9:54 a.m. UTC | #1
On Monday, June 06/27/16, 2016 at 14:51:19 +0530, Eric Dumazet wrote:
> On Mon, 2016-06-27 at 14:29 +0530, Arjun V wrote:
> > On Monday, June 06/27/16, 2016 at 13:36:22 +0530, Eric Dumazet wrote:
> > > On Mon, 2016-06-27 at 12:47 +0530, Arjun V wrote:
> > > 
> > > > Eric,
> > > > 
> > > > Thanks for the quick patch. It didn't help much. We still see packets larger than 65536 with the patch.
> > > > 
> > > > Below is the dump_stack() trace I am seeing for packets larger than 65536 in our xmit routine:
> > > 
> > > What values do you get for skb->len ?
> > >
> > These are the skb->len values I am hitting in t4_eth_xmit() for around half hour run of netperf bidi(800 connections total)
> > packet with skb->len 69570 detected
> > packet with skb->len 66674 detected
> 
> Ok please add :
> 
> diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
> index 5c7ed147449c1b7ba029b12e033ad779a631460a..39bd2a2b8f4d931c514fe62a00541efef29157ad 100644
> --- a/net/ipv4/tcp.c
> +++ b/net/ipv4/tcp.c
> @@ -845,6 +845,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;
> +	u32 res;
>  
>  	if (!large_allowed || !sk_can_gso(sk))
>  		return mss_now;
> @@ -862,7 +863,11 @@ static unsigned int tcp_xmit_size_goal(struct sock *sk, u32 mss_now,
>  		size_goal = tp->gso_segs * mss_now;
>  	}
>  
> -	return max(size_goal, mss_now);
> +	res = max(size_goal, mss_now);
> +	if (res >= 65536)
> +		pr_err_once("tcp_xmit_size_goal() -> %u size_goal %u, mss_now %u gso_max_size %u gso_segs %u\n",
> +			    res, size_goal, mss_now, sk->sk_gso_max_size, tp->gso_segs);
> +	return res;
>  }
>  
>  static int tcp_send_mss(struct sock *sk, int *size_goal, int flags)
> 
> 
Applied your patch.
The above debug print is not getting invoked, when skb->len is greater than 65536.
Eric Dumazet June 27, 2016, 10:50 a.m. UTC | #2
On Mon, 2016-06-27 at 15:24 +0530, Arjun V wrote:

> Applied your patch.
> The above debug print is not getting invoked, when skb->len is greater than 65536.

Interesting.

It looks like we might have a bug in tcp_shift_skb_data() not respecting
sk->sk_gso_max_size at all ...

I will send a patch.

Thanks.
diff mbox

Patch

diff --git a/net/ipv4/tcp.c b/net/ipv4/tcp.c
index 5c7ed147449c1b7ba029b12e033ad779a631460a..39bd2a2b8f4d931c514fe62a00541efef29157ad 100644
--- a/net/ipv4/tcp.c
+++ b/net/ipv4/tcp.c
@@ -845,6 +845,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;
+	u32 res;
 
 	if (!large_allowed || !sk_can_gso(sk))
 		return mss_now;
@@ -862,7 +863,11 @@  static unsigned int tcp_xmit_size_goal(struct sock *sk, u32 mss_now,
 		size_goal = tp->gso_segs * mss_now;
 	}
 
-	return max(size_goal, mss_now);
+	res = max(size_goal, mss_now);
+	if (res >= 65536)
+		pr_err_once("tcp_xmit_size_goal() -> %u size_goal %u, mss_now %u gso_max_size %u gso_segs %u\n",
+			    res, size_goal, mss_now, sk->sk_gso_max_size, tp->gso_segs);
+	return res;
 }
 
 static int tcp_send_mss(struct sock *sk, int *size_goal, int flags)