* [PATCH 0/2] Add support for ARPHRD_RAWIP @ 2013-10-30 9:11 Jukka Rissanen 2013-10-30 9:11 ` [PATCH 1/2] net: if_arp: add ARPHRD_RAWIP type Jukka Rissanen 2013-10-30 9:11 ` [PATCH 2/2] ipv6: Add checks for RAWIP ARP type Jukka Rissanen 0 siblings, 2 replies; 8+ messages in thread From: Jukka Rissanen @ 2013-10-30 9:11 UTC (permalink / raw) To: netdev Hi, This new type is needed in Bluetooth 6LoWPAN where raw IPv6 packets are transferred to/from the device. I used the same value (530) as some Android kernels (from Qualcomm) are using in order not to brake any user space programs. If this is not needed, I can certainly send a new patch version with next available value (519). Cheers, Jukka Jukka Rissanen (2): net: if_arp: add ARPHRD_RAWIP type ipv6: Add checks for RAWIP ARP type include/uapi/linux/if_arp.h | 1 + net/ipv6/addrconf.c | 14 +++++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) -- 1.7.11.7 ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 1/2] net: if_arp: add ARPHRD_RAWIP type 2013-10-30 9:11 [PATCH 0/2] Add support for ARPHRD_RAWIP Jukka Rissanen @ 2013-10-30 9:11 ` Jukka Rissanen 2013-10-30 21:25 ` David Miller 2013-10-30 9:11 ` [PATCH 2/2] ipv6: Add checks for RAWIP ARP type Jukka Rissanen 1 sibling, 1 reply; 8+ messages in thread From: Jukka Rissanen @ 2013-10-30 9:11 UTC (permalink / raw) To: netdev This is used when there is no L2 header before IP header. Example of this is Bluetooth 6LoWPAN network. The RAWIP header type value is already used in some Android kernels so same value is used here in order not to break userspace. Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com> --- include/uapi/linux/if_arp.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/uapi/linux/if_arp.h b/include/uapi/linux/if_arp.h index d7fea34..06fc69f 100644 --- a/include/uapi/linux/if_arp.h +++ b/include/uapi/linux/if_arp.h @@ -59,6 +59,7 @@ #define ARPHRD_LAPB 516 /* LAPB */ #define ARPHRD_DDCMP 517 /* Digital's DDCMP protocol */ #define ARPHRD_RAWHDLC 518 /* Raw HDLC */ +#define ARPHRD_RAWIP 530 /* Raw IP */ #define ARPHRD_TUNNEL 768 /* IPIP tunnel */ #define ARPHRD_TUNNEL6 769 /* IP6IP6 tunnel */ -- 1.7.11.7 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] net: if_arp: add ARPHRD_RAWIP type 2013-10-30 9:11 ` [PATCH 1/2] net: if_arp: add ARPHRD_RAWIP type Jukka Rissanen @ 2013-10-30 21:25 ` David Miller 2013-10-30 22:26 ` Marcel Holtmann 0 siblings, 1 reply; 8+ messages in thread From: David Miller @ 2013-10-30 21:25 UTC (permalink / raw) To: jukka.rissanen; +Cc: netdev From: Jukka Rissanen <jukka.rissanen@linux.intel.com> Date: Wed, 30 Oct 2013 11:11:10 +0200 > This is used when there is no L2 header before IP header. > Example of this is Bluetooth 6LoWPAN network. > > The RAWIP header type value is already used in some Android kernels > so same value is used here in order not to break userspace. > > Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com> I'm not applying patches like this until there is an actual user, and this therefore goes for patch #2 as well. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] net: if_arp: add ARPHRD_RAWIP type 2013-10-30 21:25 ` David Miller @ 2013-10-30 22:26 ` Marcel Holtmann 2013-10-31 4:27 ` David Miller 0 siblings, 1 reply; 8+ messages in thread From: Marcel Holtmann @ 2013-10-30 22:26 UTC (permalink / raw) To: David S. Miller; +Cc: Jukka Rissanen, netdev Hi Dave, >> This is used when there is no L2 header before IP header. >> Example of this is Bluetooth 6LoWPAN network. >> >> The RAWIP header type value is already used in some Android kernels >> so same value is used here in order not to break userspace. >> >> Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com> > > I'm not applying patches like this until there is an actual user, > and this therefore goes for patch #2 as well. patches for Bluetooth 6loWPAN have been posted to linux-bluetooth for review. So there is an actual user here. If you do not want to merge these patches at this point, that is totally fine. We can happily carry them through bluetooth-next and wireless-next trees as well. Posting them on netdev is mainly for checking that the changes we have to make outside the Bluetooth subsystem are in sync. So that they are reviewed and have been seen before. If you have any general objections to these assignments or changes, please let us now. Regards Marcel ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 1/2] net: if_arp: add ARPHRD_RAWIP type 2013-10-30 22:26 ` Marcel Holtmann @ 2013-10-31 4:27 ` David Miller 0 siblings, 0 replies; 8+ messages in thread From: David Miller @ 2013-10-31 4:27 UTC (permalink / raw) To: marcel; +Cc: jukka.rissanen, netdev From: Marcel Holtmann <marcel@holtmann.org> Date: Wed, 30 Oct 2013 23:26:37 +0100 > Posting them on netdev is mainly for checking that the changes we > have to make outside the Bluetooth subsystem are in sync. Changes without use context and examples cannot be reviewed. You have to provide those example users here, not on some external list for us to look at. ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH 2/2] ipv6: Add checks for RAWIP ARP type 2013-10-30 9:11 [PATCH 0/2] Add support for ARPHRD_RAWIP Jukka Rissanen 2013-10-30 9:11 ` [PATCH 1/2] net: if_arp: add ARPHRD_RAWIP type Jukka Rissanen @ 2013-10-30 9:11 ` Jukka Rissanen 2013-10-30 9:31 ` Alexander Aring 1 sibling, 1 reply; 8+ messages in thread From: Jukka Rissanen @ 2013-10-30 9:11 UTC (permalink / raw) To: netdev Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com> --- net/ipv6/addrconf.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index d6ff126..60bf947 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c @@ -1783,6 +1783,15 @@ static int addrconf_ifid_ip6tnl(u8 *eui, struct net_device *dev) return 0; } +static int addrconf_ifid_rawip(u8 *eui, struct net_device *dev) +{ + if (dev->addr_len != 8) + return -1; + memcpy(eui, dev->dev_addr, 8); + eui[0] ^= 2; + return 0; +} + static int ipv6_generate_eui64(u8 *eui, struct net_device *dev) { switch (dev->type) { @@ -1803,6 +1812,8 @@ static int ipv6_generate_eui64(u8 *eui, struct net_device *dev) return addrconf_ifid_ieee1394(eui, dev); case ARPHRD_TUNNEL6: return addrconf_ifid_ip6tnl(eui, dev); + case ARPHRD_RAWIP: + return addrconf_ifid_rawip(eui, dev); } return -1; } @@ -2681,7 +2692,8 @@ static void addrconf_dev_config(struct net_device *dev) (dev->type != ARPHRD_INFINIBAND) && (dev->type != ARPHRD_IEEE802154) && (dev->type != ARPHRD_IEEE1394) && - (dev->type != ARPHRD_TUNNEL6)) { + (dev->type != ARPHRD_TUNNEL6) && + (dev->type != ARPHRD_RAWIP)) { /* Alas, we support only Ethernet autoconfiguration. */ return; } -- 1.7.11.7 ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] ipv6: Add checks for RAWIP ARP type 2013-10-30 9:11 ` [PATCH 2/2] ipv6: Add checks for RAWIP ARP type Jukka Rissanen @ 2013-10-30 9:31 ` Alexander Aring 2013-10-30 10:15 ` Jukka Rissanen 0 siblings, 1 reply; 8+ messages in thread From: Alexander Aring @ 2013-10-30 9:31 UTC (permalink / raw) To: Jukka Rissanen; +Cc: netdev Hi Jukka, On Wed, Oct 30, 2013 at 11:11:11AM +0200, Jukka Rissanen wrote: > Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com> > --- > net/ipv6/addrconf.c | 14 +++++++++++++- > 1 file changed, 13 insertions(+), 1 deletion(-) > > diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c > index d6ff126..60bf947 100644 > --- a/net/ipv6/addrconf.c > +++ b/net/ipv6/addrconf.c > @@ -1783,6 +1783,15 @@ static int addrconf_ifid_ip6tnl(u8 *eui, struct net_device *dev) > return 0; > } > > +static int addrconf_ifid_rawip(u8 *eui, struct net_device *dev) > +{ > + if (dev->addr_len != 8) > + return -1; > + memcpy(eui, dev->dev_addr, 8); > + eui[0] ^= 2; > + return 0; > +} > + I think we have already a function like this, look for: static int addrconf_ifid_eui64(u8 *eui, struct net_device *dev) which is the same for ieee802154 6lowpan. Are there any issues why we can't use the same function here? - Alex ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH 2/2] ipv6: Add checks for RAWIP ARP type 2013-10-30 9:31 ` Alexander Aring @ 2013-10-30 10:15 ` Jukka Rissanen 0 siblings, 0 replies; 8+ messages in thread From: Jukka Rissanen @ 2013-10-30 10:15 UTC (permalink / raw) To: Alexander Aring; +Cc: netdev Hi Alexander, On 30.10.2013 11:31, Alexander Aring wrote: > Hi Jukka, > > On Wed, Oct 30, 2013 at 11:11:11AM +0200, Jukka Rissanen wrote: >> Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com> >> --- >> net/ipv6/addrconf.c | 14 +++++++++++++- >> 1 file changed, 13 insertions(+), 1 deletion(-) >> >> diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c >> index d6ff126..60bf947 100644 >> --- a/net/ipv6/addrconf.c >> +++ b/net/ipv6/addrconf.c >> @@ -1783,6 +1783,15 @@ static int addrconf_ifid_ip6tnl(u8 *eui, struct net_device *dev) >> return 0; >> } >> >> +static int addrconf_ifid_rawip(u8 *eui, struct net_device *dev) >> +{ >> + if (dev->addr_len != 8) >> + return -1; >> + memcpy(eui, dev->dev_addr, 8); >> + eui[0] ^= 2; >> + return 0; >> +} >> + > > I think we have already a function like this, look for: > > static int addrconf_ifid_eui64(u8 *eui, struct net_device *dev) > > which is the same for ieee802154 6lowpan. Are there any issues why we > can't use the same function here? No issues there, I can certainly prepare a patch that uses the addrconf_ifid_eui64() instead. -- Cheers, Jukka ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2013-10-31 4:27 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2013-10-30 9:11 [PATCH 0/2] Add support for ARPHRD_RAWIP Jukka Rissanen 2013-10-30 9:11 ` [PATCH 1/2] net: if_arp: add ARPHRD_RAWIP type Jukka Rissanen 2013-10-30 21:25 ` David Miller 2013-10-30 22:26 ` Marcel Holtmann 2013-10-31 4:27 ` David Miller 2013-10-30 9:11 ` [PATCH 2/2] ipv6: Add checks for RAWIP ARP type Jukka Rissanen 2013-10-30 9:31 ` Alexander Aring 2013-10-30 10:15 ` Jukka Rissanen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).