Project

General

Profile

Feature #1361

Add support for socket options TCP_KEEPCNT, TCP_KEEPIDLE, TCP_KEEPINTVL

Added by Vineeth Pillai over 8 years ago. Updated over 8 years ago.

Status:
Resolved
Priority:
Normal
Category:
kernel
Start date:
2011-08-29
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Difficulty:
Medium
Tags:
needs-triage

Description

Linux and couple of other Unix Flavors support 3 IPPROTO_TCP options which are not in solaris. Some opensource programs do not compile due to the absence of these options. They are:
TCP_KEEPIDLE :
the interval in seconds between the last data packet sent (simple ACKs are not considered data) and the first keepalive probe; after the connection is marked to need keepalive.

This is similar to TCP_KEEPALIVE_THRESHOLD in illumos, but TCP_KEEPALIVE_THRESHOLD is in milliseconds

TCP_KEEPCNT
the number of unacknowledged probes to send before considering the connection dead and notifying the application layer

TCP_KEEPINTVL
the interval in seconds between subsequential keepalive probes, regardless of what the connection has exchanged in the meantime

Illumos has an option TCP_KEEPALIVE_ABORT_THRESHOLD which is equal to TCP_KEEPCNT * TCP_KEEPINTVL, but expressed in milliseconds.

It would be good to have these three options in solaris as well so that opensource projects using these, can be compiled with out any modification.

Also, while at this, as per Garrett's suggestion we can have variants of these three with millisecond granularity(TCP_KEEPIDLE_MS, TCP_KEEPCNT_MS, TCP_KEEPINTVL_MS) for those needs which require millisecond granularity.


Subtasks

Bug #1426: 1361 missed two codepathsResolvedDan McDonald

Actions

History

#1

Updated by James Carlson over 8 years ago

Vineeth Pillai wrote:

Also, while at this, as per Garrett's suggestion we can have variants of these three with millisecond granularity(TCP_KEEPIDLE_MS, TCP_KEEPCNT_MS, TCP_KEEPINTVL_MS) for those needs which require millisecond granularity.

I don't see any other UNIX variant with those *_MS options. Unless there's a very clear use-case, I suggest leaving them out. They don't seem to add much in the way of value (either for the use of the keepalive feature itself or for interoperability), and they look too much like embrace-and-extend.

#2

Updated by Garrett D'Amore over 8 years ago

  • Status changed from New to Resolved
  • % Done changed from 0 to 100

changeset: 13435:3185061eadee
tag: tip
user: Garrett D'Amore <>
date: Wed Aug 17 16:31:10 2011 -0700
description:
1361 Add support for socket options TCP_KEEPCNT, TCP_KEEPIDLE, TCP_KEEPINTVL
Reviewed by: Pavan <>
Reviewed by: Dan McDonald <danmcd at nexenta.com>
Reviewed by: Garrett D'Amore <>
Approved by: Garrett D'Amore <>

Also available in: Atom PDF