login
Login
/
Register
Search
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
April
»
18
Re: [PATCH 5/5] tun: vringfd xmit support.
view
thread
!MAILaRCHIVE_VOTE_RePLACE
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
[view in full thread]
From:
pradeep singh rautela <rautelap@...>
To: Ray Lee <ray-lk@...>
Cc: Rusty Russell <rusty@...>, <netdev@...>, <linux-kernel@...>, Max Krasnyansky <maxk@...>, <virtualization@...>
Subject:
Re: [PATCH 5/5] tun: vringfd xmit support.
Date: Friday, April 18, 2008 - 2:01 pm
On Fri, Apr 18, 2008 at 7:55 PM, Ray Lee <ray-lk@madrabbit.org> wrote:
quoted text
> On Fri, Apr 18, 2008 at 4:46 AM, pradeep singh rautela > <rautelap@gmail.com> wrote: > > > > On Fri, Apr 18, 2008 at 10:13 AM, Rusty Russell <rusty@rustcorp.com.au> wrote: > > > > + /* How many pages will this take? */ > > > + npages = 1 + (base + len - 1)/PAGE_SIZE - base/PAGE_SIZE; > > > > Hi Rusty, > > A trivial suggestion, how about > > npages = 1+(len -1)/PAGE_SIZE ? > > That's not the same. In particular, his version accounts for the > fractional page at the beginning, while yours doesn't.
Oh thanks for correcting me Ray. :)
quoted text
> > While it's tempting to use algebra to simplify things, it's not safe > to do so when the expression involves division over the integers. The > only care-free integer math in a computer is subtraction and ++.
I stand corrected. Sorry for noise. Thanks, -- Pradeep Singh Rautela
http://eagain.wordpress.com
http://emptydomain.googlepages.com
--
unsubscribe notice
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to
majordomo@vger.kernel.org
More majordomo info at
http://vger.kernel.org/majordomo-info.html
Please read the FAQ at
http://www.tux.org/lkml/
Previous message: [
thread
] [
date
] [
author
]
Next message: [thread] [
date
] [
author
]
Messages in current thread:
[PATCH 0/5] High-speed tun receive and xmit
, Rusty Russell
, (Fri Apr 18, 12:33 am)
[PATCH 1/5] virtio: put last_used and last_avail index into ...
, Rusty Russell
, (Fri Apr 18, 12:35 am)
[PATCH 2/5] /dev/vring: simple userspace-kernel ringbuffer i...
, Rusty Russell
, (Fri Apr 18, 12:39 am)
Re: [PATCH 2/5] /dev/vring: simple userspace-kernel ringbuff...
, Evgeniy Polyakov
, (Sat Apr 19, 6:22 am)
Re: [PATCH 2/5] /dev/vring: simple userspace-kernel ringbuff...
, Rusty Russell
, (Sat Apr 19, 12:05 pm)
Re: [PATCH 2/5] /dev/vring: simple userspace-kernel ringbuff...
, Evgeniy Polyakov
, (Sat Apr 19, 12:33 pm)
Re: [PATCH 2/5] /dev/vring: simple userspace-kernel ringbuff...
, Rusty Russell
, (Sat Apr 19, 12:45 pm)
Re: [PATCH 2/5] /dev/vring: simple userspace-kernel ringbuff...
, Andrew Morton
, (Fri Apr 18, 7:18 am)
Re: [PATCH 2/5] /dev/vring: simple userspace-kernel ringbuff...
, Rusty Russell
, (Fri Apr 18, 10:32 am)
Re: [PATCH 2/5] /dev/vring: simple userspace-kernel ringbuff...
, Andrew Morton
, (Fri Apr 18, 2:59 pm)
Re: [PATCH 2/5] /dev/vring: simple userspace-kernel ringbuff...
, Jonathan Corbet
, (Sat Apr 19, 11:02 am)
Re: [PATCH 2/5] /dev/vring: simple userspace-kernel ringbuff...
, Michael Kerrisk
, (Fri Apr 18, 3:38 pm)
Re: [PATCH 2/5] /dev/vring: simple userspace-kernel ringbuff...
, Rusty Russell
, (Sat Apr 19, 12:41 pm)
Re: [PATCH 2/5] /dev/vring: simple userspace-kernel ringbuff...
, David Miller
, (Sat Apr 19, 8:16 pm)
[PATCH 3/5] /dev/vring limit and base ioctls
, Rusty Russell
, (Fri Apr 18, 12:41 am)
[PATCH 4/5] tun: vringfd receive support.
, Rusty Russell
, (Fri Apr 18, 12:42 am)
[PATCH 5/5] tun: vringfd xmit support.
, Rusty Russell
, (Fri Apr 18, 12:43 am)
Re: [PATCH 5/5] tun: vringfd xmit support.
, pradeep singh rautela
, (Fri Apr 18, 7:46 am)
Re: [PATCH 5/5] tun: vringfd xmit support.
, Ray Lee
, (Fri Apr 18, 10:25 am)
Re: [PATCH 5/5] tun: vringfd xmit support.
, pradeep singh rautela
, (Fri Apr 18, 2:01 pm)
Re: [PATCH 5/5] tun: vringfd xmit support.
, Andrew Morton
, (Fri Apr 18, 7:31 am)
Re: [PATCH 5/5] tun: vringfd xmit support.
, Rusty Russell
, (Fri Apr 18, 11:15 am)
Re: [PATCH 5/5] tun: vringfd xmit support.
, Andrew Morton
, (Fri Apr 18, 9:54 pm)
Re: [PATCH 5/5] tun: vringfd xmit support.
, Andrew Morton
, (Fri Apr 18, 3:06 pm)
Re: [PATCH 5/5] tun: vringfd xmit support.
, Rusty Russell
, (Sat Apr 19, 10:41 am)
Re: [PATCH 5/5] tun: vringfd xmit support.
, Andrew Morton
, (Sat Apr 19, 1:51 pm)
Re: [PATCH 5/5] tun: vringfd xmit support.
, Ray Lee
, (Fri Apr 18, 12:24 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
debian developer
Re: Dual-Licensing Linux Kernel with GPL V2 and GPL V3
Greg KH
[GIT PATCH] driver core patches against 2.6.24
H. Peter Anvin
Re: [PATCH] x86: Construct 32 bit boot time page tables in native format.
Christoph Lameter
Re: [RFC 00/15] x86_64: Optimize percpu accesses
git
:
linux-netdev
:
Christoph Hellwig
Re: [PATCH 06/32] IGET: Mark iget() and read_inode() as being obsolete [try #2]
Jarek Poplawski
Re: [PATCH] pkt_sched: Destroy gen estimators under rtnl_lock().
Gerrit Renker
[PATCH 27/37] dccp: Integration of dynamic feature activation - part 2 (server side)
David Miller
[GIT]: Networking
openbsd-misc
:
Colocation donated by:
Who's online
There are currently
4 users
and
790 guests
online.
Online users
zeekec
negociosores
christopherneal
dogbehavior
Syndicate