netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* TCP_MAXSEG option with TSO enabled
@ 2012-03-30 11:33 Daniel Baluta
  2012-03-30 17:38 ` Rick Jones
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Baluta @ 2012-03-30 11:33 UTC (permalink / raw)
  To: netdev

Hello,

I am using TCP_MAXSEG option on an interface which has TSO enabled.

strace output for connection looks as follows:

socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 26
setsockopt(26, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
setsockopt(26, SOL_TCP, TCP_NODELAY, [1], 4) = 0
setsockopt(26, SOL_TCP, TCP_MAXSEG, [300], 4) = 0
connect(26, {sa_family=AF_INET, sin_port=htons(1935),
sin_addr=inet_addr("10.10.0.1")}, 16) = -1 EINPROGRESS (Operation now
in progress)

I can see that MSS (300) is advertised in SYN packet, anyhow capturing
the traffic
I notice that are some TCP segments with length greater than MSS.

Is this normal taking in consideration that TSO is enabled?

thanks,
Daniel.

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: TCP_MAXSEG option with TSO enabled
  2012-03-30 11:33 TCP_MAXSEG option with TSO enabled Daniel Baluta
@ 2012-03-30 17:38 ` Rick Jones
  2012-03-30 18:07   ` Daniel Baluta
  0 siblings, 1 reply; 3+ messages in thread
From: Rick Jones @ 2012-03-30 17:38 UTC (permalink / raw)
  To: Daniel Baluta; +Cc: netdev

On 03/30/2012 04:33 AM, Daniel Baluta wrote:
> Hello,
>
> I am using TCP_MAXSEG option on an interface which has TSO enabled.
>
> strace output for connection looks as follows:
>
> socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 26
> setsockopt(26, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
> setsockopt(26, SOL_TCP, TCP_NODELAY, [1], 4) = 0
> setsockopt(26, SOL_TCP, TCP_MAXSEG, [300], 4) = 0
> connect(26, {sa_family=AF_INET, sin_port=htons(1935),
> sin_addr=inet_addr("10.10.0.1")}, 16) = -1 EINPROGRESS (Operation now
> in progress)
>
> I can see that MSS (300) is advertised in SYN packet, anyhow capturing
> the traffic
> I notice that are some TCP segments with length greater than MSS.
>
> Is this normal taking in consideration that TSO is enabled?

I would think so.  What do the netstat stats suggest for segments and 
bytes per segment when you are running your test?  You could always look 
for an on-the-wire packet trace.

Not sure that a trace on a receiver would give you that though - the 
inbound promiscuous tap may be above GRO (and almost certainly will be 
above LRO)

rick jones

>
> thanks,
> Daniel.
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: TCP_MAXSEG option with TSO enabled
  2012-03-30 17:38 ` Rick Jones
@ 2012-03-30 18:07   ` Daniel Baluta
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Baluta @ 2012-03-30 18:07 UTC (permalink / raw)
  To: Rick Jones; +Cc: netdev

On Fri, Mar 30, 2012 at 8:38 PM, Rick Jones <rick.jones2@hp.com> wrote:
> On 03/30/2012 04:33 AM, Daniel Baluta wrote:
>>
>> Hello,
>>
>> I am using TCP_MAXSEG option on an interface which has TSO enabled.
>>
>> strace output for connection looks as follows:
>>
>> socket(PF_INET, SOCK_STREAM, IPPROTO_IP) = 26
>> setsockopt(26, SOL_SOCKET, SO_REUSEADDR, [1], 4) = 0
>> setsockopt(26, SOL_TCP, TCP_NODELAY, [1], 4) = 0
>> setsockopt(26, SOL_TCP, TCP_MAXSEG, [300], 4) = 0
>> connect(26, {sa_family=AF_INET, sin_port=htons(1935),
>> sin_addr=inet_addr("10.10.0.1")}, 16) = -1 EINPROGRESS (Operation now
>> in progress)
>>
>> I can see that MSS (300) is advertised in SYN packet, anyhow capturing
>> the traffic
>> I notice that are some TCP segments with length greater than MSS.
>>
>> Is this normal taking in consideration that TSO is enabled?
>
>
> I would think so.  What do the netstat stats suggest for segments and bytes
> per segment when you are running your test?  You could always look for an
> on-the-wire packet trace.
>
> Not sure that a trace on a receiver would give you that though - the inbound
> promiscuous tap may be above GRO (and almost certainly will be above LRO)

Thanks Rick. Indeed on-the-wire capture looks fine. I have TSO enabled
at sender and LRO at receiver, everything makes sense now.

thanks,
Daniel.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-03-30 18:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-03-30 11:33 TCP_MAXSEG option with TSO enabled Daniel Baluta
2012-03-30 17:38 ` Rick Jones
2012-03-30 18:07   ` Daniel Baluta

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).