Project

General

Profile

Actions

Optimization #1037

closed
KS VJ

Optimize TCP Option storage

Optimization #1037: Optimize TCP Option storage

Added by Ken Steele over 12 years ago. Updated about 10 years ago.

Status:
Closed
Priority:
Low
Assignee:
Target version:
Effort:
Difficulty:
Label:

Description

In looking into the size of Packet, I noticed that the TCP options are
stored as an array of MAX_OPTS, which is 40 to IPv4. Each Option
contains a pointer (8 bytes). It seems like it would be more efficient
to copy the options data into the structure rather than store a
pointer to the data.

It seems the array of opts serves 2 purposes:
1. store for easy O(1) retrieval
2. duplicate option checking

I agree it's wasting a lot of space, but it would probably be non-trivial to rewrite the parsers and the code that uses the info.

The stream engine uses some of the opts for example.

KS Updated by Ken Steele over 12 years ago Actions #1

  • Tracker changed from Bug to Optimization

VJ Updated by Victor Julien over 12 years ago Actions #2

  • Target version set to 3.0RC2

VJ Updated by Victor Julien about 11 years ago Actions #3

  • Target version changed from 3.0RC2 to 70

AH Updated by Andreas Herz over 10 years ago Actions #4

  • Assignee set to OISF Dev

VJ Updated by Victor Julien over 10 years ago Actions #5

  • Status changed from New to Assigned
  • Assignee changed from OISF Dev to Victor Julien

I have a branch in progress.

VJ Updated by Victor Julien about 10 years ago Actions #6

  • Status changed from Assigned to Closed
  • Target version changed from 70 to 3.1rc1
Actions

Also available in: PDF Atom