KVM vhost与VM之间的数据流交换

                                                    vm virtio driver

                                                             ||

数据从VM发送到外面:kthread=》handle_tx(vhost_net)=》 vhost_get_vq_desc(vhost_net)=》tun_sendmsg(tun)=》tun_get_user(tun) =》netif_rx_ni(协议栈)

数据从外面接收到VM:kthread=》handle_rx(vhost_net)=》 tun_recvmsg(tun)=》tun_put_user(tun) =》vhost_add_used_and_signal_n(vhost)

                                                             ||

                                                   tun_net_xmit

                                                             ||

                                                 dev_hard_start_xmit

                                                             ||

                                                  dev_queue_xmit

                                                             ||

                                      br_flood_forward/br_forward/br_pass_frame_up

                                                             ||

irq_work_interrupt=》irq_exit=》__do_softirq=》net_rx_action=》napi_poll=》pcnet32_poll=》pcnet32_rx=》pcnet32_rx_entry=》__netif_receive_skb_core=》br_handle_frame=》br_handle_frame_finish

你可能感兴趣的:(linux内核研究)