linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Johan Adolfsson" <johan.adolfsson@axis.com>
To: <linux-kernel@vger.kernel.org>
Subject: Missing use of TcpPassiveOpens counter?
Date: Mon, 12 Mar 2001 13:36:45 +0100	[thread overview]
Message-ID: <050a01c0aaf1$1984aea0$0a070d0a@axis.se> (raw)

While trying to track down a possible select()/accept()
problem in 2.0.38 I noticed that theTcpPassiveOpens counter
is never increased (not in 2.0, 2.2 nor 2.4)

When checking more of the Tcp: fields in
/proc/net/snmp
it looks like some more fields are not set correctly
(tcpRto*, tcpMaxConn )

Just overlooked and forgotten or does nobody care?
(or both:)

The following patch for 2.0 increases the TcpPassiveOpen counter,
the case where you have crossed SYN's is not handled,
but I don't think it should anyway?
At first I was tempted to put it in the tcp_accept() function,
but it should really be when we change state from 
LISTEN to SYN_RECVD.

diff -u -p -r1.7 tcp_input.c
--- tcp_input.c 2000/03/30 15:53:22     1.7
+++ tcp_input.c 2001/03/12 12:11:18
@@ -747,7 +747,9 @@ static void tcp_conn_request(struct sock
        newsk->dummy_th.source = skb->h.th->dest;
        newsk->dummy_th.dest = skb->h.th->source;
        newsk->users=0;
-
+
+      tcp_statistics.TcpPassiveOpens++; /* LISTEN to SYN_RECV */
+
 #ifdef CONFIG_IP_TRANSPARENT_PROXY
        /* 
         *      Deal with possibly redirected traffic by setting num to


In 2.4 I'm not sure where to put the
TCP_INC_STATS(TcpPassiveOpens); or
TCP_INC_STATS_BH(TcpPassiveOpens);

tcp_minisocks.c:tcp_create_openreq_child() ?


/Johan





                 reply	other threads:[~2001-03-12 12:41 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='050a01c0aaf1$1984aea0$0a070d0a@axis.se' \
    --to=johan.adolfsson@axis.com \
    --cc=linux-kernel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).