* [PATCH net-next 1/3] 6lowpan: fix type of datagram size parameter
[not found] ` <1393744175-23739-1-git-send-email-alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2014-03-02 7:09 ` Alexander Aring
2014-03-02 7:09 ` [PATCH net-next 2/3] 6lowpan: remove initialization of tag value Alexander Aring
2014-03-02 7:09 ` [PATCH net-next 3/3] 6lowpan: use memcpy to set tag value in fraghdr Alexander Aring
2 siblings, 0 replies; 5+ messages in thread
From: Alexander Aring @ 2014-03-02 7:09 UTC (permalink / raw)
To: alex.bluesman.smirnov-Re5JQEeQqe8AvxtiuMwx3w
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Datagram size value is u16 because we convert it to host byte order
and we need to read it. Only the tag value belongs to __be16 type.
Signed-off-by: Alexander Aring <alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
net/ieee802154/reassembly.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ieee802154/reassembly.c b/net/ieee802154/reassembly.c
index eb5995e..4511fc2 100644
--- a/net/ieee802154/reassembly.c
+++ b/net/ieee802154/reassembly.c
@@ -35,7 +35,7 @@ static struct inet_frags lowpan_frags;
static int lowpan_frag_reasm(struct lowpan_frag_queue *fq,
struct sk_buff *prev, struct net_device *dev);
-static unsigned int lowpan_hash_frag(__be16 tag, __be16 d_size,
+static unsigned int lowpan_hash_frag(__be16 tag, u16 d_size,
const struct ieee802154_addr *saddr,
const struct ieee802154_addr *daddr)
{
--
1.9.0
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH net-next 2/3] 6lowpan: remove initialization of tag value
[not found] ` <1393744175-23739-1-git-send-email-alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-03-02 7:09 ` [PATCH net-next 1/3] 6lowpan: fix type of datagram size parameter Alexander Aring
@ 2014-03-02 7:09 ` Alexander Aring
2014-03-02 7:09 ` [PATCH net-next 3/3] 6lowpan: use memcpy to set tag value in fraghdr Alexander Aring
2 siblings, 0 replies; 5+ messages in thread
From: Alexander Aring @ 2014-03-02 7:09 UTC (permalink / raw)
To: alex.bluesman.smirnov-Re5JQEeQqe8AvxtiuMwx3w
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
The initialization of the tag value doesn't matter at begin of
fragmentation. This patch removes the initialization to zero.
Signed-off-by: Alexander Aring <alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
net/ieee802154/6lowpan_rtnl.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/net/ieee802154/6lowpan_rtnl.c b/net/ieee802154/6lowpan_rtnl.c
index c7bd8b5..178ffb9 100644
--- a/net/ieee802154/6lowpan_rtnl.c
+++ b/net/ieee802154/6lowpan_rtnl.c
@@ -519,7 +519,6 @@ static int lowpan_newlink(struct net *src_net, struct net_device *dev,
}
lowpan_dev_info(dev)->real_dev = real_dev;
- lowpan_dev_info(dev)->fragment_tag = 0;
mutex_init(&lowpan_dev_info(dev)->dev_list_mtx);
entry = kzalloc(sizeof(*entry), GFP_KERNEL);
--
1.9.0
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH net-next 3/3] 6lowpan: use memcpy to set tag value in fraghdr
[not found] ` <1393744175-23739-1-git-send-email-alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-03-02 7:09 ` [PATCH net-next 1/3] 6lowpan: fix type of datagram size parameter Alexander Aring
2014-03-02 7:09 ` [PATCH net-next 2/3] 6lowpan: remove initialization of tag value Alexander Aring
@ 2014-03-02 7:09 ` Alexander Aring
2 siblings, 0 replies; 5+ messages in thread
From: Alexander Aring @ 2014-03-02 7:09 UTC (permalink / raw)
To: alex.bluesman.smirnov-Re5JQEeQqe8AvxtiuMwx3w
Cc: netdev-u79uwXL29TY76Z2rM5mHXA, davem-fT/PcQaiUtIeIZ0/mPfg9Q,
linux-zigbee-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f
Signed-off-by: Alexander Aring <alex.aring-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
net/ieee802154/6lowpan_rtnl.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/net/ieee802154/6lowpan_rtnl.c b/net/ieee802154/6lowpan_rtnl.c
index 178ffb9..e472618 100644
--- a/net/ieee802154/6lowpan_rtnl.c
+++ b/net/ieee802154/6lowpan_rtnl.c
@@ -265,8 +265,7 @@ lowpan_skb_fragmentation(struct sk_buff *skb, struct net_device *dev)
/* first fragment header */
head[0] = LOWPAN_DISPATCH_FRAG1 | ((dgram_size >> 8) & 0x7);
head[1] = dgram_size & 0xff;
- head[2] = tag >> 8;
- head[3] = tag & 0xff;
+ memcpy(head + 2, &tag, sizeof(tag));
/* calc the nearest payload length(divided to 8) for first fragment
* which fits into a IEEE802154_MTU
--
1.9.0
------------------------------------------------------------------------------
Flow-based real-time traffic analytics software. Cisco certified tool.
Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer
Customize your own dashboards, set traffic alerts and generate reports.
Network behavioral analysis & security monitoring. All-in-one tool.
http://pubads.g.doubleclick.net/gampad/clk?id=126839071&iu=/4140/ostg.clktrk
^ permalink raw reply related [flat|nested] 5+ messages in thread