Re: [PATCH bluetooth-next 2/3] ieee802154: add netns support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On 05/11/2016 05:28 PM, Stefan Schmidt wrote:
> Hello.
> 
> On 11/05/16 11:44, Alexander Aring wrote:
>> This patch adds netns support for 802.15.4 subsystem. Most parts are
>> copy&pasted from wireless subsystem, it has the identically userspace
>> API.
>>
>> Cc: Nicolas Dichtel <nicolas.dichtel@xxxxxxxxx>
>> Signed-off-by: Alexander Aring <aar@xxxxxxxxxxxxxx>
>> ---
>>   include/net/cfg802154.h   | 13 +++++++++
>>   include/net/nl802154.h    |  5 ++++
>>   net/ieee802154/core.c     | 70 ++++++++++++++++++++++++++++++++++++++++++++++-
>>   net/ieee802154/core.h     |  2 ++
>>   net/ieee802154/nl802154.c | 54 ++++++++++++++++++++++++++++++++----
>>   5 files changed, 138 insertions(+), 6 deletions(-)
>>
>> diff --git a/include/net/cfg802154.h b/include/net/cfg802154.h
>> index 171cd76..795ca40 100644
>> --- a/include/net/cfg802154.h
>> +++ b/include/net/cfg802154.h
>> @@ -219,9 +219,22 @@ struct wpan_phy {
>>         struct device dev;
>>   +    /* the network namespace this phy lives in currently */
>> +    possible_net_t _net;
>> +
>>       char priv[0] __aligned(NETDEV_ALIGN);
>>   };
>>   +static inline struct net *wpan_phy_net(struct wpan_phy *wpan_phy)
> 
> Hmm if you name the setter wpan_phy_net_set() you might ant to name the getter wpan_phy_net_get() and not only wpan_phy_ne().
> 

Took the naming from wireless stuff, see [0].

I would highly recommend to make similar naming stuff (but not 1:1 the
same). It's easier for maintenance changes from wireless which we want
to add into 802.15.4, the namespace stuff is an example which I think we
could really do the same.

In this case:

wiphy -> wpan_phy.

- Alex

[0] http://lxr.free-electrons.com/source/include/net/cfg80211.h#L3305
--
To unsubscribe from this list: send the line "unsubscribe linux-wpan" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux