Work well done, so oughtn't div64_64 to go in include/asm-generic/div64.h one day, to be available kernel wide, as do_div64_64
I see that net/core/pktgen.c is full of 64 bit division and maybe could benefit from this, and perhaps a version that does remainders too. Amin Patrick McHardy wrote: > Harald Welte wrote: > >> Just send two incremental patches to Dave. > > > Here they are. The first patch fixes the div64_64 function, the second > one renames some constants. > > > ------------------------------------------------------------------------ > > [NETFILTER]: Fix div64_64 in ipt_connbytes > > Signded-off-by: Patrick McHardy <[EMAIL PROTECTED]> > > --- > commit 62084bc1a04e2fbc492566fa30997bd0a7aa2d0a > tree 083c8042609e0da81f0be9e15583d5d31b54e685 > parent 68e734a5864ba568058c3b8ea63fac3d7d567542 > author Patrick McHardy <[EMAIL PROTECTED]> Sat, 13 Aug 2005 03:16:32 +0200 > committer Patrick McHardy <[EMAIL PROTECTED]> Sat, 13 Aug 2005 03:16:32 +0200 > > net/ipv4/netfilter/ipt_connbytes.c | 22 +++++++++------------- > 1 files changed, 9 insertions(+), 13 deletions(-) > > diff --git a/net/ipv4/netfilter/ipt_connbytes.c > b/net/ipv4/netfilter/ipt_connbytes.c > --- a/net/ipv4/netfilter/ipt_connbytes.c > +++ b/net/ipv4/netfilter/ipt_connbytes.c > @@ -22,23 +22,19 @@ MODULE_AUTHOR("Harald Welte <[EMAIL PROTECTED] > MODULE_DESCRIPTION("iptables match for matching number of pkts/bytes per > connection"); > > /* 64bit divisor, dividend and result. dynamic precision */ > -static u_int64_t div64_64(u_int64_t divisor, u_int64_t dividend) > +static u_int64_t div64_64(u_int64_t dividend, u_int64_t divisor) ... - 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