Re: [PATCH v2 1/4] net: add name_assign_type netdev attribute

From: David Herrmann
Date: Sun Mar 16 2014 - 17:54:04 EST


Hi

On Sun, Mar 16, 2014 at 8:17 PM, Ben Hutchings <ben@xxxxxxxxxxxxxxx> wrote:
> On Sun, 2014-03-16 at 18:21 +0100, David Herrmann wrote:
> [...]
>> --- a/include/linux/netdevice.h
>> +++ b/include/linux/netdevice.h
>> @@ -74,6 +74,11 @@ void netdev_set_default_ethtool_ops(struct net_device *dev,
>> #define NET_RX_SUCCESS 0 /* keep 'em coming, baby */
>> #define NET_RX_DROP 1 /* packet dropped */
>>
>> +/* interface name assignment types */
>> +#define NET_NAME_ENUM 0 /* enumerated by kernel (default) */
>> +#define NET_NAME_USER 1 /* provided by user-space */
>> +#define NET_NAME_RENAMED 2 /* renamed by user-space */
> [...]
>
> I think these definitions should be put in a UAPI header. Even if the
> names don't end up being used by userland, that would make it clear that
> the numbers are a stable ABI.

I tried to follow addr_assign_type as closely as possible. The
NET_ADDR_* constants are only defined internally either. I am fine
with exporting the constants, just want to make sure there's no reason
to hide them that I'm not aware of.

Thanks
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/