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: Daniel Stodden <daniel.stodden@xxxxxxxxxx>
Date: Sun, 21 Feb 2010 13:35:22 -0800
Cc: Ian Campbell <Ian.Campbell@xxxxxxxxxxxxx>, Jeremy Fitzhardinge <jeremy@xxxxxxxx>, "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>
Delivery-date: Sun, 21 Feb 2010 13:36:00 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <29b32d341002201510w2cddb8s430eeea200ca5116@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>
References: <29b32d341002180827v7cd5f219u767f97554fdf4c58@xxxxxxxxxxxxxx> <1266511171.10261.2027.camel@xxxxxxxxxxxxxxxxxxxxxx> <29b32d341002181603v4664b3ebn8b8a89b88f2ab63c@xxxxxxxxxxxxxx> <1266570469.10261.6982.camel@xxxxxxxxxxxxxxxxxxxxxx> <29b32d341002190912n50cf83a5l40dacd2d331fac2e@xxxxxxxxxxxxxx> <1266600267.11737.545.camel@xxxxxxxxxxxxxxxxxxxxxx> <29b32d341002191430q4261fd32y8b6834125c0ca04@xxxxxxxxxxxxxx> <4B7F2B34.6040608@xxxxxxxx> <29b32d341002191815t2b06944s8670721e7325d8d8@xxxxxxxxxxxxxx> <20100220115837.GE2761@xxxxxxxxxxx> <29b32d341002201510w2cddb8s430eeea200ca5116@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
On Sat, 2010-02-20 at 18:10 -0500, Ritu kaur wrote:
> Thanks Daniel and Pasi. However, I have followup questions
> 
> 1. Daniel, I looked at Debian Etch 4.0 source code available from
> Citrix website, couldn't find netfront specific code, could you please
> point me to the right one.

Source should be drivers/xen/netfront. Should all reside in the debian
etch dom0 kernel package distributed with XCP. It's obviously not a
source RPM, but a debian source package (dsc, orig, etc). Is this the
source you're already looking at?

> 2. Since netfront in domU actually monitors "ethX" interface and when
> ethX is used for transmit(via ping or other network protocols) it
> invokes network_start_xmit which then uses shared memory rings to
> communicate to backend and uses netif_poll to check for responses. In
> struct netfront_info_, it has a field struct net_device *netdev, and
> entry points are hooked to this
> 
>     netdev->open            = network_open;
>         netdev->hard_start_xmit = network_start_xmit;
>         netdev->stop            = network_close;
>         netdev->get_stats       = network_get_stats;
>         netdev->poll            = netif_poll;
>         netdev->set_multicast_list = network_set_multicast_list;
>         netdev->uninit          = netif_uninit;
> ...
> 
> Since netback has similar code, I will not go into it.
> 
> I looked at struct net_device, it has a function ptr called "do_ioctl"
> and I wanted to know if this can be used for out ioctl need i.e 
> 
> 1. setup netdev->do_ioctl = network_ioctl
> 2. application invokes ioctl(eth2(associated with our intf in
> backend), ...)
> 3. network_ioctl is called and it does similar to xmit and recv via
> shared memory.
> 
> is this feasible? 

This would be the entry point for a socket ioctl, yes. It's feasible.
Not with right away with the present source code. But strictly speaking
such a thing can certainly be made.

I'd suggest not to try piggybacking this kind of operation on some RX/TX
traffic, or defining new message types. It won't really fit in there.

It would much rather turn into a third I/O ring. Assuming the control
data volume transferred between domain justifies it. Please don't
understand this as some kind of recommendation.

Daniel



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

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