From 214df82afacb6e4f782e0d8090c25db6a7230fdf Mon Sep 17 00:00:00 2001 From: emax Date: Tue, 16 Oct 2012 20:18:15 +0000 Subject: introduce concept of ifi_baudrate power factor. the idea is to work around the problem where high speed interfaces (such as ixgbe(4)) are not able to report real ifi_baudrate. bascially, take a spare byte from struct if_data and use it to store ifi_baudrate power factor. in other words, real ifi_baudrate = ifi_baudrate * 10 ^ ifi_baudrate power factor this should be backwards compatible with old binaries. use ixgbe(4) as an example on how drivers would set ifi_baudrate power factor Discussed with: kib, scottl, glebius MFC after: 1 week --- sys/net/if.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sys/net/if.h') diff --git a/sys/net/if.h b/sys/net/if.h index d420d26..93448b5 100644 --- a/sys/net/if.h +++ b/sys/net/if.h @@ -86,7 +86,7 @@ struct if_data { u_char ifi_hdrlen; /* media header length */ u_char ifi_link_state; /* current link state */ u_char ifi_vhid; /* carp vhid */ - u_char ifi_spare_char2; /* spare byte */ + u_char ifi_baudrate_pf; /* baudrate power factor */ u_char ifi_datalen; /* length of this data struct */ u_long ifi_mtu; /* maximum transmission unit */ u_long ifi_metric; /* routing metric (external only) */ -- cgit v1.1