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] modifying drivers

To: Ritu kaur <ritu.kaur.us@xxxxxxxxx>
Subject: Re: [Xen-devel] modifying drivers
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Thu, 18 Feb 2010 16:39:31 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Thu, 18 Feb 2010 08:40:24 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <29b32d341002180827v7cd5f219u767f97554fdf4c58@xxxxxxxxxxxxxx>
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/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <29b32d341002180827v7cd5f219u767f97554fdf4c58@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Thu, 2010-02-18 at 16:27 +0000, Ritu kaur wrote:
> Hi,
> 
> I am modifying netback driver code such that it allows access to only
> one domU(based on lowest domid) when multiple domUs are present. When
> the domU with the lowest domid is suspended then the next domU in the
> list will get access.

Why?

>  I believe it can be done via xe/xm commands or via Citrix Xencenter
> by selecting or deselecting during vm installation or by adding and
> deleting nics, however, I wanted to control this from netback driver.

The toolstack is exactly the correct place to make and implement this
sort of policy decision -- it has no place in the kernel netback driver.

Ian.

>  For this,
> 
> 1.  keep track of devices created via netback_probe function which is
> called for every device. 
> 2. Use domid field in netif_st data structure
> 3. Added new function netif_check_domid and placed it along with
> netif_schedulable, I add a check if netif->domid is the lowest one(via
> list created in step 1)
> 4. Function netif_schedulable is called from 
> a. tx_queue_callback
> b. netif_be_start_xmit
> c. net_rx_action
> d. add_to_net_schedule_tail
> e. netif_be_int
> 
> This works fine for the first vm that comes up. However, subsequent vm
> bringup has issues which reboots dom0 itself. 
> 
> 5. I removed the function added by me in function netif_be_start_xmit
> only, this allows multiple vm's to be up and will allow only first vm
> to access netback. However, this has issues with the second
> functionality I would like to have i.e when first vm is suspended,
> next vm in the list should get access. I added kernel printfs in above
> functions and none of them are called after first vm is suspended and
> subsequent vm is trying to access.
> 
> Wanted to know inputs from experts on this and how to proceed with
> debugging.
> 
> Thanks
> 



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