Skip to content

sys: net: Initial import of a simple data-forwarding MAC protocol (nomac)#1968

Merged
OlegHahm merged 2 commits intoRIOT-OS:masterfrom
miri64:basic_mac
Jan 14, 2015
Merged

sys: net: Initial import of a simple data-forwarding MAC protocol (nomac)#1968
OlegHahm merged 2 commits intoRIOT-OS:masterfrom
miri64:basic_mac

Conversation

@miri64
Copy link
Copy Markdown
Member

@miri64 miri64 commented Nov 7, 2014

This is basically an adapter translating netapi IPC calls into netdev function calls.

Depends on #1448 (merged) and #2027 (merged)

@miri64 miri64 added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Type: new feature The issue requests / The PR implemements a new feature for RIOT Area: network Area: Networking labels Nov 7, 2014
@miri64 miri64 added this to the Release NEXT MAJOR milestone Nov 7, 2014
@miri64 miri64 added the State: waiting for other PR State: The PR requires another PR to be merged first label Nov 7, 2014
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Nov 8, 2014

@Kijewski unittests on qemu-i386 say

2014-11-08 01:01:30.658450: basic_mac_tests.test_basic_mac_send_data_send (/home/martine/Repositories/RIOT-OS/RIOT/tests/unittests/tests-basic_mac/tests-basic_mac.c 171) exp 8 was 8

Can't compute =D

@Kijewski
Copy link
Copy Markdown
Contributor

Kijewski commented Nov 8, 2014

This happens when one does not implement macros properly. Please see miri64#8.

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Nov 11, 2014

Rebased

@miri64 miri64 mentioned this pull request Nov 12, 2014
miri64 added a commit to miri64/RIOT that referenced this pull request Nov 14, 2014
miri64 added a commit to miri64/RIOT that referenced this pull request Nov 14, 2014
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Nov 18, 2014

Added #2027 as dependency

@miri64 miri64 force-pushed the basic_mac branch 2 times, most recently from 99ec277 to 0f0d2ba Compare November 21, 2014 12:35
@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 Nov 21, 2014
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Nov 21, 2014

Rebased to #2027

miri64 added a commit to miri64/RIOT that referenced this pull request Nov 21, 2014
@haukepetersen
Copy link
Copy Markdown
Contributor

looking (very) fast over this, I think it looks quite well. One thing that came to my mind is maybe renaming the mac implementation slightly? I was thinking about something like mac_nomac or mac_none. This would give a nice structure for different MAC layers:

RIOTDIR/sys/net/link_layer/mac_nomac/xx.c
RIOTDIR/sys/net/link_layer/mac_tdma/xx.c
RIOTDIR/sys/net/link_layer/mac_fdma/xx.c
RIOTDIR/sys/net/link_layer/mac_ieee802154e/xx.c

What do you guys think?

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Nov 21, 2014

Apart from me needing to rename it everywhere I have basically no objections. I even can see the benefit of it :-)

@OlegHahm
Copy link
Copy Markdown
Member

Or rename link_layer into llc and create a new folder mac?

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Nov 21, 2014

llc standing for what?

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Nov 21, 2014

And isn't that counter-intuitive to your rational behind the directory hierarchy in RIOT?

@OlegHahm
Copy link
Copy Markdown
Member

The two sublayers of (data) link layer are logical link control and media access control and I would find it much easier to locate the protocol implementations that way.

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Nov 21, 2014

(rebased to master)

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.

Where is msg.type set?

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.

l89

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.

Somehow git grep gave some weird results yesterday.

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.

Please clarify.

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.

Never mind. I don't know what went wrong, but I overlooked the mentioned line.

@OlegHahm
Copy link
Copy Markdown
Member

Apart from the comments, I'm fine and think this is ready for squashing, but I would feel more comfortable if @haukepetersen or someone else could review, too.

@miri64 miri64 mentioned this pull request Jan 12, 2015
36 tasks
@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Jan 12, 2015

Addressed comments.

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Jan 12, 2015

@OlegHahm Was your last comment a request to squash?

@OlegHahm
Copy link
Copy Markdown
Member

If @haukepetersen agrees, yes.

@OlegHahm
Copy link
Copy Markdown
Member

To be clear: this is an ACK but I request a second reviewer.

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Jan 12, 2015

Then @haukepetersen should do so :D

@miri64 miri64 mentioned this pull request Jan 12, 2015
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would not make this parameter static, but allocate it on the nomac thread's stack and give it as parameter during initialization...

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.

@haukepetersen
Copy link
Copy Markdown
Contributor

done :-) Just some small remarks/proposals. As I see it, some parts or subject to change with the upcoming pkt_t and others -> so I would ack and merge this PR when comments are addressed and squashed and adapt to upcoming changes as we go...

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Jan 13, 2015

I addressed your proposals. Since a thread-local registry would require another API change to netdev (e.g. a context parameter to netdev_rcv_data_cb_t), I would suggest we merge this PR first and focus later on the thread-local registry.

@haukepetersen
Copy link
Copy Markdown
Contributor

Ok, sounds valid. ACK when squashed.

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Jan 13, 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 Jan 13, 2015
@OlegHahm
Copy link
Copy Markdown
Member

Kicked Travis.

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.

Doesn't exist!?

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.

Was it moved in the last few weeks? (it compiles locally)

@miri64
Copy link
Copy Markdown
Member Author

miri64 commented Jan 14, 2015

Rebased to master and adapted unittest includes to #2102.

OlegHahm added a commit that referenced this pull request Jan 14, 2015
sys: net: Initial import of a simple data-forwarding MAC protocol (nomac)
@OlegHahm OlegHahm merged commit 5926697 into RIOT-OS:master Jan 14, 2015
@miri64 miri64 deleted the basic_mac branch January 14, 2015 07:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: network Area: Networking Community: Hack'n'ACK candidate This PR is a candidate for review and discussion during one of RIOT's monthly Hack'n'ACK parties Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation 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.

6 participants