On Thu, Apr 18, 2013 at 09:06:49AM +0200, Jeroen Van den Keybus wrote:
> Original 3.5.7 with Adeos/i-pipe patch. x86 (32-bit).
> 
> I also tested the particular code snippet separately on 64-bit. Same
> result. Problem is that the result of a multplication of 32-bit numbers is
> also a 32-bit number before it is cast to u64 (uint64_t), causing the
> entire second fraction of ns to become 0.

The macro NSEC_PER_SEC is a long, as is tv_sec.

There is a helper function timespec_to_ns() in linux/time.h, and I
checked all of the other drivers. Most of them just do:

        ns = ts->tv_sec * 1000000000ULL;

So it is definitely a bug in e1000e, but I would fix it by using the
helper function. Please post the fix to the netdev list with [net:] in
the subject line.

Thanks,
Richard


------------------------------------------------------------------------------
Precog is a next-generation analytics platform capable of advanced
analytics on semi-structured data. The platform includes APIs for building
apps and a phenomenal toolset for data science. Developers can use
our toolset for easy data analysis & visualization. Get a free account!
http://www2.precog.com/precogplatform/slashdotnewsletter
_______________________________________________
E1000-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/e1000-devel
To learn more about Intel® Ethernet, visit 
http://communities.intel.com/community/wired

Reply via email to