From: ravi kerur Subject: Re: Porting linux network driver to Xen Date: Wed, 4 Nov 2009 18:15:56 -0800 Message-ID: References: <7530916A-AF60-4404-8BF2-7F9DB38BF52B@rice.edu> <4592F005-B20D-402B-8A35-D0ED5C8BED2B@rice.edu> <67ABFC71-865C-4D9D-96F0-9108F0F4D789@rice.edu> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1410297194==" Return-path: In-Reply-To: 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 --===============1410297194== Content-Type: multipart/alternative; boundary=00151773e2d6bfb7970477964eb8 --00151773e2d6bfb7970477964eb8 Content-Type: text/plain; charset=ISO-8859-1 Hi Kaushik, An additional Q, as long as the configuration is correct, I should be able to access network(i.e ftp, ssh and other apps) from dom0 via the usual path mentioned earlier. Please confirm. Thanks RK On Wed, Nov 4, 2009 at 3:33 PM, ravi kerur wrote: > Thank you Kaushik for your help. Very much appreciated. > > Thanks > -RK > > On Wed, Nov 4, 2009 at 3:07 PM, Kaushik Kumar Ram wrote: > >> >> I am confused now, probably I should ask what changes are needed such that >> I can access NIC from guest domains(domUs) for Tx and Rx? i.e if I compile >> native linux driver and run on dom0, how can I access it from domU's >> >> are the changes just the configuration such that path is setup from >> domU/netfront -> dom0/netback->Bridge->NIC? >> >> >> Yes. Just make sure the NIC corresponding to this driver is attached to >> the bridge. If this NIC is not your default >> interface you may need to tweak the configuration. >> >> -Kaushik >> >> >> On Wed, Nov 4, 2009 at 1:47 PM, Kaushik Kumar Ram wrote: >> >>> Again, you don't have to make any changes to the driver. Netback/netfront >>> do not interact directly with the >>> NIC's driver. >>> >>> -Kaushik >>> >>> On Nov 4, 2009, at 3:18 PM, ravi kerur wrote: >>> >>> 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 >>> >>> >> > --00151773e2d6bfb7970477964eb8 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Kaushik,

An additional Q, as long as the configuration is correct= , I should be able to access network(i.e ftp, ssh and other apps) from dom0= via the usual path mentioned earlier. Please confirm.

Thanks
RK

On Wed, Nov 4, 2009 at 3:33 PM, ravi k= erur <rkerur@gmail= .com> wrote:
Thank you Kaushik for your help. Very much appreciated.
Thanks
-RK

On Wed, Nov 4, 2009 at 3:07 PM, Kaushik Kumar Ram <kaush= ik@rice.edu> wrote:

I am confused now, probably I should ask what changes are needed such that = I can access NIC from guest domains(domUs) for Tx and Rx?=A0 i.e if I compi= le native linux driver and run on dom0, how can I access it from domU's=

are the changes just the configuration such that path is setup from dom= U/netfront -> dom0/netback->Bridge->NIC?

=
Yes. Just make sure the NIC corresponding to this driver is att= ached to the bridge. If this NIC is not your default
interface you may need to tweak the configuration.

-Kaushik


On Wed, Nov 4, 2009 at 1:47 = PM, Kaushik Kumar Ram <kaushik@rice.edu> wrote:
Again, you don't have to make any changes to = the driver. Netback/netfront do not interact directly with the
NIC's driver.=A0

= -Kaushik

On Nov 4, 2009, at = 3:18 PM, ravi kerur wrote:

Thanks kaushi= k, How does netfront/netback interact with this driver? I believe I need ne= tback functionality running in dom0 and netfront running in domU's for = the existing driver.=A0 One of the documents has following explanation 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



--00151773e2d6bfb7970477964eb8-- --===============1410297194== 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 --===============1410297194==--