[PATCH 3/3] ia64/pv_ops: preparation: introduce ia64_get_psr_i() to make kernel paravirtualization friendly.

2008-04-21 Thread Isaku Yamahata
__local_irq_save() and local_save_flags() are used to mask interruptions. They read all psr bits that requres whole bit emulation. On the other hand, reading only psr.i, the single bit, can be virtualized cheaply. Signed-off-by: Isaku Yamahata <[EMAIL PROTECTED]> --- include/asm-ia64/intrinsics.h

[PATCH 1/3] [RESEND] ia64: preparation: remove extern in irq_ia64.c

2008-04-21 Thread Isaku Yamahata
remove extern declaration of handle_IPI() in irq_ia64.c. Instead, declare it in asm-ia64/smp.h. Later handle_IPI() will be referenced from another file. Signed-off-by: Isaku Yamahata <[EMAIL PROTECTED]> --- arch/ia64/kernel/irq_ia64.c |1 - include/asm-ia64/smp.h |2 ++ 2 files chang

[RFC PATCH] virtio: change config to guest endian.

2008-04-21 Thread Rusty Russell
[Christian, Hollis, how much is this ABI breakage going to hurt you?] A recent proposed feature addition to the virtio block driver revealed some flaws in the API, in particular how easy it is to break big endian machines. The virtio config space was originally chosen to be little-endian, because

Re: [6/6] [VIRTIO] net: Allow receiving SG packets

2008-04-21 Thread David Miller
From: Rusty Russell <[EMAIL PROTECTED]> Date: Tue, 22 Apr 2008 12:50:27 +1000 > But I was curious as to why the +2 in the MAX_SKB_FRAGS definition? To be honest I have no idea. When Alexey added the TSO changeset way back then, it had the "+2", from the history-2.6 tree: commit 80223d5186f73bf4

Re: [6/6] [VIRTIO] net: Allow receiving SG packets

2008-04-21 Thread Rusty Russell
On Tuesday 22 April 2008 06:04:18 David Miller wrote: > From: Rusty Russell <[EMAIL PROTECTED]> > Date: Tue, 22 Apr 2008 05:06:16 +1000 > > > I'm not sure what the right number is here. Say worst case is header > > which goes over a page boundary then MAX_SKB_FRAGS in the skb, but for > > some rea

Re: [5/6] [VIRTIO] net: Add ethtool ops for SG/GSO

2008-04-21 Thread Rusty Russell
On Tuesday 22 April 2008 11:15:02 Herbert Xu wrote: > On Tue, Apr 22, 2008 at 05:01:46AM +1000, Rusty Russell wrote: > > On Friday 18 April 2008 13:21:42 Herbert Xu wrote: > > > +static int virtnet_change_mtu(struct net_device *dev, int mtu) > > > +{ > > > + int max = 65535 - ETH_HLEN; > > > + > >

Re: [6/6] [VIRTIO] net: Allow receiving SG packets

2008-04-21 Thread Herbert Xu
On Mon, Apr 21, 2008 at 01:04:18PM -0700, David Miller wrote: > From: Rusty Russell <[EMAIL PROTECTED]> > Date: Tue, 22 Apr 2008 05:06:16 +1000 > > > I'm not sure what the right number is here. Say worst case is header which > > goes over a page boundary then MAX_SKB_FRAGS in the skb, but for so

Re: [5/6] [VIRTIO] net: Add ethtool ops for SG/GSO

2008-04-21 Thread Herbert Xu
On Tue, Apr 22, 2008 at 05:01:46AM +1000, Rusty Russell wrote: > On Friday 18 April 2008 13:21:42 Herbert Xu wrote: > > +static int virtnet_change_mtu(struct net_device *dev, int mtu) > > +{ > > + int max = 65535 - ETH_HLEN; > > + > > + if (mtu > max) > > + return -EINVAL; > > + dev

Re: [6/6] [VIRTIO] net: Allow receiving SG packets

2008-04-21 Thread David Miller
From: Rusty Russell <[EMAIL PROTECTED]> Date: Tue, 22 Apr 2008 05:06:16 +1000 > I'm not sure what the right number is here. Say worst case is header which > goes over a page boundary then MAX_SKB_FRAGS in the skb, but for some reason > that already has a +2: > > /* To allow 64K frame to be pac

Re: [6/6] [VIRTIO] net: Allow receiving SG packets

2008-04-21 Thread Rusty Russell
On Friday 18 April 2008 13:24:27 Herbert Xu wrote: > Finally this patch lets virtio_net receive GSO packets in addition > to sending them. ... > static void try_fill_recv(struct virtnet_info *vi) > { > struct sk_buff *skb; > - struct scatterlist sg[1+MAX_SKB_FRAGS]; > + struct scatt

Re: [5/6] [VIRTIO] net: Add ethtool ops for SG/GSO

2008-04-21 Thread Rusty Russell
On Friday 18 April 2008 13:21:42 Herbert Xu wrote: > +static int virtnet_change_mtu(struct net_device *dev, int mtu) > +{ > + int max = 65535 - ETH_HLEN; > + > + if (mtu > max) > + return -EINVAL; > + dev->mtu = mtu; > + return 0; > +} Hi Herbert! I removed this pa

Re: [PATCH 2/5] /dev/vring: simple userspace-kernel ringbuffer interface.

2008-04-21 Thread Evgeniy Polyakov
On Sun, Apr 20, 2008 at 02:05:31AM +1000, Rusty Russell ([EMAIL PROTECTED]) wrote: > > Should this whole function and vring_used_buffer() be protected with > > vr->lock mutex? > > No; it's up to the caller to make sure that they are serialized. In the case > of tun that happens naturally. > >

Re: [PATCH 2/5] /dev/vring: simple userspace-kernel ringbuffer interface.

2008-04-21 Thread Evgeniy Polyakov
Hi. On Fri, Apr 18, 2008 at 02:39:48PM +1000, Rusty Russell ([EMAIL PROTECTED]) wrote: > +int vring_get_buffer(struct vring_info *vr, > + struct iovec *in_iov, > + unsigned int *num_in, unsigned long *in_len, > + struct iovec *out_iov, > +