[PATCH v5 3/7] tcp: harmonize tcp_vx_rcv header length assumptions

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: William Allen Simpson
Date: Saturday, February 13, 2010 - 11:16 pm

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
CC: Andi Kleen <andi@firstfloor.org>
---
  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:
[PATCH 0/7] tcp: bugs and cleanup updated to 2.6.33-rc8, William Allen Simpson, (Sat Feb 13, 11:01 pm)
[PATCH v3 1/7] net: tcp_header_len_th and tcp_option_len_th, William Allen Simpson, (Sat Feb 13, 11:05 pm)
[PATCH v3 2/7] net: remove old tcp_optlen function, William Allen Simpson, (Sat Feb 13, 11:09 pm)
[PATCH v5 3/7] tcp: harmonize tcp_vx_rcv header length ass ..., William Allen Simpson, (Sat Feb 13, 11:16 pm)
[PATCH v4 4/7] tcp: input header length, prediction, and t ..., William Allen Simpson, (Sat Feb 13, 11:21 pm)
[PATCH v3 5/7] TCPCT part 2e: accept SYNACK data, William Allen Simpson, (Sat Feb 13, 11:26 pm)
[PATCH v4 6/7] TCPCT part 2f: cleanup tcp_parse_options, William Allen Simpson, (Sat Feb 13, 11:41 pm)
[PATCH v6 7/7] TCPCT part 2g: parse cookie pair and 64-bit ..., William Allen Simpson, (Sun Feb 14, 12:02 am)
Re: [PATCH v3 2/7] net: remove old tcp_optlen function, David Miller, (Wed Feb 17, 4:43 pm)