lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 7 May 2008 22:51:07 +0100
From:	Ben Hutchings <bhutchings@...arflare.com>
To:	prodyut hazarika <prodyuth@...il.com>
Cc:	"Waskiewicz Jr, Peter P" <peter.p.waskiewicz.jr@...el.com>,
	netdev@...r.kernel.org
Subject: Re: State of TCP segmentation offload to NIC in linux

prodyut hazarika wrote:
> Thanks for your reply, Peter. I would appreciate if you could clarify
> little more.
> 
> 
> > The IP layer does not need to be bypassed.  The TCP layer will set the
> > proper headers for TSO to work properly and continue sending the skb
> > down the stack.  IP will not fragment a packet on transmit.
> 
> Which flag/header does the TCP layer set to indicate to IP that it
> should not fragment a 64K segment, but rather offload the whole
> segment to NIC?

It sets skb_shinfo(skb)->gso_size to the desired segment size.

> I tried to look at the TCP code in linux stack, but
> could not figure the flag or the logic that sets the flag/header you
> mentioned. The NIC driver must indicate that it is capable of doing
> TSO by setting NETIF_F_TSO flag, but NETIF_F_TSO capability is not
> checked in IP/TCP layer.
 
It's checked using sk_can_gso() (defined in <net/sock.h>) which
calls net_gso_ok() (defined in <linux/netdevice.h>).

> I would really appreciate if you could point me to the function in TCP
> code in linux.

Ben.

-- 
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ