From: ravi kerur Subject: Re: Porting linux network driver to Xen Date: Wed, 4 Nov 2009 13:18:50 -0800 Message-ID: References: <7530916A-AF60-4404-8BF2-7F9DB38BF52B@rice.edu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1230969474==" Return-path: In-Reply-To: <7530916A-AF60-4404-8BF2-7F9DB38BF52B@rice.edu> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Kaushik Kumar Ram Cc: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --===============1230969474== Content-Type: multipart/alternative; boundary=000e0cd6d1323d164e04779228e1 --000e0cd6d1323d164e04779228e1 Content-Type: text/plain; charset=ISO-8859-1 Thanks kaushik, How does netfront/netback interact with this driver? I believe I need netback functionality running in dom0 and netfront running in domU's for the existing driver. One of the documents has following explanation for Tx/Rx path. "For transmit (TX) requests the driver domain(dom0) uses a hypercall to map the guest page(domU) into its address space before sending the request through the bridge. When the physical device driver frees the page a callback function is automatically invoked to return a response to netfront which then revokes the grant. For RX requests netfront posts I/O buffer page grants to the RX I/O channel. When netback receives a packet from the bridge it retrieves a posted grant from the I/O channel and issues a grant copy hypercall to copy the packet to the guest page(domU). Finally, netback sends a response to the guest via the RX channel indicating a packet is available." I am not quite sure what changes or api's I need to call such that existing Tx/Rx buffers(rings) used for DMA in the native drivers starts talking via netfront/netback. Inputs appreciated. Thanks -RK ------------------------------ On Wed, Nov 4, 2009 at 8:58 AM, Kaushik Kumar Ram wrote: > Native Linux drivers should work as such in Dom0. You don't have to port > them. > > -Kaushik > > On Nov 4, 2009, at 7:17 AM, ravi kerur wrote: > > Hi All, >> >> I am working on porting an existing network driver from Linux to Xen, I >> understand network drivers needs netback and netfront functionality in order >> to work in Xen but I am unable to nail down the details of changes required >> esp. >> >> a. will the existing driver go into hypervisor or dom0? >> b. what changes are required in TX/RX rings for DMA in existing driver and >> how to incorporate them into netback/netfront, >> c. handling IRQs... >> >> Any pointers to existing nic driver or pointer to a document would be >> really helpful. >> >> Thanks >> -RK >> _______________________________________________ >> Xen-devel mailing list >> Xen-devel@lists.xensource.com >> http://lists.xensource.com/xen-devel >> > > --000e0cd6d1323d164e04779228e1 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks kaushik, How does netfront/netback interact with this driver? I beli= eve I need netback functionality running in dom0 and netfront running in do= mU's for the existing driver.=A0 One of the documents has following exp= lanation for Tx/Rx path.

"For transmit (TX)=20 requests the driver domain(dom0) uses a hypercall to map the guest page(domU) into its address space before sending the request through the bridge. When the physical device driver frees the page a callback function is automatically invoked to return a response to netfront which then revokes the grant.

For RX requests netfront posts I/O buffer page grants to the RX I/O channel. When netback receives a packet from the bridge it retrieves a posted grant from the I/O channel and issues a grant copy hypercall to copy the packet to the guest page(domU). Finally, netback sends a response to the guest via the RX channel indicating a packet is available."

I am not= quite sure what changes or api's I need to call such that existing Tx/= Rx buffers(rings) used for DMA in the native drivers starts talking via net= front/netback.

Inputs appreciated.

Thanks
-RK

<= hr width=3D"80%" size=3D"2">
=A0

On = Wed, Nov 4, 2009 at 8:58 AM, Kaushik Kumar Ram <kaushik@rice.edu> wrote:
Native Linux drivers should work as such in Dom0. You don't have to po= rt them.

-Kaushik

On Nov 4, 2009, at 7:17 AM, ravi kerur wrote:

<= /div>
Hi All,

I am working on porting an existing network driver from Linux to Xen, I und= erstand network drivers needs netback and netfront functionality in order t= o work in Xen but I am unable to nail down the details of changes required = esp.

a. will the existing driver go into hypervisor or dom0?
b. what changes are required in TX/RX rings for DMA in existing driver and = how to incorporate them into netback/netfront,
c. handling IRQs...

Any pointers to existing nic driver or pointer to a document would be reall= y helpful.

Thanks
-RK
_______________________________________________
Xen-devel mailing list
Xen-deve= l@lists.xensource.com
http://l= ists.xensource.com/xen-devel


--000e0cd6d1323d164e04779228e1-- --===============1230969474== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --===============1230969474==--