Skip to content

ipv6_nc: add iterators#2721

Merged
miri64 merged 3 commits intoRIOT-OS:masterfrom
miri64:ipv6_nc/feat/iterators
Apr 30, 2015
Merged

ipv6_nc: add iterators#2721
miri64 merged 3 commits intoRIOT-OS:masterfrom
miri64:ipv6_nc/feat/iterators

Conversation

@miri64
Copy link
Copy Markdown
Member

@miri64 miri64 commented Mar 26, 2015

Adds iterators for the neighbor cache. Inspired by iterators in utlist.

@miri64 miri64 added Area: network Area: Networking Type: new feature The issue requests / The PR implemements a new feature for RIOT NSTF labels Mar 26, 2015
@miri64 miri64 added this to the Network Stack Task Force milestone Mar 26, 2015
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changing the inequality to prev < NG_IPV6_NC_SIZE + ncache might be preferable. In this case the cpu might cache the right hand side in one of its registers, hence computing it only once.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@haukepetersen
Copy link
Copy Markdown
Contributor

I don't like the use of the ITER... macros here. Except having to write 3 lines less of code for iterating (and no saving of code size whatsoever), these macros don't have any other benefit. So far we were able to keep RIOT largely free of function-style-macros, and I think we should keep it that way!

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Mar 26, 2015

This is an iterator macro, not a function-style-macro...

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Mar 26, 2015

Okay. I'll remove the macros.

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Mar 27, 2015

Done

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Apr 2, 2015

Rebased to current master and adapted shell commands for the iterators (adds commands for listing neighbors and routers)

@OlegHahm
Copy link
Copy Markdown
Member

OlegHahm commented Apr 2, 2015

I think this PR does a little bit more than its description indicates.

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Apr 2, 2015

I don't think so, but please tell me what is too much.

@OlegHahm
Copy link
Copy Markdown
Member

OlegHahm commented Apr 2, 2015

I was referring mostly to the shell command.

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Apr 2, 2015

That's just extends the shell command by this particular functionality in this PR. I wanted to add this in #2583 already, but I wanted to keep the dependencies of that one low, so I retrofitted it in here. In light of #2755 it might be a good idea however to make ncache [list] and ncache add|del two separate commands ;-)

@OlegHahm OlegHahm assigned cgundogan and unassigned OlegHahm Apr 9, 2015
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Apr 21, 2015

Ping?

@OlegHahm
Copy link
Copy Markdown
Member

ACK

@OlegHahm OlegHahm added the CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable label Apr 29, 2015
@miri64 miri64 force-pushed the ipv6_nc/feat/iterators branch from ccc6e3c to 188c1a4 Compare April 29, 2015 19:23
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Apr 29, 2015

Squashed

@miri64 miri64 removed the CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable label Apr 29, 2015
miri64 added a commit that referenced this pull request Apr 30, 2015
@miri64 miri64 merged commit 4741a01 into RIOT-OS:master Apr 30, 2015
@miri64 miri64 deleted the ipv6_nc/feat/iterators branch April 30, 2015 06:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: network Area: Networking Type: new feature The issue requests / The PR implemements a new feature for RIOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants