[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [Patch] vnet-module ( for 3.1 && unstable )


  • To: "Robert Valentan" <R.Valentan@xxxxxxxxxxxxx>
  • From: "Zhu Han" <schumi.han@xxxxxxxxx>
  • Date: Mon, 16 Jul 2007 14:22:49 +0800
  • Cc: Mike Wray <mike.wray@xxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx
  • Delivery-date: Sun, 15 Jul 2007 23:20:31 -0700
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=NrXfpSN/rqltnBjHteR4jCWcqqYd9DRIvJ32ZRpDofMDMOVGVijJVmKM1QwfCOxoCX+3JJ0sBX0I3y005l/7Jnu4Z2/JiuKUnqSmls7ucJhI4ed3Sk3YFesOMCm+gyAVKko8ALHY5/VDPujJC5+Sh40g4ycTKqb+TS/zL2sPYFE=
  • List-id: Xen developer discussion <xen-devel.lists.xensource.com>

On 7/16/07, Robert Valentan <R.Valentan@xxxxxxxxxxxxx> wrote:
Zhu Han schrieb:
> Hi, Robert,
>
> Here are some questions:
>
> 1) If we just pull Eth Header and IP header, does it reach the
> position out of the head room?  I dont' observe it before.

The __skb_pull  in include/linux/skbuff.h has a BUG_ON, which was
always "active". The problem are not the header of the received
packet, but the encapsed header. Without the change, my systems
are always been killed by the BUG_ON in skbuff.h
To observe it: use a vnet with peer's on different networks, eg
 each part in an other datacenter...

The BUG_ON only wakes up when you pulls data more than head room
contained. Sometime s the vnet header will be put to fragmented page
instead of in head room. So when pull out the vnet header, it will hit
on the BUG_ON. That's what you observed, I'm afraid.



> 2) You don't move_addr_to_kernel/move_addr_to_user, you just need
> change_fs to KERNEL_DS and then change it back.

? The UDP & IP-header was not always changeable on received packets
after pulling data, possible there is a better (or nicer) way..

I mean you don't need move_addr_to_kernel/move_addr_to_user. Whatever,
you code is already in kernel mode.


> 3) Why not use "struct sock" directly to manipulate the socket instead
> of using int file descriptor?

I had want only to get it to work, without writing it new, i changed
only the code, to make it work on systms without sys-socketcall.

I don't think, that anyone had used vnet_module in 3.* before. With
my patch, the vnet_module is now working local, in local-net and
with peer's, as long you need no security-option. I tested it on
i386 and x86_64 systems.

Unfortunately, I'm pretty sure vnet was broken serveral months ago.
When I tried to use it, I have to build my own patch.



regards
Robert Valentan

> On 7/16/07, Robert Valentan <R.Valentan@xxxxxxxxxxxxx> wrote:
>> Hallo!
>>
>> The attached patch makes the vnet-module working for i386
>> and x86_64. (I had no other systems for testing)
>> (My patch from 6.6.2007 is included)
>>
>>  - x86_64: the x86-64 kernel has __ARCH_WANT_SYS_SOCKETCALL
>>    defined, but has no socketcall. Replacing the _syscall's
>>    to a working one.
>>
>>  - moves the "skb_pull" function from kernel to skb_util.c
>>    because pulling in the data will rise a "BUG_ON" in the
>>    kernel. The kernel-function does not allow to pull into
>>    the payload!
>>
>>  - the skb_buff is not always possible to modify a received
>>    buffer to send it again to the network.
>>    (vnet_forward.c and etherip.c) The code now work's..
>>    I think with no or less time-penalty.



--
best regards,
hanzhu

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.