From: Wei Yongjun <yjwei@nanjing-fnst.com>
To: netdev@vger.kernel.org
Subject: [PATCH] SNMPv2 tcpOutSegs counter error
Date: Thu, 06 Jul 2006 04:01:18 -0400 [thread overview]
Message-ID: <1152172878.4695.2.camel@LINE> (raw)
RFC2012 saied that tcpOutSegs should excluding those containing only
retransmitted octets. But in my test, linux kernel increased the
tcpOutSegs even if only retransmitted octets is send out.
So I think this is a bug of kernel.
Refer to RFC2012, tcpOutSegs is defined as following:
tcpOutSegs OBJECT-TYPE
SYNTAX Counter32
MAX-ACCESS read-only
STATUS current
DESCRIPTION
"The total number of segments sent, including those on
current connections but excluding those containing only
retransmitted octets."
::= { tcp 11 }
Following is my patch:
--- a/net/ipv4/tcp_output.c 2006-06-30 13:37:38.000000000 -0400
+++ b/net/ipv4/tcp_output.c 2006-07-05 04:49:56.000000000 -0400
@@ -462,7 +462,8 @@ static int tcp_transmit_skb(struct sock
if (skb->len != tcp_header_size)
tcp_event_data_sent(tp, skb, sk);
- TCP_INC_STATS(TCP_MIB_OUTSEGS);
+ if (!(tcb->sacked & TCPCB_LOST))
+ TCP_INC_STATS(TCP_MIB_OUTSEGS);
err = icsk->icsk_af_ops->queue_xmit(skb, 0);
if (likely(err <= 0))
Signed-off-by: Wei Yongjun <yjwei@nanjing-fnst.com>
next reply other threads:[~2006-07-06 8:13 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-07-06 8:01 Wei Yongjun [this message]
2006-07-24 21:44 ` [PATCH] SNMPv2 tcpOutSegs counter error David Miller
-- strict thread matches above, loose matches on Subject: below --
2006-08-03 15:46 Wei Yongjun
2006-08-03 23:35 ` David Miller
2006-08-04 12:46 Wei Yongjun
2006-08-04 11:23 ` David Miller
2006-08-07 3:17 Wei Yongjun
2006-08-07 2:40 ` Herbert Xu
2006-08-07 2:44 ` David Miller
2006-08-07 2:48 ` Herbert Xu
2006-08-07 8:45 Wei Yongjun
2006-08-08 4:04 ` David Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1152172878.4695.2.camel@LINE \
--to=yjwei@nanjing-fnst.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.