Commit 48c16b03 authored by Nawasan Wisitsingkhon's avatar Nawasan Wisitsingkhon

Remove unknown bytes write, and then it got faster

parent 31fc02f0
...@@ -163,11 +163,9 @@ impl MatchFields { ...@@ -163,11 +163,9 @@ impl MatchFields {
}; };
let _ = bytes.write_u16::<BigEndian>(vlan); let _ = bytes.write_u16::<BigEndian>(vlan);
let _ = bytes.write_u8(self.vlan_pcp.unwrap_or(0)); let _ = bytes.write_u8(self.vlan_pcp.unwrap_or(0));
let _ = bytes.write_u8(0);
let _ = bytes.write_u16::<BigEndian>(self.ethernet_type.unwrap_or(0)); let _ = bytes.write_u16::<BigEndian>(self.ethernet_type.unwrap_or(0));
let _ = bytes.write_u8(self.tos.unwrap_or(0)); let _ = bytes.write_u8(self.tos.unwrap_or(0));
let _ = bytes.write_u8(self.protocol.unwrap_or(0)); let _ = bytes.write_u8(self.protocol.unwrap_or(0));
let _ = bytes.write_u16::<BigEndian>(0);
let _ = bytes.write_u32::<BigEndian>(match &self.ip_src { let _ = bytes.write_u32::<BigEndian>(match &self.ip_src {
Some(ip) => ip.ip, Some(ip) => ip.ip,
None => 0, None => 0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment