mbox

[v2,0/2] pcapng: fix some issues with writing packets.

Message ID 20220729071841.18198-1-kuka@cesnet.cz (mailing list archive)
Headers

Message

Mário Kuka July 29, 2022, 7:18 a.m. UTC
  This patchset contains fixes for some issues that occur when writing a 
large burst of packets at once, such as writing more packets than the
IOV_MAX limit and the problem of partial writing of a packet to a file 
if the writev() system call performs a partial write.

The typical use of pcapng in our cases is to copy the packets into a 
separate buffer and the process of writing to the file is done in some
slow path, for example by writing in a separate thread or at the end of
the application, where we don't mind the limitation of the typically 
slow speed of the storage medium.

Mário Kuka (2):
  pcapng: fix write more packets than IOV_MAX limit
  pcapng: check if writev() returns a partial write

 app/test/test_pcapng.c  | 42 +++++++++++++++++-
 lib/pcapng/rte_pcapng.c | 96 +++++++++++++++++++++++++++++++++--------
 2 files changed, 120 insertions(+), 18 deletions(-)