On Fri, Aug 18, 2006 at 08:43:08AM +0300, John Que ([EMAIL PROTECTED]) wrote: > Following your answer I tried adding a call to net_enable_timestamp() in > a module I wrote which use NF_HOOKS. > This is what is done , for example, in ipq_rcv_skb(struct sk_buff *skb) > in linux-2.6.14 in net/ipv4/netfilter/ip_queue.c. > > After doing so I get timestamps which are not 0. > > what I wonder now is : > 1) does this have ANY performance implication (when dealing with a > high network load which can get to 50,000 packets per second?
Yes, it has. do_gettimeofday() is quite slow on some processors and is not SMP-friendly. > 2) It does work as I said, but I want to be cautios: Am I permitted to > add this method ? are there any implications for adding this method > which can create troubles ? > I must say that I am NOT changing anywhere the timestamp; it's only > for statistics. If you add ata least on socket with SO_TIMESTAMP option, it will enable timestamps for all skbs, so you have not created any wrong thing, except that slowed down your network processing. > Regards, > John -- Evgeniy Polyakov - To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html