From: "Andrew Brampton" <andrew@bramp.freeserve.co.uk>
To: <netdev@vger.kernel.org>
Subject: net_disable_timestamp() needed when disable SO_TIMESTAMP?
Date: Thu, 6 Mar 2008 15:55:33 -0000 [thread overview]
Message-ID: <044f01c87fa2$844086f0$0a00a8c0@Andrew> (raw)
Hi,
I'm new to the linux kernel, but I was trying to understand how the kernel
records timestamps for each packets and this lead me to net/core/sock.c.
Now lines 610-624 (http://lxr.linux.no/linux/net/core/sock.c#L610 ) enable
and disable SO_TIMESTAMP, and when enabling sock_enable_timestamp(sk) is
called to enable time stamping on the socket. However
sock_disable_timestamp() isn't called if SO_TIMESTAMP is being disabled. I
was wondering if that was an over sight or done on purpose?
I see that sock_disable_timestamp() is eventually called when the socket is
freed. I thought it might not be disabled in sock.c if for example it was
enabled elsewhere, and it was unclear if it should be disabled or not?
Thanks for any clarity on this.
Andrew
P.S If it is a bug, I'm going to prepare my first kernel patch :)
reply other threads:[~2008-03-06 16:25 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='044f01c87fa2$844086f0$0a00a8c0@Andrew' \
--to=andrew@bramp.freeserve.co.uk \
--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 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).