1
0
mirror of https://passt.top/passt synced 2024-07-01 23:42:41 +00:00

pcap: Drop O_DSYNC from pcap file descriptor

passt is stable enough, and dropping O_DSYNC makes reduces the impact
of capturing packets on timing, while running tests.

Signed-off-by: Stefano Brivio <sbrivio@redhat.com>
This commit is contained in:
Stefano Brivio 2021-09-27 00:23:27 +02:00
parent 11cc43feec
commit a491c8ee3c

2
pcap.c
View File

@ -185,7 +185,7 @@ void pcap_init(struct ctx *c, int index)
strncpy(c->pcap, name, PATH_MAX);
}
pcap_fd = open(c->pcap, O_WRONLY | O_CREAT | O_TRUNC | O_DSYNC,
pcap_fd = open(c->pcap, O_WRONLY | O_CREAT | O_TRUNC,
S_IRUSR | S_IWUSR);
if (pcap_fd == -1) {
perror("open");