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

[Xen-devel] modifying drivers

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] modifying drivers
From: Ritu kaur <ritu.kaur.us@xxxxxxxxx>
Date: Thu, 18 Feb 2010 08:27:44 -0800
Delivery-date: Thu, 18 Feb 2010 08:29:32 -0800
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=1P5PMyF7lwK4DjY2AI/sjMh9vr2sqwAOVgrm1hx7ThY=; b=YfFfnJSKnsrKS8NTvwFC1wC3ZfOJXDP8j5i8aLNgk6AxCNS/K4dRgfsFWcyYyg/Qd0 QYoLWRqD0cp5eHG89d2H5LF6b3mCp9UFhRZZhkj/KYBZbhKOhnmfbKTxFqPY4gaAF0PR 7GAip9SlSUBHKBVxVUYwmMMe6TNRKN3jWhOMU=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=KLuDHGC+1Y9YHvZdmYg2aZFd1q6Pl25uzSXBq+0OHBmSaWmzU0BJIs70bCcVtSmebl m+/lc97VA5Tq1WvqEhYhvuupEVz+hiPCfoAc+xX5j7FMOPPFtW8seMsnfHCkiXkOR3Fd psKRwKM/40uVLxYfmL0ivTIntuaB/PoQLNuXM=
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
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>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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. 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. 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