summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordlg <dlg@openbsd.org>2020-12-15 03:26:08 +0000
committerdlg <dlg@openbsd.org>2020-12-15 03:26:08 +0000
commite0776c2c8c0f5e0b75cb76d45b2561e16f0c8b28 (patch)
treed381693b1cca9e36c753ea6e85a58b8fd50a432c
parentneuter the shutdown hooks for now, they seem to crash the fw on some boards. (diff)
downloadwireguard-openbsd-e0776c2c8c0f5e0b75cb76d45b2561e16f0c8b28.tar.xz
wireguard-openbsd-e0776c2c8c0f5e0b75cb76d45b2561e16f0c8b28.zip
turn hardware rx mbuf timestamping off by default.
we see too many ntp replies (appear to) arrive before the request for them was sent, which ntpd handles by disabling the peer for an hour. this was a lot easier to narrow down after fixing up bpf and timestamps, cos it let me see this: 16:50:36.051696 802.1Q vid 871 pri 3 192.0.2.55.47079 > 162.159.200.123.123: v4 client strat 0 poll 0 prec 0 [tos 0x10] 16:50:36.047201 802.1Q vid 871 pri 3 162.159.200.123.123 > 192.0.2.55.47079: v4 server strat 3 poll 0 prec -25 (DF) im going to borrow the link0 flag for a bit to allow turning timestamping on.
-rw-r--r--sys/dev/pci/if_mcx.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/dev/pci/if_mcx.c b/sys/dev/pci/if_mcx.c
index 2384eb659a0..f0b5d4c2e3c 100644
--- a/sys/dev/pci/if_mcx.c
+++ b/sys/dev/pci/if_mcx.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_mcx.c,v 1.76 2020/12/12 11:48:53 jan Exp $ */
+/* $OpenBSD: if_mcx.c,v 1.77 2020/12/15 03:26:08 dlg Exp $ */
/*
* Copyright (c) 2017 David Gwynne <dlg@openbsd.org>
@@ -6597,7 +6597,7 @@ mcx_process_rx(struct mcx_softc *sc, struct mcx_rx *rx,
}
#endif
- if (c->c_tdiff) {
+ if (ISSET(sc->sc_ac.ac_if.if_flags, IFF_LINK0) && c->c_tdiff) {
uint64_t t = bemtoh64(&cqe->cq_timestamp) - c->c_timestamp;
t *= c->c_udiff;
t /= c->c_tdiff;