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
| ||
|
Date: Wed, 7 May 2008 15:23:06 -0700 From: "Waskiewicz Jr, Peter P" <peter.p.waskiewicz.jr@...el.com> To: "Ben Hutchings" <bhutchings@...arflare.com>, "prodyut hazarika" <prodyuth@...il.com> Cc: <netdev@...r.kernel.org> Subject: RE: State of TCP segmentation offload to NIC in linux > > > 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>). To add: the flag that sk_can_gso() checks is set on the socket creation, based on the underlying netdevice's TSO capabilities. There are a bunch of flags in the sk struct that get set on TCP socket creation that are then used elsewhere in the TCP stack. Cheers, -PJ -- 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