[PATCH v5] tcp: harmonize tcp_vx_rcv header length assumptions

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: William Allen Simpson
Date: Thursday, January 14, 2010 - 8:10 am

Harmonize tcp_v4_rcv() and tcp_v6_rcv() -- better document tcp doff
and header length assumptions, and carefully compare implementations.

Reduces multiply/shifts, marginally improving speed.

Removes redundant tcp header length checks before checksumming.

Instead, assumes (and documents) that any backlog processing and
transform policies will carefully preserve the header, and will
ensure the socket buffer length remains >= the header size.

Stand-alone patch, originally developed for TCPCT.

Signed-off-by: William.Allen.Simpson@gmail.com
---
  include/net/xfrm.h  |    7 ++++++
  net/ipv4/tcp_ipv4.c |   45 +++++++++++++++++++++-----------------
  net/ipv6/tcp_ipv6.c |   59 ++++++++++++++++++++++++++++----------------------
  3 files changed, 65 insertions(+), 46 deletions(-)
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
query: redundant tcp header length checks?, William Allen Simpson, (Sun Jan 10, 6:02 am)
[PATCH] tcp: harmonize tcp_vx_rcv header length assumptions, William Allen Simpson, (Tue Jan 12, 3:05 am)
Re: [PATCH] tcp: harmonize tcp_vx_rcv header length assump ..., William Allen Simpson, (Tue Jan 12, 10:11 am)
Re: [PATCH] tcp: harmonize tcp_vx_rcv header length assump ..., William Allen Simpson, (Tue Jan 12, 10:14 am)
Re: [PATCH] tcp: harmonize tcp_vx_rcv header length assump ..., William Allen Simpson, (Wed Jan 13, 2:50 am)
[PATCH v4] tcp: harmonize tcp_vx_rcv header length assumptions, William Allen Simpson, (Wed Jan 13, 3:48 am)
Re: [PATCH v4] tcp: harmonize tcp_vx_rcv header length ass ..., William Allen Simpson, (Wed Jan 13, 8:36 am)
Re: [PATCH v4] tcp: harmonize tcp_vx_rcv header length ass ..., William Allen Simpson, (Wed Jan 13, 12:49 pm)
Re: [PATCH] Makefile: Document ability to make file.lst an ..., William Allen Simpson, (Wed Jan 13, 12:51 pm)
Re: [PATCH v4] tcp: harmonize tcp_vx_rcv header length ass ..., William Allen Simpson, (Wed Jan 13, 2:13 pm)
Re: [PATCH] Makefile: Document ability to make file.lst an ..., =?UTF-8?Q?Am=C3=A9ri ..., (Wed Jan 13, 8:26 pm)
Re: [PATCH v4] tcp: harmonize tcp_vx_rcv header length ass ..., William Allen Simpson, (Thu Jan 14, 8:02 am)
[PATCH v5] tcp: harmonize tcp_vx_rcv header length assumptions, William Allen Simpson, (Thu Jan 14, 8:10 am)