Alexander Aring wrote:
> u8 head[100] = {};
What I mean is: I don't see the original code doing a memset on
"head", so I'm a bit puzzled why you have to do this now.
Was the original code broken by not zeroing "head" ? If yes,
that would be a bug fix, not a mere optimization.
Or did I overlook s
Hi Werner,
2013/7/24 Werner Almesberger
> Alexander Aring wrote:
> > u8 head[100] = {};
>
> What I mean is: I don't see the original code doing a memset on
> "head", so I'm a bit puzzled why you have to do this now.
>
> Was the original code broken by not zeroing "head" ? If yes,
> that would b
Signed-off-by: Alexander Aring
---
net/ieee802154/6lowpan.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index 8454b22..5de520b 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -565,9 +565,10 @@ st
From: David Hauweele
When a new 6lowpan fragment is received, a skbuff is allocated for
the reassembled packet. However when a 6lowpan packet compresses
link-local addresses based on link-layer addresses, the processing
function relies on the skb mac control block to find the related
link-layer a
Add function to uncompress multicast address.
This function split the uncompress function for a multicast address
in a seperate function.
To uncompress a multicast address is different than a other
non-multicasts addresses according to rfc6282.
Signed-off-by: Alexander Aring
---
net/ieee802154/
While we can assume that the memory is already be zero, we can drop some
memsets while parsing.
Signed-off-by: Alexander Aring
---
net/ieee802154/6lowpan.c | 10 --
1 file changed, 10 deletions(-)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index d231bef..286d7e9 10
Fix a little comment issue.
Number 2 is 10 in bits and 1 is 01.
Signed-off-by: Alexander Aring
---
net/ieee802154/6lowpan.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index 55e1fd5..1ec14ef 100644
--- a/net/ieee8021
Pointers _saddr and _daddr points to source and destination address.
Use this for a link-layer compression to get these addresses.
Signed-off-by: Alexander Aring
---
net/ieee802154/6lowpan.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/ieee802154/6lowpan.c b/net/ie
Next part of this patch series to fix uncompression of some addresses.
This patch doesn't fix the payload_length and parsing of traffic class.
v6:
- Add patch "6lowpan: fix magic number"
- Add patch "6lowpan: handle only real local link addresses"
- remove useless zero setting to head buffer in
This patch drop the pre and postcount calculation from the
lowpan_uncompress_addr function.
We use instead a switch case over address_mode value, it's easier
to understand what's going on there.
Signed-off-by: Alexander Aring
---
net/ieee802154/6lowpan.c | 151 +-
Handle context based address when a unspecific address is specified.
For other context based address we print a warning and drop the package
currently because we don't support it right now.
Signed-off-by: Alexander Aring
---
net/ieee802154/6lowpan.c | 54 +
Signed-off-by: Alexander Aring
---
net/ieee802154/6lowpan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index 1ec14ef..90b9b90 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -589,7 +589,7 @@ stati
Signed-off-by: Alexander Aring
---
net/ieee802154/6lowpan.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index 90b9b90..2399c8f 100644
--- a/net/ieee802154/6lowpan.c
+++ b/net/ieee802154/6lowpan.c
@@ -819,7 +819,8 @@ low
When we set it to zero, we can assume that the memory is already zero
while parsing.
Signed-off-by: Alexander Aring
---
net/ieee802154/6lowpan.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index 2399c8f..d231bef 100644
-
We don't handle the DAC bit currently, so I add a warning and drop the
package.
Signed-off-by: Alexander Aring
---
net/ieee802154/6lowpan.c | 24 +---
1 file changed, 13 insertions(+), 11 deletions(-)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index d26
Signed-off-by: Alexander Aring
---
net/ieee802154/6lowpan.h | 7 +--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/net/ieee802154/6lowpan.h b/net/ieee802154/6lowpan.h
index 4b8f917..a4a307b 100644
--- a/net/ieee802154/6lowpan.h
+++ b/net/ieee802154/6lowpan.h
@@ -83,8 +83,11 @@
We don't handle the CID bit currently, so I add a warning and drop the
package.
Signed-off-by: Alexander Aring
---
net/ieee802154/6lowpan.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/net/ieee802154/6lowpan.c b/net/ieee802154/6lowpan.c
index c711441..d26d22b 100644
Alexander Aring wrote:
> - memcpy(&(sa.hwaddr), saddr, 8);
> + memcpy(&(sa.hwaddr), saddr, IEEE802154_ADDR_LEN);
Nice. While we're at it, we don't need parentheses around sa.hwaddr.
- Werner
--
Se
Alexander Aring wrote:
> hdr.priority = ((tmp >> 2) & 0x0f);
> hdr.flow_lbl[0] = ((tmp << 6) & 0xC0) | ((tmp >> 2) & 0x30);
Some more opportinities to kill unnecessary parentheses :-)
(Just the outermost ones. The rest is fine.)
- Werner
--
Hi Werner,
On Wed, Jul 24, 2013 at 10:17:51AM -0300, Werner Almesberger wrote:
> Alexander Aring wrote:
> > - memcpy(&(sa.hwaddr), saddr, 8);
> > + memcpy(&(sa.hwaddr), saddr, IEEE802154_ADDR_LEN);
>
> Nice. While we're at it, we don't need parentheses around sa.hwaddr.
>
Tha
Alexander Aring wrote:
> +#define is_addr_link_local(a) (((a)->s6_addr16[0]) == htons(0xFE80) &&
> \
> + (((a)->s6_addr16[1]) == 0) && \
> + (((a)->s6_addr16[2]) == 0) && \
> + (((a)->s6_addr16[3]) == 0))
More parenthesis paranoia: the (a) is good and
Hi Werner,
On Wed, Jul 24, 2013 at 10:20:05AM -0300, Werner Almesberger wrote:
> Alexander Aring wrote:
> > hdr.priority = ((tmp >> 2) & 0x0f);
> > hdr.flow_lbl[0] = ((tmp << 6) & 0xC0) | ((tmp >> 2) & 0x30);
>
> Some more opportinities to kill unnecessary parentheses :-)
Hi Werner,
On Wed, Jul 24, 2013 at 10:25:03AM -0300, Werner Almesberger wrote:
> Alexander Aring wrote:
> > +#define is_addr_link_local(a) (((a)->s6_addr16[0]) == htons(0xFE80) &&
> > \
> > + (((a)->s6_addr16[1]) == 0) && \
> > + (((a)->s6_addr16[2]) == 0) && \
> > +
Alexander Aring wrote:
> Ok I will do this, but I know the traffic class has some other issues
> inside... should I try to fix this, too?
While you're at it ... why not ? :)
This is basically the long overdue major rewrite of all the compression
stuff, so fixing the traffic class would seem to fi
Alexander Aring wrote:
> So should I change it only for this or for all macros?
Since the pascalism is so widespread I usually point it out when I
see it but don't try to strip it from other people's code.
I would get rid of the other unnecessary parentheses, though. They
just make the code harde
Hi Werner,
On Wed, Jul 24, 2013 at 10:44:26AM -0300, Werner Almesberger wrote:
> Alexander Aring wrote:
> > So should I change it only for this or for all macros?
>
> Since the pascalism is so widespread I usually point it out when I
> see it but don't try to strip it from other people's code.
>
26 matches
Mail list logo