Skip to contentSkip to conversation

event notify during netfront and netback setup in Xen3.1

DISCUSSION Zang Hongyong 2 participants 2 messages Jun 13, 2008 – Jun 19, 2008

lore
Share & tools
lore
#0 lore raw

hi
In Xen3.1 source
when setup
netfront: when netback changed XenBusState to InitWait, fuction network_connect() called
in network_connect(),notify_remote_via_irq() was called, which gives netback a kick. then netfront changed Xenbusstate to Connected

but at the same time, netback has not bind its eventchannel to netfront domain's event? so how could this happen, when netback receive event from netfront domain?

ps:
The event bind happens when netfront Connected, netback calls connect() -->connect_rings() -->netif_map() . And later changed XenbusState to Connected. After all Connected, netback and netfront setup over and begin tx and rx in common.

Zang Hongyong
[email protected]
2008-06-13

#1 lore raw
Quoted 9 lines

hi
In Xen3.1 source
when setup
netfront: when netback changed XenBusState to InitWait, fuction network_connect() called
in network_connect(),notify_remote_via_irq() was called, which gives netback a kick. then netfront changed Xenbusstate to Connected

but at the same time, netback has not bind its eventchannel to netfront domain's event? so how could this happen, when netback receive event from netfront domain?

Netfront allocates an unbound event channel in responce to the backend entering InitWait state (network_connect() -> talk_to_backend() -> setup_device() -> bind_listening_port_to_irqhandler() -> bind_listening_port_to_irq() -> EVTCHNOP_alloc_unbound). Once the channel is allocated, the frontend can queue events on it, even before backend binds it. This happens later on, in responce to netfront entering Connected state (bind_interdomain_evtchn_to_irqhandler() in netif_map()).

Hope this helps
Gr(z)egor(z)