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); 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); S_IRUSR | S_IWUSR);
if (pcap_fd == -1) { if (pcap_fd == -1) {
perror("open"); perror("open");