Skip to content
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

gnrc nettype: always include all nettypes #4235

Closed
wants to merge 1 commit into from

Conversation

OlegHahm
Copy link
Member

@OlegHahm OlegHahm commented Nov 8, 2015

Even if an application cannot process a certain protocol, it might be able to handle it somehow.

Even if an application cannot process a certain protocol, it might be able to handle it somehow.
@OlegHahm OlegHahm added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: network Area: Networking labels Nov 8, 2015
@miri64
Copy link
Member

miri64 commented Nov 8, 2015

Can you chalets the buildsizes please? Will explain tomorrow.

@miri64 miri64 added the Discussion: RFC The issue/PR is used as a discussion starting point about the item of the issue/PR label Nov 8, 2015
@miri64
Copy link
Member

miri64 commented Nov 8, 2015

it might be able to handle it somehow.

For this demux_ctx exist.

@OlegHahm
Copy link
Member Author

OlegHahm commented Nov 8, 2015

What if there is an Ethertype set to IPv6 in a L2 packet for instance? And what about #4189 (which was the reason for me to introduce this)?

@OlegHahm
Copy link
Member Author

OlegHahm commented Nov 8, 2015

About 32 bytes more ROM usage and 8 bytes more RAM usage on Cortex-M platforms.

@miri64
Copy link
Member

miri64 commented Nov 8, 2015

What if there is an Ethertype set to IPv6 in a L2 packet for instance? And what about #4189 (which was the reason for me to introduce this)?

GNRC_NETTYPE_UNDEF should suffice for both cases (in #4189 we can make this easy to read by defining a define checking the whose value is either GNRC_NETTYPE_UNDEF or GNRC_NETTYPE_UDP). The problem is, that the size of the array for storing the gnrc_netreg is linked to GNRC_NETTYPE_NUMOF so we would disregard this low-key optimization for this very little bit of comfort in gnrc-internal programming.

@OlegHahm
Copy link
Member Author

OlegHahm commented Nov 9, 2015

I have to admit that I don't like this, but cannot think of another solution right now (except for ugly ones). I don't understand your solution for #4189 though, can you make a proposal?

@OlegHahm OlegHahm closed this Nov 9, 2015
@miri64
Copy link
Member

miri64 commented Nov 9, 2015

I discussed this with @emmanuelsearch and @haukepetersen today, and we came to the decission that your solution wouldn't really hurt that much: As you've said the additional RAM usage is minimal (though I'm not quite sure which app you mean). On the plus side it would make a lot of code easier to read, so let's go for it.

@miri64 miri64 reopened this Nov 9, 2015
@miri64 miri64 added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Nov 9, 2015
@miri64
Copy link
Member

miri64 commented Nov 9, 2015

ACK if OP is okay with reopening this PR and Travis is happy.

@OlegHahm
Copy link
Member Author

OlegHahm commented Nov 9, 2015

Oops, sorry, I think I tested with gnrc_border_router. So, it's probably only the RAM overhead for one additional nettype (UDP) in this case.

@miri64
Copy link
Member

miri64 commented Nov 27, 2015

Did you re-test with other set-ups @OlegHahm?

@OlegHahm
Copy link
Member Author

Not yet. Will do ASAP.

@OlegHahm OlegHahm modified the milestone: Release 2016.03 Dec 7, 2015
@miri64
Copy link
Member

miri64 commented Jan 23, 2016

Any news here?

@OlegHahm
Copy link
Member Author

Nope.

@miri64
Copy link
Member

miri64 commented Jan 23, 2016

Then I would like to close this PR, since I imagine it to be bigger for more than one nettype.

@miri64 miri64 closed this Jan 23, 2016
@miri64 miri64 added the State: archived State: The PR has been archived for possible future re-adaptation label Jan 23, 2016
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 Discussion: RFC The issue/PR is used as a discussion starting point about the item of the issue/PR State: archived State: The PR has been archived for possible future re-adaptation Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants