Lines Matching full:master
5 //! Kernel. The protocol defines two sides of the communication, master and slave. Master is
8 //! The communication channel between the master and the slave includes two sub channels. One is
9 //! used to send requests from the master to the slave and optional replies from the slave to the
10 //! master. This sub channel is created on master startup by connecting to the slave service
11 //! endpoint. The other is used to send requests from the slave to the master and optional replies
12 //! from the master to the slave. This sub channel is created by the master issuing a
15 //! Unix domain socket is used as the underlying communication channel because the master needs to
30 #[cfg(feature = "vhost-user-master")]
31 mod master; module
32 #[cfg(feature = "vhost-user-master")]
33 pub use self::master::{Master, VhostUserMaster};
87 /// Failure from the master side.
120 Error::MasterInternalError => write!(f, "Master internal error"), in fmt()
149 // Master internal error, hope it recovers on reconnect. in should_reconnect()
224 #[cfg(all(test, feature = "vhost-user-master", feature = "vhost-user-slave"))]
247 fn create_slave<P, S>(path: P, backend: Arc<S>) -> (Master, SlaveReqHandler<S>) in create_slave() argument
254 let master = Master::connect(&path, 1).unwrap(); in create_slave() localVariable
255 (master, slave_listener.accept().unwrap().unwrap()) in create_slave()
270 let (master, mut slave) = create_slave(path, slave_be.clone()); in test_set_owner()
273 master.set_owner().unwrap(); in test_set_owner()
276 master.set_owner().unwrap(); in test_set_owner()
287 let (mut master, mut slave) = create_slave(path, slave_be.clone()); in test_set_features()
310 master.set_owner().unwrap(); in test_set_features()
313 let features = master.get_features().unwrap(); in test_set_features()
315 master.set_features(VIRTIO_FEATURES & !0x1).unwrap(); in test_set_features()
318 let features = master.get_protocol_features().unwrap(); in test_set_features()
320 master.set_protocol_features(features).unwrap(); in test_set_features()
331 let (mut master, mut slave) = create_slave(path, slave_be.clone()); in test_master_slave_process()
406 master.set_owner().unwrap(); in test_master_slave_process()
409 let features = master.get_features().unwrap(); in test_master_slave_process()
411 master.set_features(VIRTIO_FEATURES & !0x1).unwrap(); in test_master_slave_process()
414 let mut features = master.get_protocol_features().unwrap(); in test_master_slave_process()
422 master.set_protocol_features(features).unwrap(); in test_master_slave_process()
425 let (inflight_info, inflight_file) = master in test_master_slave_process()
433 master in test_master_slave_process()
437 let num = master.get_queue_num().unwrap(); in test_master_slave_process()
448 master.set_mem_table(&mem).unwrap(); in test_master_slave_process()
450 master in test_master_slave_process()
454 let (reply_body, reply_payload) = master in test_master_slave_process()
461 master.set_slave_request_fd(&eventfd).unwrap(); in test_master_slave_process()
462 master.set_vring_enable(0, true).unwrap(); in test_master_slave_process()
464 master in test_master_slave_process()
474 master.set_log_fd(eventfd.as_raw_fd()).unwrap(); in test_master_slave_process()
476 master.set_vring_num(0, 256).unwrap(); in test_master_slave_process()
477 master.set_vring_base(0, 0).unwrap(); in test_master_slave_process()
487 master.set_vring_addr(0, &config).unwrap(); in test_master_slave_process()
488 master.set_vring_call(0, &eventfd).unwrap(); in test_master_slave_process()
489 master.set_vring_kick(0, &eventfd).unwrap(); in test_master_slave_process()
490 master.set_vring_err(0, &eventfd).unwrap(); in test_master_slave_process()
492 let max_mem_slots = master.get_max_mem_slots().unwrap(); in test_master_slave_process()
498 master.add_mem_region(®ion).unwrap(); in test_master_slave_process()
500 master.remove_mem_region(®ion).unwrap(); in test_master_slave_process()