Skip to content

Commit

Permalink
discards packets which are not (fully) populated (#3508)
Browse files Browse the repository at this point in the history
Not discarding packets which are not (fully) populated is bug prone or
might waste resources.
  • Loading branch information
behzadnouri authored Nov 7, 2024
1 parent b8ac678 commit 91edf66
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions perf/src/packet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,11 @@ impl PacketBatch {
// break the payload into smaller messages, and here any errors
// should be propagated.
error!("Couldn't write to packet {:?}. Data skipped.", e);
packet.meta_mut().set_discard(true);
}
} else {
trace!("Dropping packet, as destination is unknown");
packet.meta_mut().set_discard(true);
}
}
batch
Expand Down

0 comments on commit 91edf66

Please sign in to comment.