Skip to content

Conversation

miri64
Copy link
Member

@miri64 miri64 commented May 1, 2017

Implements the neighbor cache component of the NIB (see NDP model), aimed to replace gnrc_ipv6_nc.

Depends on #6325 (merged) and #6767 (merged).

This PR is part of the network layer remodelling effort:
PR dependencies

@miri64 miri64 added GNRC Area: network Area: Networking Type: new feature The issue requests / The PR implemements a new feature for RIOT labels May 1, 2017
@miri64 miri64 requested a review from cgundogan May 1, 2017 18:46
@miri64 miri64 force-pushed the gnrc_ipv6_nib/feat/nc-component branch from 7080fa2 to 9148d06 Compare May 1, 2017 18:48
miri64 added a commit to miri64/RIOT that referenced this pull request May 1, 2017
miri64 added a commit to miri64/RIOT that referenced this pull request May 1, 2017
@miri64 miri64 added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR State: waiting for other PR State: The PR requires another PR to be merged first labels May 1, 2017
@miri64 miri64 force-pushed the gnrc_ipv6_nib/feat/nc-component branch from 5ba050a to 84535e5 Compare May 5, 2017 11:38
miri64 added a commit to miri64/RIOT that referenced this pull request May 5, 2017
@miri64
Copy link
Member Author

miri64 commented May 5, 2017

Rebased to current master and depending PRs.

miri64 added a commit to miri64/RIOT that referenced this pull request May 5, 2017
@miri64 miri64 added the CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable label May 5, 2017
miri64 added a commit to miri64/RIOT that referenced this pull request May 9, 2017
miri64 added a commit to miri64/RIOT that referenced this pull request May 16, 2017
miri64 added a commit to miri64/RIOT that referenced this pull request May 22, 2017
@miri64 miri64 force-pushed the gnrc_ipv6_nib/feat/nc-component branch from 607e21f to b614563 Compare June 9, 2017 17:45
miri64 added a commit to miri64/RIOT that referenced this pull request Jun 9, 2017
miri64 added a commit to miri64/RIOT that referenced this pull request Jun 9, 2017
@miri64
Copy link
Member Author

miri64 commented Jun 9, 2017

Rebased and adapted to changes in #6325. Since this was a little bit fiddly I also squashed

@miri64 miri64 force-pushed the gnrc_ipv6_nib/feat/nc-component branch from b614563 to 65ad5b5 Compare June 9, 2017 20:09
miri64 added a commit to miri64/RIOT that referenced this pull request Jun 9, 2017
@miri64
Copy link
Member Author

miri64 commented Jun 9, 2017

Rebased to current master and #6767.

memcpy(entry->l2addr, nib->l2addr, nib->l2addr_len);
entry->l2addr_len = nib->l2addr_len;
#endif
*state = nib;
Copy link
Member Author

Choose a reason for hiding this comment

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

This can use _nib_nc_get(), I know. Will port ASAP.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done.

@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 Jun 9, 2017
*
* @param[in] node On-link entry.
* @param[out] nce External representation of the neighbor cache
* representation.
Copy link
Member Author

Choose a reason for hiding this comment

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

Note to self: representation representation

@cgundogan
Copy link
Member

Looks good since my last review. Please squash.

@miri64 miri64 force-pushed the gnrc_ipv6_nib/feat/nc-component branch from 976b835 to 40be23b Compare October 6, 2017 09:33
@miri64
Copy link
Member Author

miri64 commented Oct 6, 2017

Squashed.

@cgundogan cgundogan added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR and removed CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Oct 6, 2017
@cgundogan
Copy link
Member

GO!

@cgundogan cgundogan merged commit 11baf13 into RIOT-OS:master Oct 6, 2017
@miri64 miri64 deleted the gnrc_ipv6_nib/feat/nc-component branch October 6, 2017 09:58
@miri64
Copy link
Member Author

miri64 commented Oct 6, 2017

\o/

1 similar comment
@miri64
Copy link
Member Author

miri64 commented Oct 6, 2017

\o/


DEBUG("nib: lookup ctx = %p, type = %u\n", (void *)ctx, type);
while (event != NULL) {
offset += event->event.offset;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this adding up the offsets of all events up until the matching one?
What is this function doing?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because the offset of an event is referring to the event before, not the absolute offset.

offset += event->event.offset;
if ((event->msg.type == type) &&
((ctx == NULL) || (event->msg.content.ptr == ctx))) {
return offset;
Copy link
Contributor

Choose a reason for hiding this comment

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

From my naive understanding I would expect

    return event->event.offset;

here

Copy link
Member Author

Choose a reason for hiding this comment

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

That would just give an arbritrary offset to the event of the event that fires before event.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: network Area: Networking CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR 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.

5 participants