Skip to contentSkip to conversation

Understanding netback packet transmission code

DISCUSSION Micky Kay 2 participants 2 messages Oct 27, 2009

lore
Share & tools
lore

Micky Kay

author
#0 lore raw

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. 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).

Could someone demystify all of this please? Thanks much.

- Micky

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#1 lore raw
Quoted 1 line · Micky Kay

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.

Quoted 1 line

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.

Quoted 1 line

Could someone demystify all of this please? Thanks much.

-Kaushik