All of lore.kernel.org
 help / color / mirror / Atom feed
From: Abhinav Gupta <kernelnetworkguy@hotpop.com>
To: netdev@oss.sgi.com, linux-net@vger.kernel.org
Subject: Quirky Behaviour while counting #tcp packets received.
Date: Tue, 23 Mar 2004 13:02:27 -0700	[thread overview]
Message-ID: <406097D3.10608@hotpop.com> (raw)

I am not sure if this is the correct mailing list for my question or 
not. If it isn't could someone please direct me to the correct one.

Here's what I am doing and the problem emanating from it:
I wanted to keep a track of tcp packets received from the network, so I 
started keeping a count of that by incrementing pkts_recv variable in 
the function tcp_recv_established in usr/src/linux/net/ipv4/tcp_input.c 
, everytime I receive a packet. The structure(tcp_opt) that contains 
pkts_recv variable is defined in usr/src/linux/include/net/sock.h.

The problem that I am facing is that this count(pkts_recv) increments by 
one each time I receive a tcp packet, but then something goes wrong and 
the next time it receives a packet it(pkts_recv) increments by some 
random quantity (like 36,3, 55 ...). But after this incrementation by 
the random value, the next time it receives a packet it increments by 1 
again (instead of the random value)! And there are several instances 
where the incrementation takes place by the random quantity (3-7 times 
when 1000 packets are received). I have checked in the source and the 
only place I am incrementing the count is in tcp_recv_established function.

Does anyone have views on this quirky behavior?

Any help would be greatly appreciated.

Thanks,
Abhinav.


                 reply	other threads:[~2004-03-23 20:02 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=406097D3.10608@hotpop.com \
    --to=kernelnetworkguy@hotpop.com \
    --cc=linux-net@vger.kernel.org \
    --cc=netdev@oss.sgi.com \
    /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.