6lowpan: few changes to help with backports
cover 6lowpan: few changes to help with backports
Here's a few changes that can help automate the backport of 6lowpan. I've been carrying them around for a while, I think its best to just merge these upstream as its nothing controversial.
Luis R. Rodriguez (3):
6lowpan: add helper to get 6lowpan namespace
6lowpan: make lowpan_cb static
6lowpan: include net/net_namespace.h on 6lowpan namepsace header
include/net/6lowpan.h | 1 + include/net/net_namespace.h | 15 ++++++++++++++ net/ieee802154/reassembly.c | 48 +++++++++++++++++++++++++++++---------------- 3 files changed, 47 insertions(+), 17 deletions(-)
Signature · 1 line
1.9.1
PATCH 1/3 6lowpan: add helper to get 6lowpan namespace
From: "Luis R. Rodriguez" <mcgrof-IBi9RG/[email protected]>
This will simplify the new reassembly backport
with no code changes being required.
--- include/net/net_namespace.h | 15 +++++++++++++++ net/ieee802154/reassembly.c | 46 +++++++++++++++++++++++++++++---------------- 2 files changed, 45 insertions(+), 16 deletions(-)
include/net/net_namespace.h +15 -0
@@ -373,6 +373,21 @@ static inline void rt_genid_bump_ipv6(struct net *net) }#endif +#if IS_ENABLED (CONFIG_IEEE802154_6LOWPAN ) +static inline struct netns_ieee802154_lowpan * +net_ieee802154_lowpan (struct net *net) +{ +return &net->ieee802154_lowpan; +} +#else +static inline struct netns_ieee802154_lowpan * +net_ieee802154_lowpan (struct net *net) +{ +return NULL ; +} +#endif + +/* For callers who don't really care about whether it's IPv4 or IPv6 */ static inline void rt_genid_bump_all (struct net *net) {
net/ieee802154/reassembly.c +30 -16
111 lines not on this page · raw message
Signature · 9 lines
1.9.1 ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech
Re: [PATCH 1/3] 6lowpan: add helper to get 6lowpan namespace
include/net/net_namespace.h static inline void rt_genid_bump_ipv6(struct net *net) · line 388
Quoted 9 lines · Luis R. Rodriguez
include/net/net_namespace.h +8
-0+#if IS_ENABLED (CONFIG_IEEE802154_6LOWPAN ) +#else +static inline struct netns_ieee802154_lowpan * +net_ieee802154_lowpan (struct net *net) +{ +return NULL ; +} +#endif
Why would that be needed? If nobody compiles 802.15.4 then it seems nothing should reference it?
johannes
Alexander Aring
maintainerRe: [PATCH 1/3] 6lowpan: add helper to get 6lowpan namespace
Hi,
Quoted 15 lines · Johannes Berg
include/net/net_namespace.h static inline void rt_genid_bump_ipv6(struct net *net) · line 388
Quoted 9 lines · Luis R. Rodriguez
include/net/net_namespace.h +8
-0+#if IS_ENABLED (CONFIG_IEEE802154_6LOWPAN ) +#else +static inline struct netns_ieee802154_lowpan * +net_ieee802154_lowpan (struct net *net) +{ +return NULL ; +} +#endif Why would that be needed? If nobody compiles 802.15.4 then it seems nothing should reference it?
Indeed I think this is unnecessary, also.
- Alex
Re: [PATCH 1/3] 6lowpan: add helper to get 6lowpan namespace
Quoted 18 lines · Alexander Aring
Hi,
Quoted 15 lines · Johannes Berg
include/net/net_namespace.h static inline void rt_genid_bump_ipv6(struct net *net) · line 388
Quoted 9 lines · Luis R. Rodriguez
include/net/net_namespace.h +8
-0+#if IS_ENABLED (CONFIG_IEEE802154_6LOWPAN ) +#else +static inline struct netns_ieee802154_lowpan * +net_ieee802154_lowpan (struct net *net) +{ +return NULL ; +} +#endif Why would that be needed? If nobody compiles 802.15.4 then it seems nothing should reference it?
Quoted 1 line
Indeed I think this is unnecessary, also.
I wanted to be sure, and I was not. Right now 6lowpan does not depend on CONFIG_NET_NS, is this intentional? I think its fine without it but I was not sure.
Luis
Re: [PATCH 1/3] 6lowpan: add helper to get 6lowpan namespace
Quoted 13 lines · Luis R. Rodriguez
Quoted 13 lines
Quoted 13 lines
include/net/net_namespace.h static inline void rt_genid_bump_ipv6(struct net *net) · line 388
Quoted 9 lines
include/net/net_namespace.h +8
-0+#if IS_ENABLED (CONFIG_IEEE802154_6LOWPAN ) +#else +static inline struct netns_ieee802154_lowpan * +net_ieee802154_lowpan (struct net *net) +{ +return NULL ; +} +#endif Why would that be needed? If nobody compiles 802.15.4 then it seems nothing should reference it?
Quoted 5 lines
Quoted 1 line
Indeed I think this is unnecessary, also.
I wanted to be sure, and I was not. Right now 6lowpan does not depend on
CONFIG_NET_NS, is this intentional? I think its fine without it but I was not sure.
I fail to see how !CONFIG_LOWPAN is related CONFIG_NET_NS?
johannes
Alexander Aring
maintainerRe: [PATCH 1/3] 6lowpan: add helper to get 6lowpan namespace
Quoted 15 lines · Johannes Berg
Quoted 13 lines · Luis R. Rodriguez
Quoted 13 lines
Quoted 13 lines
include/net/net_namespace.h static inline void rt_genid_bump_ipv6(struct net *net) · line 388
Quoted 9 lines
include/net/net_namespace.h +8
-0+#if IS_ENABLED (CONFIG_IEEE802154_6LOWPAN ) +#else +static inline struct netns_ieee802154_lowpan * +net_ieee802154_lowpan (struct net *net) +{ +return NULL ; +} +#endif Why would that be needed? If nobody compiles 802.15.4 then it seems nothing should reference it?
Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Indeed I think this is unnecessary, also.
I wanted to be sure, and I was not. Right now 6lowpan does not depend on
CONFIG_NET_NS, is this intentional? I think its fine without it but I was not sure.I fail to see how !CONFIG_LOWPAN is related
CONFIG_NET_NS?
mhh, IEEE802154_6LOWPAN depends on IPV6 and I think IPV6 is related to CONFIG_NET_NS.
- Alex
Re: [PATCH 1/3] 6lowpan: add helper to get 6lowpan namespace
Quoted 22 lines · Alexander Aring
Quoted 21 lines · Johannes Berg
Quoted 18 lines · Luis R. Rodriguez
Quoted 13 lines
Quoted 4 lines
Quoted 4 lines
include/net/net_namespace.h +3
-0+#if IS_ENABLED (CONFIG_IEEE802154_6LOWPAN ) +#else +static inline struct netns_ieee802154_lowpan *Quoted 9 lines
include/net/net_namespace.h static inline void rt_genid_bump_ipv6(struct net *net) · line 388
Quoted 5 lines
include/net/net_namespace.h +5
-0+net_ieee802154_lowpan(struct net *net) +{ +return NULL ; +} +#endif Why would that be needed? If nobody compiles 802.15.4 then it seems nothing should reference it?
Quoted 1 line
Indeed I think this is unnecessary, also.
I wanted to be sure, and I was not. Right now 6lowpan does not depend on
CONFIG_NET_NS, is this intentional? I think its fine without it but I was not sure.
Quoted 5 lines
Quoted 2 lines
I fail to see how !CONFIG_LOWPAN is related
CONFIG_NET_NS?mhh,
IEEE802154_6LOWPANdepends on IPV6 and I think IPV6 is related toCONFIG_NET_NS.
Just test compiled IEEE802154_6LOWPAN without NET_NS and then also disabled IPV6 and it compiles, IEEE802154_6LOWPAN already depends on IPV6.
Luis
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
Re: [PATCH 1/3] 6lowpan: add helper to get 6lowpan namespace
In reply to Johannes BergQuoted 15 lines · Johannes Berg
Quoted 13 lines · Luis R. Rodriguez
Quoted 13 lines
Quoted 13 lines
include/net/net_namespace.h static inline void rt_genid_bump_ipv6(struct net *net) · line 388
Quoted 9 lines
include/net/net_namespace.h +8
-0+#if IS_ENABLED (CONFIG_IEEE802154_6LOWPAN ) +#else +static inline struct netns_ieee802154_lowpan * +net_ieee802154_lowpan (struct net *net) +{ +return NULL ; +} +#endif Why would that be needed? If nobody compiles 802.15.4 then it seems nothing should reference it?
Quoted 7 lines
Quoted 5 lines
Quoted 1 line
Indeed I think this is unnecessary, also.
I wanted to be sure, and I was not. Right now 6lowpan does not depend on
CONFIG_NET_NS, is this intentional? I think its fine without it but I was not sure.I fail to see how !CONFIG_LOWPAN is related
CONFIG_NET_NS?
I concerned about the inverse but I just test compiled it and it seems fine, will send a follow up to nuke this hunk.
Luis
------------------------------------------------------------------------------
Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform
http://p.sf.net/sfu/ExoPlatform
PATCH 2/3 6lowpan: make lowpan_cb static
In reply to Luis R. RodriguezFrom: "Luis R. Rodriguez" <mcgrof-IBi9RG/[email protected]>
--- net/ieee802154/reassembly.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ieee802154/reassembly.c +1 -1
@@ -36,7 +36,7 @@ struct lowpan_frag_info {u8 d_offset; }; -struct lowpan_frag_info *lowpan_cb (struct sk_buff *skb) +static struct lowpan_frag_info *lowpan_cb (struct sk_buff *skb) {return (struct lowpan_frag_info *)skb->cb; }
Signature · 9 lines
1.9.1 ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech
PATCH 3/3 6lowpan: include net/net_namespace.h on 6lowpan namepsace header
In reply to Luis R. RodriguezFrom: "Luis R. Rodriguez" <mcgrof-IBi9RG/[email protected]>
Don't rely on driver files or other headers having this file included.
--- include/net/6lowpan.h | 1 + 1 file changed, 1 insertion(+)
include/net/6lowpan.h +1 -0
@@ -54,6 +54,7 @@#define __6LOWPAN_H__#include <net/ipv6.h> +#include <net/net_namespace.h> #define UIP_802154_SHORTADDR_LEN 2/* compressed ipv6 address length */ #define UIP_IPH_LEN 40/* ipv6 fixed header size */
Signature · 9 lines
1.9.1 ------------------------------------------------------------------------------ Learn Graph Databases - Download FREE O'Reilly Book "Graph Databases" is the definitive new guide to graph databases and their applications. Written by three acclaimed leaders in the field, this first edition is now available. Download your free book today! http://p.sf.net/sfu/NeoTech
David Miller
maintainerFrom: "Luis R. Rodriguez" <[email protected]>
Date: Thu, 17 Apr 2014 18:22:53 -0700
Quoted 3 lines
Here's a few changes that can help automate the backport of 6lowpan. I've been carrying them around for a while, I think its best to just merge these upstream as its nothing controversial.
Series applied.