netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* net_disable_timestamp() needed when disable SO_TIMESTAMP?
@ 2008-03-06 15:55 Andrew Brampton
  0 siblings, 0 replies; only message in thread
From: Andrew Brampton @ 2008-03-06 15:55 UTC (permalink / raw)
  To: netdev

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 :) 


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2008-03-06 16:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-03-06 15:55 net_disable_timestamp() needed when disable SO_TIMESTAMP? Andrew Brampton

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).