tcp: Register handlers for extra TCP options

Allow additional TCP options to be handled by registered hook
functions.

Registered options have a priority that determines the order in which
options are prepared and written. Lower priority numbers are handled
first.

Option parsing will call the provided 'parse' function when a TCP option
number is not recognized by the normal option parsing code.

The 'prepare' function determines the required space for registered
options and store associated data. 'write' adds the option to the TCP
header.

A static key and RCU synchronization are used to minimize the
performance impact of these extensible TCP features.

Signed-off-by: Mat Martineau <mathew.j.martineau@linux.intel.com>
11 files changed