diff options
author | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2018-01-20 20:03:46 +0000 |
---|---|---|
committer | Mike Belopuhov <mikeb@cvs.openbsd.org> | 2018-01-20 20:03:46 +0000 |
commit | 3d9ab49a23a927eb6817affe517d46bd5b0d222e (patch) | |
tree | 6f2af092954a84934ddb09fcba320fa327843381 /sys | |
parent | e817621d0d8a415fdbeacca0609a24b77c0fd3af (diff) |
Disable TCP and UDP transmit checksum offloading
In certain configurations, transmit checksum offloading doesn't
appear to work correctly, preventing correct TCP and UDP operation.
Some of these issues involving VLAN tagging are documented by the
Xen project.
Problem reported and fix tested by Imre Oolberg, thanks!
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/pv/if_xnf.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sys/dev/pv/if_xnf.c b/sys/dev/pv/if_xnf.c index 1f5c3916062..75d29eb584e 100644 --- a/sys/dev/pv/if_xnf.c +++ b/sys/dev/pv/if_xnf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_xnf.c,v 1.62 2017/12/09 14:00:21 mikeb Exp $ */ +/* $OpenBSD: if_xnf.c,v 1.63 2018/01/20 20:03:45 mikeb Exp $ */ /* * Copyright (c) 2015, 2016 Mike Belopuhov @@ -1112,6 +1112,7 @@ xnf_capabilities(struct xnf_softc *sc) if (error == 0 && res == 1) sc->sc_caps |= XNF_CAP_SG; +#if 0 /* Query IPv4 checksum offloading capability, enabled by default */ sc->sc_caps |= XNF_CAP_CSUM4; prop = "feature-no-csum-offload"; @@ -1128,6 +1129,7 @@ xnf_capabilities(struct xnf_softc *sc) goto errout; if (error == 0 && res == 1) sc->sc_caps |= XNF_CAP_CSUM6; +#endif /* Query multicast traffic contol capability */ prop = "feature-multicast-control"; @@ -1192,6 +1194,13 @@ xnf_init_backend(struct xnf_softc *sc) goto errout; } + /* Disable IPv4 checksum offloading */ + if (!(sc->sc_caps & XNF_CAP_CSUM4)) { + prop = "feature-no-csum-offload"; + if (xs_setnum(sc->sc_parent, sc->sc_node, prop, 1)) + goto errout; + } + /* Enable IPv6 checksum offloading */ if (sc->sc_caps & XNF_CAP_CSUM6) { prop = "feature-ipv6-csum-offload"; |