svn commit: r270877 - head/sys/net

Bjoern A. Zeeb bz at FreeBSD.org
Sun Aug 31 13:59:19 UTC 2014


On 31 Aug 2014, at 13:30 , Gleb Smirnoff <glebius at FreeBSD.org> wrote:

> Author: glebius
> Date: Sun Aug 31 13:30:54 2014
> New Revision: 270877
> URL: http://svnweb.freebsd.org/changeset/base/270877
> 
> Log:
>  Toss fields so that no padding field is required to achieve alignment.
> 
> Modified:
>  head/sys/net/if_var.h
> 
> Modified: head/sys/net/if_var.h
> ==============================================================================
> --- head/sys/net/if_var.h	Sun Aug 31 12:48:13 2014	(r270876)
> +++ head/sys/net/if_var.h	Sun Aug 31 13:30:54 2014	(r270877)
> @@ -146,11 +146,11 @@ struct ifnet {
> 
> 	/* Variable fields that are touched by the stack and drivers. */
> 	int	if_flags;		/* up/down, broadcast, etc. */
> +	int	if_drv_flags;		/* driver-managed status flags */
> 	int	if_capabilities;	/* interface features & capabilities */
> 	int	if_capenable;		/* enabled features & capabilities */
> 	void	*if_linkmib;		/* link-type-specific MIB data */
> 	size_t	if_linkmiblen;		/* length of above data */
> -	int	if_drv_flags;		/* driver-managed status flags */
> 	u_int	if_refcount;		/* reference count */
> 
> 	/* These fields are shared with struct if_data. */
> @@ -158,7 +158,6 @@ struct ifnet {
> 	uint8_t		if_addrlen;	/* media address length */
> 	uint8_t		if_hdrlen;	/* media header length */
> 	uint8_t		if_link_state;	/* current link state */
> -	uint32_t	if_spare32;

Doesn’t this leave a gap on 64bit alignment now again?

> 	uint32_t	if_mtu;		/* maximum transmission unit */
> 	uint32_t	if_metric;	/* routing metric (external only) */
> 	uint64_t	if_baudrate;	/* linespeed */
> 

— 
Bjoern A. Zeeb             "Come on. Learn, goddamn it.", WarGames, 1983



More information about the svn-src-all mailing list