-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
nativenet: Port nativenet for netdev #1732
Conversation
2b25c99
to
abb67a1
Compare
abb67a1
to
3ef4122
Compare
3ef4122
to
80ea035
Compare
Rebased to master |
80ea035
to
ed5cbe9
Compare
ab486b6
to
beab588
Compare
@LudwigOrtmann poke? |
Ayeee |
@@ -96,6 +96,10 @@ ifneq (,$(filter ccn_lite,$(USEMODULE))) | |||
USEMODULE += crypto | |||
endif | |||
|
|||
ifneq (,$(filter nativenet,$(USEMODULE))) | |||
USEMODULE += netdev_base |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The change in https://github.com/RIOT-OS/RIOT/pull/1732/files#diff-2b35e3dab26520778e1991f7041d00a5R3 seems to imply it is still possible to use nativenet without netdev_base..?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c05d6f1 fixes that
I've got wget AND curl installed btw.
|
it says |
It's lying. |
I'll look into that tomorrow. |
But just by this error message I would presume it has something to do with a70ee0f. I don't do anything with neither curl nor wget. |
Maybe you mess up the environment ? |
Can you give me the output with the following patch? diff --git a/tests/netdev/tests/01-interaction.py b/tests/netdev/tests/01-interaction.py
index 3f2d66b..fb7037a 100755
--- a/tests/netdev/tests/01-interaction.py
+++ b/tests/netdev/tests/01-interaction.py
@@ -8,6 +8,7 @@
import os, sys, time
from pexpect import spawn, TIMEOUT, EOF
+import pprint
class Abort(Exception):
pass
@@ -17,9 +18,13 @@ board = os.environ.get('BOARD', 'native')
DEFAULT_TIMEOUT=5
def main():
+ pp = pprint.PrettyPrinter(indent=4)
+ pp.pprint(dict(os.environ))
receiver = spawn("make term", timeout=5, env={"SENDER": '0'})
+ receiver.logfile = sys.stdout
time.sleep(1)
sender = spawn("make term", timeout=5, env={"SENDER": '1'})
+ sender.logfile = sys.stdout
try:
receiver.expect(r"RIOT netdev test") |
(I did, off the record) |
f7b35a9
to
45d4cf0
Compare
@@ -206,7 +215,7 @@ int _native_marshall_ethernet(uint8_t *framebuf, radio_packet_t *packet) | |||
* Linux does this on its own, but it doesn't hurt to do it here. | |||
* As of now only tuntaposx needs this. */ | |||
if (data_len < ETHERMIN) { | |||
DEBUG("padding data! (%d -> ", data_len); | |||
DEBUG("padding data!(%d -> ", data_len); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that is part of the coding conventions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No. See dce54c4
#include "nativenet.h" | ||
|
||
#ifndef NETDEV_DEFAULT | ||
#define NETDEV_DEFAULT (&nativenet_default_dev) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm wondering about two things here:
- why not use it in
tests/netdev/main.c
? - wouldn't it make more sense to set this from the device?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- To the first point: Like I did here?
- To the second: Maybe, but that's only a matter of opinion IMHO
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(and here)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was wondering about https://github.com/RIOT-OS/RIOT/blob/master/tests/netdev/main.c#L41
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ad 2: sure, but if there is a possibility to not care about specific devices in the abstraction layer, it should be taken.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Anyway - 2 is not really part of this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
to 1: must have been drunk when I did this. 1 isn't really part of this PR either ;-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just do it ad 1 ;)
Sorry for commenting in commits... |
Fixed it anyways =) |
Quite elegantly so by use of reduction =) |
ACK |
(don't forget to squash) |
962cd87
to
bf21a9e
Compare
done and waiting for Travis |
Maybe I'll have another look ... ;) (just kidding) |
nativenet: Port nativenet for netdev
To test this, run
Depends on #1492:(it's merged)