diff --git a/net_util/src/queue_pair.rs b/net_util/src/queue_pair.rs index 60727e1fd..be0b80de0 100644 --- a/net_util/src/queue_pair.rs +++ b/net_util/src/queue_pair.rs @@ -257,7 +257,7 @@ pub struct NetQueuePair { pub epoll_fd: Option, pub rx_tap_listening: bool, pub counters: NetCounters, - pub tap_event_id: u16, + pub tap_rx_event_id: u16, pub rx_desc_avail: bool, pub rx_rate_limiter: Option, pub tx_rate_limiter: Option, @@ -312,7 +312,7 @@ impl NetQueuePair { self.epoll_fd.unwrap(), self.tap.as_raw_fd(), epoll::Events::EPOLLIN, - u64::from(self.tap_event_id), + u64::from(self.tap_rx_event_id), ) .map_err(NetQueuePairError::UnregisterListener)?; self.rx_tap_listening = false; diff --git a/vhost_user_net/src/lib.rs b/vhost_user_net/src/lib.rs index 17568747b..03382bab2 100644 --- a/vhost_user_net/src/lib.rs +++ b/vhost_user_net/src/lib.rs @@ -89,7 +89,7 @@ impl VhostUserNetThread { rx_tap_listening: false, epoll_fd: None, counters: NetCounters::default(), - tap_event_id: 2, + tap_rx_event_id: 2, rx_desc_avail: false, rx_rate_limiter: None, tx_rate_limiter: None, @@ -209,7 +209,7 @@ impl VhostUserBackend for VhostUserNetBackend { thread.net.epoll_fd.unwrap(), thread.net.tap.as_raw_fd(), epoll::Events::EPOLLIN, - u64::from(thread.net.tap_event_id), + u64::from(thread.net.tap_rx_event_id), ) .map_err(Error::RegisterTapListener)?; thread.net.rx_tap_listening = true; diff --git a/virtio-devices/src/net.rs b/virtio-devices/src/net.rs index fed579535..a54e3917c 100644 --- a/virtio-devices/src/net.rs +++ b/virtio-devices/src/net.rs @@ -161,7 +161,7 @@ impl NetEpollHandler { self.net.epoll_fd.unwrap(), self.net.tap.as_raw_fd(), epoll::Events::EPOLLIN, - u64::from(self.net.tap_event_id), + u64::from(self.net.tap_rx_event_id), ) .map_err(DeviceError::IoError)?; self.net.rx_tap_listening = true; @@ -289,7 +289,7 @@ impl EpollHelperHandler for NetEpollHandler { self.net.epoll_fd.unwrap(), self.net.tap.as_raw_fd(), epoll::Events::EPOLLIN, - u64::from(self.net.tap_event_id), + u64::from(self.net.tap_rx_event_id), ) { error!("Error register_listener with `RX_RATE_LIMITER_EVENT`: {:?}", e); return true; @@ -627,7 +627,7 @@ impl VirtioDevice for Net { epoll_fd: None, rx_tap_listening, counters: self.counters.clone(), - tap_event_id: RX_TAP_EVENT, + tap_rx_event_id: RX_TAP_EVENT, rx_desc_avail: false, rx_rate_limiter, tx_rate_limiter,