RE: [PATCH v3 1/4] net: add name_assign_type netdev attribute

From: David Laight
Date: Mon Mar 17 2014 - 13:14:17 EST


From: David Herrmann
> The name_assign_type attribute gives hints where the interface name of a
> given net-device comes from. Three different values are currently defined:
> NET_NAME_ENUM:
> This is the default. The ifname is provided by the kernel with an
> enumerated suffix. Names may be reused and unstable.
> NET_NAME_USER:
> The ifname was provided by user-space during net-device setup.
> NET_NAME_RENAMED:
> The net-device has been renamed via RTNL. Once this type is set, it
> cannot change again.
...
> diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
> index b8d8c80..6698e87 100644
> --- a/include/linux/netdevice.h
> +++ b/include/linux/netdevice.h
> @@ -1248,6 +1248,7 @@ struct net_device {
> * of the interface.
> */
> char name[IFNAMSIZ];
> + unsigned char name_assign_type; /* name assignment type */
>
> /* device name hash chain, please keep it close to name[] */
> struct hlist_node name_hlist;

Do you really need to add 7 byte of padding here?
There seems to be some padding lurking elsewhere that really ought
to be mergable.

David



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/