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] Understanding netback packet transmission code

To: Micky Kay <weirdbluelights@xxxxxxxxx>
Subject: Re: [Xen-devel] Understanding netback packet transmission code
From: Kaushik Kumar Ram <kaushik@xxxxxxxx>
Date: Tue, 27 Oct 2009 11:43:16 -0500
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 27 Oct 2009 09:43:59 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1cad1e750910270847q790101c1m294d787890c2a67e@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: <1cad1e750910270847q790101c1m294d787890c2a67e@xxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

On Oct 27, 2009, at 10:47 AM, Micky Kay wrote:

I figured that the net_tx_action function is the one that schedules packet transmission. I understood a fair portion of the code but for the call to netif_rx (netback.c:1454) after scheduling the tx_response and the update of the rx stats in the transmission function.

When netif_rx is called, the packet is queued to be picked by the software Ethernet bridge. netif_rx is called in the transmit path since the packet
is being "received" from the bridge's perspective.

I also noticed that netif_be_start_xmit function queues the sk_buff passed to it in the receive queue (rx_queue) and schedules the net_rx_tasklet (netback.c:336).

netif_be_start_xmit is called by the bridge code and this eventually leads to the packet being received by netback. netif_be_start_xmit is called in receive path since the packet is being "transmitted" from the bridge's perspective.

Could someone demystify all of this please? Thanks much.

-Kaushik

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

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