login
Login
/
Register
Search
Search this site:
Forums
News
Blogs
Features
Site
Home
»
Mailing list archives
»
linux-kernel
»
2008
»
April
»
18
Re: [PATCH 5/5] tun: vringfd xmit support.
view
thread
Previous message: [
thread
] [
date
] [
author
]
Next message: [
thread
] [
date
] [
author
]
[view in full thread]
From: pradeep singh rautela
Subject:
Re: [PATCH 5/5] tun: vringfd xmit support.
Date: Friday, April 18, 2008 - 11:01 am
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
, (Thu Apr 17, 9:33 pm)
[PATCH 1/5] virtio: put last_used and last_avail index int ...
, Rusty Russell
, (Thu Apr 17, 9:35 pm)
[PATCH 2/5] /dev/vring: simple userspace-kernel ringbuffer ...
, Rusty Russell
, (Thu Apr 17, 9:39 pm)
[PATCH 3/5] /dev/vring limit and base ioctls
, Rusty Russell
, (Thu Apr 17, 9:41 pm)
[PATCH 4/5] tun: vringfd receive support.
, Rusty Russell
, (Thu Apr 17, 9:42 pm)
[PATCH 5/5] tun: vringfd xmit support.
, Rusty Russell
, (Thu Apr 17, 9:43 pm)
Re: [PATCH 2/5] /dev/vring: simple userspace-kernel ringbu ...
, Andrew Morton
, (Fri Apr 18, 4:18 am)
Re: [PATCH 5/5] tun: vringfd xmit support.
, Andrew Morton
, (Fri Apr 18, 4:31 am)
Re: [PATCH 5/5] tun: vringfd xmit support.
, pradeep singh rautela
, (Fri Apr 18, 4:46 am)
Re: [PATCH 5/5] tun: vringfd xmit support.
, Ray Lee
, (Fri Apr 18, 7:25 am)
Re: [PATCH 2/5] /dev/vring: simple userspace-kernel ringbu ...
, Rusty Russell
, (Fri Apr 18, 7:32 am)
Re: [PATCH 5/5] tun: vringfd xmit support.
, Rusty Russell
, (Fri Apr 18, 8:15 am)
Re: [PATCH 5/5] tun: vringfd xmit support.
, Ray Lee
, (Fri Apr 18, 9:24 am)
Re: [PATCH 5/5] tun: vringfd xmit support.
, pradeep singh rautela
, (Fri Apr 18, 11:01 am)
Re: [PATCH 2/5] /dev/vring: simple userspace-kernel ringbu ...
, Andrew Morton
, (Fri Apr 18, 11:59 am)
Re: [PATCH 5/5] tun: vringfd xmit support.
, Andrew Morton
, (Fri Apr 18, 12:06 pm)
Re: [PATCH 2/5] /dev/vring: simple userspace-kernel ringbu ...
, Michael Kerrisk
, (Fri Apr 18, 12:38 pm)
Re: [PATCH 5/5] tun: vringfd xmit support.
, Andrew Morton
, (Fri Apr 18, 6:54 pm)
Re: [PATCH 2/5] /dev/vring: simple userspace-kernel ringbu ...
, Evgeniy Polyakov
, (Sat Apr 19, 3:22 am)
Re: [PATCH 5/5] tun: vringfd xmit support.
, Rusty Russell
, (Sat Apr 19, 7:41 am)
Re: [PATCH 2/5] /dev/vring: simple userspace-kernel ringbu ...
, Jonathan Corbet
, (Sat Apr 19, 8:02 am)
Re: [PATCH 2/5] /dev/vring: simple userspace-kernel ringbu ...
, Rusty Russell
, (Sat Apr 19, 9:05 am)
Re: [PATCH 2/5] /dev/vring: simple userspace-kernel ringbu ...
, Evgeniy Polyakov
, (Sat Apr 19, 9:33 am)
Re: [PATCH 2/5] /dev/vring: simple userspace-kernel ringbu ...
, Rusty Russell
, (Sat Apr 19, 9:41 am)
Re: [PATCH 2/5] /dev/vring: simple userspace-kernel ringbu ...
, Rusty Russell
, (Sat Apr 19, 9:45 am)
Re: [PATCH 5/5] tun: vringfd xmit support.
, Andrew Morton
, (Sat Apr 19, 10:51 am)
Re: [PATCH 2/5] /dev/vring: simple userspace-kernel ringbu ...
, David Miller
, (Sat Apr 19, 5:16 pm)
Navigation
Create content
Mailing list archives
Recent posts
Popular discussions
linux-kernel
:
swhiteho
[PATCH 42/51] [GFS2] Move inode deletion out of blocking_cb
FUJITA Tomonori
Re: [Scst-devel] Integration of SCST in the mainstream Linux kernel
Matthew
Re: Linux 2.6.25
Alex Riesen
Re: [PATCH 4/7] lib: Introduce strnstr()
Alexey Dobriyan
Re: [2.6.22.2 review 09/84] Fix rfkill IRQ flags.
git
:
Mike Miller
git message
David Bremner
Commit f5bbc322 to git broke pre-commit hooks which read stdin
Stefan Richter
Re: [kernel.org users] [RFD] On deprecating "git-foo" for builtins
Jeff King
Re: [PATCH] t7004: test that "git-tag -u" implies "-s"
Christian MICHON
Re: VCS comparison table
git-commits-head
:
Linux Kernel Mailing List
i915: Don't whine when pci_enable_msi() fails.
Linux Kernel Mailing List
usb: musb: fix hanging when rmmod gadget driver
Linux Kernel Mailing List
[ARM] 4671/1: ep93xx: remove obsolete gpio_line_* operations
Linux Kernel Mailing List
NFSv4: Move error handling out of the delegation generic code
Linux Kernel Mailing List
Staging: wlan-ng: Move wlan_mkprintstr() and wlan_hexchar() macros into prism2sta.c
linux-netdev
:
Arnaldo Carvalho de Melo
Re: [PATCH 06/37] dccp: Limit feature negotiation to connection setup phase
David Miller
Re: 2.6.27.18: bnx2/tg3: BUG: "scheduling while atomic" trying to ifenslave a seco...
Badalian Vyacheslav
Re: tc filter flow hash question
Parav Pandit
ip6 route output() and ip_route_output_key() by drivers
Jarek Poplawski
Re: tc filter flow hash question
openbsd-misc
:
Vikas N Kumar
Re: Singularity OS
Marco Peereboom
Re: OpenBSD culture?
ropers
Re: Real men don't attack straw men
"RALOVICH, Kristóf"
Re: thinkpad windows refund
Kevin
Re: uvm_mapent_alloc: out of static map entries on 4.3 i386
Colocation donated by:
Syndicate