2005-04-17 06:20:36 +08:00
|
|
|
/*
|
|
|
|
* Definitions for MIBs
|
|
|
|
*
|
|
|
|
* Author: Hideaki YOSHIFUJI <yoshfuji@linux-ipv6.org>
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _LINUX_SNMP_H
|
|
|
|
#define _LINUX_SNMP_H
|
|
|
|
|
|
|
|
/* ipstats mib definitions */
|
|
|
|
/*
|
|
|
|
* RFC 1213: MIB-II
|
|
|
|
* RFC 2011 (updates 1213): SNMPv2-MIB-IP
|
|
|
|
* RFC 2863: Interfaces Group MIB
|
|
|
|
* RFC 2465: IPv6 MIB: General Group
|
|
|
|
* draft-ietf-ipv6-rfc2011-update-10.txt: MIB for IP: IP Statistics Tables
|
|
|
|
*/
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
IPSTATS_MIB_NUM = 0,
|
2012-08-05 04:33:59 +08:00
|
|
|
/* frequently written fields in fast path, kept in same cache line */
|
2009-04-27 17:45:02 +08:00
|
|
|
IPSTATS_MIB_INPKTS, /* InReceives */
|
2012-08-05 04:33:59 +08:00
|
|
|
IPSTATS_MIB_INOCTETS, /* InOctets */
|
|
|
|
IPSTATS_MIB_INDELIVERS, /* InDelivers */
|
|
|
|
IPSTATS_MIB_OUTFORWDATAGRAMS, /* OutForwDatagrams */
|
|
|
|
IPSTATS_MIB_OUTPKTS, /* OutRequests */
|
|
|
|
IPSTATS_MIB_OUTOCTETS, /* OutOctets */
|
|
|
|
/* other fields */
|
2005-04-17 06:20:36 +08:00
|
|
|
IPSTATS_MIB_INHDRERRORS, /* InHdrErrors */
|
|
|
|
IPSTATS_MIB_INTOOBIGERRORS, /* InTooBigErrors */
|
|
|
|
IPSTATS_MIB_INNOROUTES, /* InNoRoutes */
|
|
|
|
IPSTATS_MIB_INADDRERRORS, /* InAddrErrors */
|
|
|
|
IPSTATS_MIB_INUNKNOWNPROTOS, /* InUnknownProtos */
|
|
|
|
IPSTATS_MIB_INTRUNCATEDPKTS, /* InTruncatedPkts */
|
|
|
|
IPSTATS_MIB_INDISCARDS, /* InDiscards */
|
|
|
|
IPSTATS_MIB_OUTDISCARDS, /* OutDiscards */
|
|
|
|
IPSTATS_MIB_OUTNOROUTES, /* OutNoRoutes */
|
|
|
|
IPSTATS_MIB_REASMTIMEOUT, /* ReasmTimeout */
|
|
|
|
IPSTATS_MIB_REASMREQDS, /* ReasmReqds */
|
|
|
|
IPSTATS_MIB_REASMOKS, /* ReasmOKs */
|
|
|
|
IPSTATS_MIB_REASMFAILS, /* ReasmFails */
|
|
|
|
IPSTATS_MIB_FRAGOKS, /* FragOKs */
|
|
|
|
IPSTATS_MIB_FRAGFAILS, /* FragFails */
|
|
|
|
IPSTATS_MIB_FRAGCREATES, /* FragCreates */
|
|
|
|
IPSTATS_MIB_INMCASTPKTS, /* InMcastPkts */
|
|
|
|
IPSTATS_MIB_OUTMCASTPKTS, /* OutMcastPkts */
|
2007-04-30 15:45:02 +08:00
|
|
|
IPSTATS_MIB_INBCASTPKTS, /* InBcastPkts */
|
|
|
|
IPSTATS_MIB_OUTBCASTPKTS, /* OutBcastPkts */
|
2009-04-27 17:45:02 +08:00
|
|
|
IPSTATS_MIB_INMCASTOCTETS, /* InMcastOctets */
|
|
|
|
IPSTATS_MIB_OUTMCASTOCTETS, /* OutMcastOctets */
|
|
|
|
IPSTATS_MIB_INBCASTOCTETS, /* InBcastOctets */
|
|
|
|
IPSTATS_MIB_OUTBCASTOCTETS, /* OutBcastOctets */
|
2013-04-29 16:39:56 +08:00
|
|
|
IPSTATS_MIB_CSUMERRORS, /* InCsumErrors */
|
2013-08-06 18:32:11 +08:00
|
|
|
IPSTATS_MIB_NOECTPKTS, /* InNoECTPkts */
|
|
|
|
IPSTATS_MIB_ECT1PKTS, /* InECT1Pkts */
|
|
|
|
IPSTATS_MIB_ECT0PKTS, /* InECT0Pkts */
|
|
|
|
IPSTATS_MIB_CEPKTS, /* InCEPkts */
|
2005-04-17 06:20:36 +08:00
|
|
|
__IPSTATS_MIB_MAX
|
|
|
|
};
|
|
|
|
|
|
|
|
/* icmp mib definitions */
|
|
|
|
/*
|
|
|
|
* RFC 1213: MIB-II ICMP Group
|
|
|
|
* RFC 2011 (updates 1213): SNMPv2 MIB for IP: ICMP group
|
|
|
|
*/
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
ICMP_MIB_NUM = 0,
|
|
|
|
ICMP_MIB_INMSGS, /* InMsgs */
|
|
|
|
ICMP_MIB_INERRORS, /* InErrors */
|
|
|
|
ICMP_MIB_INDESTUNREACHS, /* InDestUnreachs */
|
|
|
|
ICMP_MIB_INTIMEEXCDS, /* InTimeExcds */
|
|
|
|
ICMP_MIB_INPARMPROBS, /* InParmProbs */
|
|
|
|
ICMP_MIB_INSRCQUENCHS, /* InSrcQuenchs */
|
|
|
|
ICMP_MIB_INREDIRECTS, /* InRedirects */
|
|
|
|
ICMP_MIB_INECHOS, /* InEchos */
|
|
|
|
ICMP_MIB_INECHOREPS, /* InEchoReps */
|
|
|
|
ICMP_MIB_INTIMESTAMPS, /* InTimestamps */
|
|
|
|
ICMP_MIB_INTIMESTAMPREPS, /* InTimestampReps */
|
|
|
|
ICMP_MIB_INADDRMASKS, /* InAddrMasks */
|
|
|
|
ICMP_MIB_INADDRMASKREPS, /* InAddrMaskReps */
|
|
|
|
ICMP_MIB_OUTMSGS, /* OutMsgs */
|
|
|
|
ICMP_MIB_OUTERRORS, /* OutErrors */
|
|
|
|
ICMP_MIB_OUTDESTUNREACHS, /* OutDestUnreachs */
|
|
|
|
ICMP_MIB_OUTTIMEEXCDS, /* OutTimeExcds */
|
|
|
|
ICMP_MIB_OUTPARMPROBS, /* OutParmProbs */
|
|
|
|
ICMP_MIB_OUTSRCQUENCHS, /* OutSrcQuenchs */
|
|
|
|
ICMP_MIB_OUTREDIRECTS, /* OutRedirects */
|
|
|
|
ICMP_MIB_OUTECHOS, /* OutEchos */
|
|
|
|
ICMP_MIB_OUTECHOREPS, /* OutEchoReps */
|
|
|
|
ICMP_MIB_OUTTIMESTAMPS, /* OutTimestamps */
|
|
|
|
ICMP_MIB_OUTTIMESTAMPREPS, /* OutTimestampReps */
|
|
|
|
ICMP_MIB_OUTADDRMASKS, /* OutAddrMasks */
|
|
|
|
ICMP_MIB_OUTADDRMASKREPS, /* OutAddrMaskReps */
|
2013-04-29 16:39:56 +08:00
|
|
|
ICMP_MIB_CSUMERRORS, /* InCsumErrors */
|
2005-04-17 06:20:36 +08:00
|
|
|
__ICMP_MIB_MAX
|
|
|
|
};
|
|
|
|
|
2007-09-18 00:57:33 +08:00
|
|
|
#define __ICMPMSG_MIB_MAX 512 /* Out+In for all 8-bit ICMP types */
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
/* icmp6 mib definitions */
|
|
|
|
/*
|
|
|
|
* RFC 2466: ICMPv6-MIB
|
|
|
|
*/
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
ICMP6_MIB_NUM = 0,
|
|
|
|
ICMP6_MIB_INMSGS, /* InMsgs */
|
|
|
|
ICMP6_MIB_INERRORS, /* InErrors */
|
|
|
|
ICMP6_MIB_OUTMSGS, /* OutMsgs */
|
2010-04-04 06:09:04 +08:00
|
|
|
ICMP6_MIB_OUTERRORS, /* OutErrors */
|
2013-04-29 16:39:56 +08:00
|
|
|
ICMP6_MIB_CSUMERRORS, /* InCsumErrors */
|
2005-04-17 06:20:36 +08:00
|
|
|
__ICMP6_MIB_MAX
|
|
|
|
};
|
|
|
|
|
2007-09-17 07:52:35 +08:00
|
|
|
#define __ICMP6MSG_MIB_MAX 512 /* Out+In for all 8-bit ICMPv6 types */
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
/* tcp mib definitions */
|
|
|
|
/*
|
|
|
|
* RFC 1213: MIB-II TCP group
|
|
|
|
* RFC 2012 (updates 1213): SNMPv2-MIB-TCP
|
|
|
|
*/
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
TCP_MIB_NUM = 0,
|
|
|
|
TCP_MIB_RTOALGORITHM, /* RtoAlgorithm */
|
|
|
|
TCP_MIB_RTOMIN, /* RtoMin */
|
|
|
|
TCP_MIB_RTOMAX, /* RtoMax */
|
|
|
|
TCP_MIB_MAXCONN, /* MaxConn */
|
|
|
|
TCP_MIB_ACTIVEOPENS, /* ActiveOpens */
|
|
|
|
TCP_MIB_PASSIVEOPENS, /* PassiveOpens */
|
|
|
|
TCP_MIB_ATTEMPTFAILS, /* AttemptFails */
|
|
|
|
TCP_MIB_ESTABRESETS, /* EstabResets */
|
|
|
|
TCP_MIB_CURRESTAB, /* CurrEstab */
|
|
|
|
TCP_MIB_INSEGS, /* InSegs */
|
|
|
|
TCP_MIB_OUTSEGS, /* OutSegs */
|
|
|
|
TCP_MIB_RETRANSSEGS, /* RetransSegs */
|
|
|
|
TCP_MIB_INERRS, /* InErrs */
|
|
|
|
TCP_MIB_OUTRSTS, /* OutRsts */
|
2013-04-29 16:39:56 +08:00
|
|
|
TCP_MIB_CSUMERRORS, /* InCsumErrors */
|
2005-04-17 06:20:36 +08:00
|
|
|
__TCP_MIB_MAX
|
|
|
|
};
|
|
|
|
|
|
|
|
/* udp mib definitions */
|
|
|
|
/*
|
|
|
|
* RFC 1213: MIB-II UDP group
|
|
|
|
* RFC 2013 (updates 1213): SNMPv2-MIB-UDP
|
|
|
|
*/
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
UDP_MIB_NUM = 0,
|
|
|
|
UDP_MIB_INDATAGRAMS, /* InDatagrams */
|
|
|
|
UDP_MIB_NOPORTS, /* NoPorts */
|
|
|
|
UDP_MIB_INERRORS, /* InErrors */
|
|
|
|
UDP_MIB_OUTDATAGRAMS, /* OutDatagrams */
|
2006-08-15 14:57:10 +08:00
|
|
|
UDP_MIB_RCVBUFERRORS, /* RcvbufErrors */
|
|
|
|
UDP_MIB_SNDBUFERRORS, /* SndbufErrors */
|
2013-04-29 16:39:56 +08:00
|
|
|
UDP_MIB_CSUMERRORS, /* InCsumErrors */
|
2005-04-17 06:20:36 +08:00
|
|
|
__UDP_MIB_MAX
|
|
|
|
};
|
|
|
|
|
|
|
|
/* linux mib definitions */
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
LINUX_MIB_NUM = 0,
|
|
|
|
LINUX_MIB_SYNCOOKIESSENT, /* SyncookiesSent */
|
|
|
|
LINUX_MIB_SYNCOOKIESRECV, /* SyncookiesRecv */
|
|
|
|
LINUX_MIB_SYNCOOKIESFAILED, /* SyncookiesFailed */
|
|
|
|
LINUX_MIB_EMBRYONICRSTS, /* EmbryonicRsts */
|
|
|
|
LINUX_MIB_PRUNECALLED, /* PruneCalled */
|
|
|
|
LINUX_MIB_RCVPRUNED, /* RcvPruned */
|
|
|
|
LINUX_MIB_OFOPRUNED, /* OfoPruned */
|
|
|
|
LINUX_MIB_OUTOFWINDOWICMPS, /* OutOfWindowIcmps */
|
|
|
|
LINUX_MIB_LOCKDROPPEDICMPS, /* LockDroppedIcmps */
|
|
|
|
LINUX_MIB_ARPFILTER, /* ArpFilter */
|
|
|
|
LINUX_MIB_TIMEWAITED, /* TimeWaited */
|
|
|
|
LINUX_MIB_TIMEWAITRECYCLED, /* TimeWaitRecycled */
|
|
|
|
LINUX_MIB_TIMEWAITKILLED, /* TimeWaitKilled */
|
|
|
|
LINUX_MIB_PAWSPASSIVEREJECTED, /* PAWSPassiveRejected */
|
|
|
|
LINUX_MIB_PAWSACTIVEREJECTED, /* PAWSActiveRejected */
|
|
|
|
LINUX_MIB_PAWSESTABREJECTED, /* PAWSEstabRejected */
|
|
|
|
LINUX_MIB_DELAYEDACKS, /* DelayedACKs */
|
|
|
|
LINUX_MIB_DELAYEDACKLOCKED, /* DelayedACKLocked */
|
|
|
|
LINUX_MIB_DELAYEDACKLOST, /* DelayedACKLost */
|
|
|
|
LINUX_MIB_LISTENOVERFLOWS, /* ListenOverflows */
|
|
|
|
LINUX_MIB_LISTENDROPS, /* ListenDrops */
|
|
|
|
LINUX_MIB_TCPPREQUEUED, /* TCPPrequeued */
|
|
|
|
LINUX_MIB_TCPDIRECTCOPYFROMBACKLOG, /* TCPDirectCopyFromBacklog */
|
|
|
|
LINUX_MIB_TCPDIRECTCOPYFROMPREQUEUE, /* TCPDirectCopyFromPrequeue */
|
|
|
|
LINUX_MIB_TCPPREQUEUEDROPPED, /* TCPPrequeueDropped */
|
|
|
|
LINUX_MIB_TCPHPHITS, /* TCPHPHits */
|
|
|
|
LINUX_MIB_TCPHPHITSTOUSER, /* TCPHPHitsToUser */
|
|
|
|
LINUX_MIB_TCPPUREACKS, /* TCPPureAcks */
|
|
|
|
LINUX_MIB_TCPHPACKS, /* TCPHPAcks */
|
|
|
|
LINUX_MIB_TCPRENORECOVERY, /* TCPRenoRecovery */
|
|
|
|
LINUX_MIB_TCPSACKRECOVERY, /* TCPSackRecovery */
|
|
|
|
LINUX_MIB_TCPSACKRENEGING, /* TCPSACKReneging */
|
|
|
|
LINUX_MIB_TCPFACKREORDER, /* TCPFACKReorder */
|
|
|
|
LINUX_MIB_TCPSACKREORDER, /* TCPSACKReorder */
|
|
|
|
LINUX_MIB_TCPRENOREORDER, /* TCPRenoReorder */
|
|
|
|
LINUX_MIB_TCPTSREORDER, /* TCPTSReorder */
|
|
|
|
LINUX_MIB_TCPFULLUNDO, /* TCPFullUndo */
|
|
|
|
LINUX_MIB_TCPPARTIALUNDO, /* TCPPartialUndo */
|
|
|
|
LINUX_MIB_TCPDSACKUNDO, /* TCPDSACKUndo */
|
|
|
|
LINUX_MIB_TCPLOSSUNDO, /* TCPLossUndo */
|
|
|
|
LINUX_MIB_TCPLOSTRETRANSMIT, /* TCPLostRetransmit */
|
|
|
|
LINUX_MIB_TCPRENOFAILURES, /* TCPRenoFailures */
|
|
|
|
LINUX_MIB_TCPSACKFAILURES, /* TCPSackFailures */
|
|
|
|
LINUX_MIB_TCPLOSSFAILURES, /* TCPLossFailures */
|
|
|
|
LINUX_MIB_TCPFASTRETRANS, /* TCPFastRetrans */
|
|
|
|
LINUX_MIB_TCPFORWARDRETRANS, /* TCPForwardRetrans */
|
|
|
|
LINUX_MIB_TCPSLOWSTARTRETRANS, /* TCPSlowStartRetrans */
|
|
|
|
LINUX_MIB_TCPTIMEOUTS, /* TCPTimeouts */
|
tcp: Tail loss probe (TLP)
This patch series implement the Tail loss probe (TLP) algorithm described
in http://tools.ietf.org/html/draft-dukkipati-tcpm-tcp-loss-probe-01. The
first patch implements the basic algorithm.
TLP's goal is to reduce tail latency of short transactions. It achieves
this by converting retransmission timeouts (RTOs) occuring due
to tail losses (losses at end of transactions) into fast recovery.
TLP transmits one packet in two round-trips when a connection is in
Open state and isn't receiving any ACKs. The transmitted packet, aka
loss probe, can be either new or a retransmission. When there is tail
loss, the ACK from a loss probe triggers FACK/early-retransmit based
fast recovery, thus avoiding a costly RTO. In the absence of loss,
there is no change in the connection state.
PTO stands for probe timeout. It is a timer event indicating
that an ACK is overdue and triggers a loss probe packet. The PTO value
is set to max(2*SRTT, 10ms) and is adjusted to account for delayed
ACK timer when there is only one oustanding packet.
TLP Algorithm
On transmission of new data in Open state:
-> packets_out > 1: schedule PTO in max(2*SRTT, 10ms).
-> packets_out == 1: schedule PTO in max(2*RTT, 1.5*RTT + 200ms)
-> PTO = min(PTO, RTO)
Conditions for scheduling PTO:
-> Connection is in Open state.
-> Connection is either cwnd limited or no new data to send.
-> Number of probes per tail loss episode is limited to one.
-> Connection is SACK enabled.
When PTO fires:
new_segment_exists:
-> transmit new segment.
-> packets_out++. cwnd remains same.
no_new_packet:
-> retransmit the last segment.
Its ACK triggers FACK or early retransmit based recovery.
ACK path:
-> rearm RTO at start of ACK processing.
-> reschedule PTO if need be.
In addition, the patch includes a small variation to the Early Retransmit
(ER) algorithm, such that ER and TLP together can in principle recover any
N-degree of tail loss through fast recovery. TLP is controlled by the same
sysctl as ER, tcp_early_retrans sysctl.
tcp_early_retrans==0; disables TLP and ER.
==1; enables RFC5827 ER.
==2; delayed ER.
==3; TLP and delayed ER. [DEFAULT]
==4; TLP only.
The TLP patch series have been extensively tested on Google Web servers.
It is most effective for short Web trasactions, where it reduced RTOs by 15%
and improved HTTP response time (average by 6%, 99th percentile by 10%).
The transmitted probes account for <0.5% of the overall transmissions.
Signed-off-by: Nandita Dukkipati <nanditad@google.com>
Acked-by: Neal Cardwell <ncardwell@google.com>
Acked-by: Yuchung Cheng <ycheng@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-03-11 18:00:43 +08:00
|
|
|
LINUX_MIB_TCPLOSSPROBES, /* TCPLossProbes */
|
2013-03-11 18:00:44 +08:00
|
|
|
LINUX_MIB_TCPLOSSPROBERECOVERY, /* TCPLossProbeRecovery */
|
2005-04-17 06:20:36 +08:00
|
|
|
LINUX_MIB_TCPRENORECOVERYFAIL, /* TCPRenoRecoveryFail */
|
|
|
|
LINUX_MIB_TCPSACKRECOVERYFAIL, /* TCPSackRecoveryFail */
|
|
|
|
LINUX_MIB_TCPSCHEDULERFAILED, /* TCPSchedulerFailed */
|
|
|
|
LINUX_MIB_TCPRCVCOLLAPSED, /* TCPRcvCollapsed */
|
|
|
|
LINUX_MIB_TCPDSACKOLDSENT, /* TCPDSACKOldSent */
|
|
|
|
LINUX_MIB_TCPDSACKOFOSENT, /* TCPDSACKOfoSent */
|
|
|
|
LINUX_MIB_TCPDSACKRECV, /* TCPDSACKRecv */
|
|
|
|
LINUX_MIB_TCPDSACKOFORECV, /* TCPDSACKOfoRecv */
|
|
|
|
LINUX_MIB_TCPABORTONDATA, /* TCPAbortOnData */
|
|
|
|
LINUX_MIB_TCPABORTONCLOSE, /* TCPAbortOnClose */
|
|
|
|
LINUX_MIB_TCPABORTONMEMORY, /* TCPAbortOnMemory */
|
|
|
|
LINUX_MIB_TCPABORTONTIMEOUT, /* TCPAbortOnTimeout */
|
|
|
|
LINUX_MIB_TCPABORTONLINGER, /* TCPAbortOnLinger */
|
|
|
|
LINUX_MIB_TCPABORTFAILED, /* TCPAbortFailed */
|
|
|
|
LINUX_MIB_TCPMEMORYPRESSURES, /* TCPMemoryPressures */
|
2007-08-25 13:55:52 +08:00
|
|
|
LINUX_MIB_TCPSACKDISCARD, /* TCPSACKDiscard */
|
|
|
|
LINUX_MIB_TCPDSACKIGNOREDOLD, /* TCPSACKIgnoredOld */
|
|
|
|
LINUX_MIB_TCPDSACKIGNOREDNOUNDO, /* TCPSACKIgnoredNoUndo */
|
2007-09-26 13:47:31 +08:00
|
|
|
LINUX_MIB_TCPSPURIOUSRTOS, /* TCPSpuriousRTOs */
|
2008-07-30 18:03:15 +08:00
|
|
|
LINUX_MIB_TCPMD5NOTFOUND, /* TCPMD5NotFound */
|
|
|
|
LINUX_MIB_TCPMD5UNEXPECTED, /* TCPMD5Unexpected */
|
2008-11-25 13:27:22 +08:00
|
|
|
LINUX_MIB_SACKSHIFTED,
|
|
|
|
LINUX_MIB_SACKMERGED,
|
|
|
|
LINUX_MIB_SACKSHIFTFALLBACK,
|
2010-03-08 07:21:57 +08:00
|
|
|
LINUX_MIB_TCPBACKLOGDROP,
|
|
|
|
LINUX_MIB_TCPMINTTLDROP, /* RFC 5082 */
|
2010-03-19 13:37:18 +08:00
|
|
|
LINUX_MIB_TCPDEFERACCEPTDROP,
|
2010-06-02 20:05:27 +08:00
|
|
|
LINUX_MIB_IPRPFILTER, /* IP Reverse Path Filter (rp_filter) */
|
2010-12-09 04:16:33 +08:00
|
|
|
LINUX_MIB_TCPTIMEWAITOVERFLOW, /* TCPTimeWaitOverflow */
|
2011-08-30 11:21:44 +08:00
|
|
|
LINUX_MIB_TCPREQQFULLDOCOOKIES, /* TCPReqQFullDoCookies */
|
|
|
|
LINUX_MIB_TCPREQQFULLDROP, /* TCPReqQFullDrop */
|
2012-01-25 12:44:20 +08:00
|
|
|
LINUX_MIB_TCPRETRANSFAIL, /* TCPRetransFail */
|
2012-07-16 09:41:36 +08:00
|
|
|
LINUX_MIB_TCPRCVCOALESCE, /* TCPRcvCoalesce */
|
|
|
|
LINUX_MIB_TCPOFOQUEUE, /* TCPOFOQueue */
|
|
|
|
LINUX_MIB_TCPOFODROP, /* TCPOFODrop */
|
|
|
|
LINUX_MIB_TCPOFOMERGE, /* TCPOFOMerge */
|
2012-07-17 16:13:05 +08:00
|
|
|
LINUX_MIB_TCPCHALLENGEACK, /* TCPChallengeACK */
|
2012-07-17 09:41:30 +08:00
|
|
|
LINUX_MIB_TCPSYNCHALLENGE, /* TCPSYNChallenge */
|
2012-07-19 14:43:07 +08:00
|
|
|
LINUX_MIB_TCPFASTOPENACTIVE, /* TCPFastOpenActive */
|
2012-08-31 20:29:11 +08:00
|
|
|
LINUX_MIB_TCPFASTOPENPASSIVE, /* TCPFastOpenPassive*/
|
|
|
|
LINUX_MIB_TCPFASTOPENPASSIVEFAIL, /* TCPFastOpenPassiveFail */
|
|
|
|
LINUX_MIB_TCPFASTOPENLISTENOVERFLOW, /* TCPFastOpenListenOverflow */
|
|
|
|
LINUX_MIB_TCPFASTOPENCOOKIEREQD, /* TCPFastOpenCookieReqd */
|
2013-04-18 14:52:51 +08:00
|
|
|
LINUX_MIB_TCPSPURIOUS_RTX_HOSTQUEUES, /* TCPSpuriousRtxHostQueues */
|
2013-08-07 16:33:25 +08:00
|
|
|
LINUX_MIB_BUSYPOLLRXPACKETS, /* BusyPollRxPackets */
|
tcp: auto corking
With the introduction of TCP Small Queues, TSO auto sizing, and TCP
pacing, we can implement Automatic Corking in the kernel, to help
applications doing small write()/sendmsg() to TCP sockets.
Idea is to change tcp_push() to check if the current skb payload is
under skb optimal size (a multiple of MSS bytes)
If under 'size_goal', and at least one packet is still in Qdisc or
NIC TX queues, set the TCP Small Queue Throttled bit, so that the push
will be delayed up to TX completion time.
This delay might allow the application to coalesce more bytes
in the skb in following write()/sendmsg()/sendfile() system calls.
The exact duration of the delay is depending on the dynamics
of the system, and might be zero if no packet for this flow
is actually held in Qdisc or NIC TX ring.
Using FQ/pacing is a way to increase the probability of
autocorking being triggered.
Add a new sysctl (/proc/sys/net/ipv4/tcp_autocorking) to control
this feature and default it to 1 (enabled)
Add a new SNMP counter : nstat -a | grep TcpExtTCPAutoCorking
This counter is incremented every time we detected skb was under used
and its flush was deferred.
Tested:
Interesting effects when using line buffered commands under ssh.
Excellent performance results in term of cpu usage and total throughput.
lpq83:~# echo 1 >/proc/sys/net/ipv4/tcp_autocorking
lpq83:~# perf stat ./super_netperf 4 -t TCP_STREAM -H lpq84 -- -m 128
9410.39
Performance counter stats for './super_netperf 4 -t TCP_STREAM -H lpq84 -- -m 128':
35209.439626 task-clock # 2.901 CPUs utilized
2,294 context-switches # 0.065 K/sec
101 CPU-migrations # 0.003 K/sec
4,079 page-faults # 0.116 K/sec
97,923,241,298 cycles # 2.781 GHz [83.31%]
51,832,908,236 stalled-cycles-frontend # 52.93% frontend cycles idle [83.30%]
25,697,986,603 stalled-cycles-backend # 26.24% backend cycles idle [66.70%]
102,225,978,536 instructions # 1.04 insns per cycle
# 0.51 stalled cycles per insn [83.38%]
18,657,696,819 branches # 529.906 M/sec [83.29%]
91,679,646 branch-misses # 0.49% of all branches [83.40%]
12.136204899 seconds time elapsed
lpq83:~# echo 0 >/proc/sys/net/ipv4/tcp_autocorking
lpq83:~# perf stat ./super_netperf 4 -t TCP_STREAM -H lpq84 -- -m 128
6624.89
Performance counter stats for './super_netperf 4 -t TCP_STREAM -H lpq84 -- -m 128':
40045.864494 task-clock # 3.301 CPUs utilized
171 context-switches # 0.004 K/sec
53 CPU-migrations # 0.001 K/sec
4,080 page-faults # 0.102 K/sec
111,340,458,645 cycles # 2.780 GHz [83.34%]
61,778,039,277 stalled-cycles-frontend # 55.49% frontend cycles idle [83.31%]
29,295,522,759 stalled-cycles-backend # 26.31% backend cycles idle [66.67%]
108,654,349,355 instructions # 0.98 insns per cycle
# 0.57 stalled cycles per insn [83.34%]
19,552,170,748 branches # 488.244 M/sec [83.34%]
157,875,417 branch-misses # 0.81% of all branches [83.34%]
12.130267788 seconds time elapsed
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2013-12-06 14:36:05 +08:00
|
|
|
LINUX_MIB_TCPAUTOCORKING, /* TCPAutoCorking */
|
2005-04-17 06:20:36 +08:00
|
|
|
__LINUX_MIB_MAX
|
|
|
|
};
|
|
|
|
|
2007-12-21 12:42:57 +08:00
|
|
|
/* linux Xfrm mib definitions */
|
|
|
|
enum
|
|
|
|
{
|
|
|
|
LINUX_MIB_XFRMNUM = 0,
|
|
|
|
LINUX_MIB_XFRMINERROR, /* XfrmInError */
|
|
|
|
LINUX_MIB_XFRMINBUFFERERROR, /* XfrmInBufferError */
|
|
|
|
LINUX_MIB_XFRMINHDRERROR, /* XfrmInHdrError */
|
|
|
|
LINUX_MIB_XFRMINNOSTATES, /* XfrmInNoStates */
|
|
|
|
LINUX_MIB_XFRMINSTATEPROTOERROR, /* XfrmInStateProtoError */
|
|
|
|
LINUX_MIB_XFRMINSTATEMODEERROR, /* XfrmInStateModeError */
|
2008-02-01 09:14:58 +08:00
|
|
|
LINUX_MIB_XFRMINSTATESEQERROR, /* XfrmInStateSeqError */
|
2007-12-21 12:42:57 +08:00
|
|
|
LINUX_MIB_XFRMINSTATEEXPIRED, /* XfrmInStateExpired */
|
|
|
|
LINUX_MIB_XFRMINSTATEMISMATCH, /* XfrmInStateMismatch */
|
|
|
|
LINUX_MIB_XFRMINSTATEINVALID, /* XfrmInStateInvalid */
|
|
|
|
LINUX_MIB_XFRMINTMPLMISMATCH, /* XfrmInTmplMismatch */
|
|
|
|
LINUX_MIB_XFRMINNOPOLS, /* XfrmInNoPols */
|
|
|
|
LINUX_MIB_XFRMINPOLBLOCK, /* XfrmInPolBlock */
|
|
|
|
LINUX_MIB_XFRMINPOLERROR, /* XfrmInPolError */
|
|
|
|
LINUX_MIB_XFRMOUTERROR, /* XfrmOutError */
|
|
|
|
LINUX_MIB_XFRMOUTBUNDLEGENERROR, /* XfrmOutBundleGenError */
|
|
|
|
LINUX_MIB_XFRMOUTBUNDLECHECKERROR, /* XfrmOutBundleCheckError */
|
|
|
|
LINUX_MIB_XFRMOUTNOSTATES, /* XfrmOutNoStates */
|
|
|
|
LINUX_MIB_XFRMOUTSTATEPROTOERROR, /* XfrmOutStateProtoError */
|
|
|
|
LINUX_MIB_XFRMOUTSTATEMODEERROR, /* XfrmOutStateModeError */
|
2008-02-01 09:14:58 +08:00
|
|
|
LINUX_MIB_XFRMOUTSTATESEQERROR, /* XfrmOutStateSeqError */
|
2007-12-21 12:42:57 +08:00
|
|
|
LINUX_MIB_XFRMOUTSTATEEXPIRED, /* XfrmOutStateExpired */
|
|
|
|
LINUX_MIB_XFRMOUTPOLBLOCK, /* XfrmOutPolBlock */
|
|
|
|
LINUX_MIB_XFRMOUTPOLDEAD, /* XfrmOutPolDead */
|
|
|
|
LINUX_MIB_XFRMOUTPOLERROR, /* XfrmOutPolError */
|
2010-02-18 11:35:07 +08:00
|
|
|
LINUX_MIB_XFRMFWDHDRERROR, /* XfrmFwdHdrError*/
|
2012-12-28 16:06:28 +08:00
|
|
|
LINUX_MIB_XFRMOUTSTATEINVALID, /* XfrmOutStateInvalid */
|
2013-06-06 10:15:54 +08:00
|
|
|
LINUX_MIB_XFRMACQUIREERROR, /* XfrmAcquireError */
|
2007-12-21 12:42:57 +08:00
|
|
|
__LINUX_MIB_XFRMMAX
|
|
|
|
};
|
|
|
|
|
2005-04-17 06:20:36 +08:00
|
|
|
#endif /* _LINUX_SNMP_H */
|