WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

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

To: "Robert Valentan" <R.Valentan@xxxxxxxxxxxxx>
Subject: Re: [Xen-devel] [Patch] vnet-module ( for 3.1 && unstable )
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
Dkim-signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=X/sfuOgJKMfqX5KxOE/HRm/F1zYzzQsB95fNq4q3lGIVIGOo0Tv5s6TSbIJERUEF2vJTiSg50GyXDI4AduMG3uk/TBdBdItJ4wjZkkY1Bg+jcu4MiwxYnwZM2ox23OYnLjjrvAU99//f7ms30d5pYwJfb5tmQOmZaTuVliXzbUA=
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=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
In-reply-to: <469B07E4.3030805@xxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <469A4AA2.2030108@xxxxxxxxxxxxx> <4e777ed10707151915g2f87b3e2r5cb222ff4e7d695d@xxxxxxxxxxxxxx> <469B07E4.3030805@xxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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

<Prev in Thread] Current Thread [Next in Thread>