udp: uring: combine SendBuffers metadata lookups

This commit is contained in:
Joakim Frostegård 2023-03-08 14:40:29 +01:00
parent 1be6d4fa61
commit aae19c4cb3
2 changed files with 17 additions and 18 deletions

View file

@ -191,12 +191,10 @@ impl SendBuffers {
}
}
pub fn receiver_is_ipv4(&mut self, index: usize) -> bool {
self.buffers[index].receiver_is_ipv4
}
pub fn response_type_and_ipv4(&self, index: usize) -> (ResponseType, bool) {
let buffer = self.buffers.get(index).unwrap();
pub fn response_type(&mut self, index: usize) -> ResponseType {
self.buffers[index].response_type
(buffer.response_type, buffer.receiver_is_ipv4)
}
pub fn mark_index_as_free(&mut self, index: usize) {