summaryrefslogtreecommitdiff
path: root/sys/net/if.h
diff options
context:
space:
mode:
authorDavid Gwynne <dlg@cvs.openbsd.org>2018-11-11 05:55:11 +0000
committerDavid Gwynne <dlg@cvs.openbsd.org>2018-11-11 05:55:11 +0000
commit947ea27b7001429498c52ac4a91fefe33b367e6c (patch)
treecc9e497ccb6f2f10a72c1271d63771dc9ef138fd /sys/net/if.h
parentb7a02204b882b363ec2891365e07af048d8474c6 (diff)
use the llprio on gre(4) and eoip(4) interfaces for the keepalive tos
llprios are valued 0 to 7, while the ip tos/dscp/tclass is an 8 bit value. fortunately the high 3 bits map nicely to the llprio values, so we shift the llprio into place when generating the keepalive frames. the llprio is defaulted to the value that cisco uses for their gre keepalives.
Diffstat (limited to 'sys/net/if.h')
-rw-r--r--sys/net/if.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/net/if.h b/sys/net/if.h
index 4f2e9f7bd7a..0d28a126605 100644
--- a/sys/net/if.h
+++ b/sys/net/if.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.h,v 1.195 2018/09/12 09:20:34 krw Exp $ */
+/* $OpenBSD: if.h,v 1.196 2018/11/11 05:55:10 dlg Exp $ */
/* $NetBSD: if.h,v 1.23 1996/05/07 02:40:27 thorpej Exp $ */
/*
@@ -129,6 +129,8 @@ struct if_data {
#define IFQ_MINPRIO 0
#define IFQ_MAXPRIO IFQ_NQUEUES - 1
#define IFQ_DEFPRIO 3
+#define IFQ_PRIO2TOS(_p) ((_p) << 5)
+#define IFQ_TOS2PRIO(_t) ((_t) >> 5)
/*
* Values for if_link_state.