6lowpan: trivial changes
Subsystems (3)
Alexander Aring
maintainerv3 cover 6lowpan: trivial changes
This patch series includes some trivial changes to prepare the 6lowpan stack for upcomming patch-series which mainly fix fragmentation according to rfc4944 and udp handling(which is currently broken).
Changes since v3:
- really fix intendation in patch 3/5
Changes since v2:
- change intendation in patch 3/5
- fix typo in 5/5 unecessary -> unnecessary
- add missing 6lowpan tag in cover-letter
Alexander Aring (5):
6lowpan: remove unnecessary ret variable 6lowpan: remove unnecessary check on err >= 0 6lowpan: use netdev_alloc_skb instead dev_alloc_skb 6lowpan: remove skb->dev assignment 6lowpan: remove unnecessary break
net/ieee802154/6lowpan.c | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-)
Signature · 1 line
1.8.4.1
A message that is not in the archive (sent off-list or not yet received): 1382952260-23174-1-git-send-email-alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
PATCH v3 1/5 6lowpan: remove unnecessary ret variable
--- net/ieee802154/6lowpan.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-)
net/ieee802154/6lowpan.c +2 -4
@@ -1120,7 +1120,7 @@ lowpan_fragment_xmit(struct sk_buff *skb, u8 *head, int mlen, int plen, int offset, int type) { struct sk_buff *frag; -int hlen, ret; +int hlen; hlen = (type ==LOWPAN_DISPATCH_FRAG1 ) ?LOWPAN_FRAG1_HEAD_SIZE :LOWPAN_FRAGN_HEAD_SIZE ;
@@ -1145,9 +1145,7 @@ lowpan_fragment_xmit(struct sk_buff *skb, u8 *head,lowpan_raw_dump_table (__func__," raw fragment dump" , frag->data, frag->len); - ret =dev_queue_xmit (frag); - -return ret; +return dev_queue_xmit (frag); } static int
Signature · 9 lines
1.8.4.1 ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
PATCH v3 3/5 6lowpan: use netdev_alloc_skb instead dev_alloc_skb
In reply to a message not in the archiveThis patch uses the netdev_alloc_skb instead dev_alloc_skb function and drops the seperate assignment to skb->dev.
--- net/ieee802154/6lowpan.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
net/ieee802154/6lowpan.c +2 -2
@@ -1127,12 +1127,12 @@ lowpan_fragment_xmit(struct sk_buff *skb, u8 *head,lowpan_raw_dump_inline (__func__,"6lowpan fragment header" , head, hlen); - frag =dev_alloc_skb (hlen + mlen + plen +IEEE802154_MFR_SIZE ); + frag =netdev_alloc_skb (skb->dev, + hlen + mlen + plen +IEEE802154_MFR_SIZE );if (!frag)return -ENOMEM ; frag->priority = skb->priority; - frag->dev = skb->dev;/* copy header, MFR and payload */ memcpy (skb_put (frag, mlen), skb->data, mlen);
Signature · 9 lines
1.8.4.1 ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
PATCH v3 4/5 6lowpan: remove skb->dev assignment
In reply to a message not in the archiveThis patch removes the assignment of skb->dev. We don't need it here because we use the netdev_alloc_skb_ip_align function which already sets the skb->dev.
--- net/ieee802154/6lowpan.c | 1 - 1 file changed, 1 deletion(-)
net/ieee802154/6lowpan.c +0 -1
@@ -785,7 +785,6 @@ lowpan_alloc_new_frame(struct sk_buff *skb, u16 len, u16 tag) goto skb_err; frame->skb->priority = skb->priority; - frame->skb->dev = skb->dev;/* reserve headroom for uncompressed ipv6 header */ skb_reserve (frame->skb,sizeof (struct ipv6hdr ));
Signature · 9 lines
1.8.4.1 ------------------------------------------------------------------------------ October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register > http://pubads.g.doubleclick.net/gampad/clk?id=60135991&iu=/4140/ostg.clktrk
Alexander Aring
maintainerPATCH v3 2/5 6lowpan: remove unnecessary check on err >= 0
In reply to Alexander AringThe err variable can only be zero in this case.
--- net/ieee802154/6lowpan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
net/ieee802154/6lowpan.c +1 -1
@@ -1179,7 +1179,7 @@ lowpan_skb_fragmentation(struct sk_buff *skb, struct net_device *dev) head[0 ] &= ~LOWPAN_DISPATCH_FRAG1 ; head[0 ] |=LOWPAN_DISPATCH_FRAGN ; -while ((payload_length - offset >0 ) && (err >=0 )) { +while (payload_length - offset >0 ) {int len =LOWPAN_FRAG_SIZE ; head[4 ] = offset /8 ;
Signature · 1 line
1.8.4.1
Alexander Aring
maintainerPATCH v3 5/5 6lowpan: remove unnecessary break
In reply to Alexander Aring--- net/ieee802154/6lowpan.c | 1 - 1 file changed, 1 deletion(-)
net/ieee802154/6lowpan.c +0 -1
@@ -440,7 +440,6 @@ lowpan_uncompress_udp_header(struct sk_buff *skb, struct udphdr *uh)default :pr_debug ("ERROR: unknown UDP format\n" ); goto err; -break ; } pr_debug("uncompressed UDP ports: src = %d, dst = %d\n",
Signature · 1 line
1.8.4.1
David Miller
maintainerFrom: Alexander Aring <[email protected]>
Date: Mon, 28 Oct 2013 10:24:15 +0100
Quoted 11 lines
This patch series includes some trivial changes to prepare the 6lowpan stack for upcomming patch-series which mainly fix fragmentation according to rfc4944 and udp handling(which is currently broken).
Changes since v3:
- really fix intendation in patch 3/5Changes since v2:
- change intendation in patch 3/5
- fix typo in 5/5 unecessary -> unnecessary
- add missing 6lowpan tag in cover-letter
Series applied, thanks.