Skip to content

gnrc_netif: Enable RX and TX complete events after netdev init#9467

Merged
PeterKietzmann merged 1 commit intoRIOT-OS:masterfrom
jnohlgard:pr/gnrc_netif-netdev-flags
Jul 9, 2018
Merged

gnrc_netif: Enable RX and TX complete events after netdev init#9467
PeterKietzmann merged 1 commit intoRIOT-OS:masterfrom
jnohlgard:pr/gnrc_netif-netdev-flags

Conversation

@jnohlgard
Copy link
Copy Markdown
Member

Contribution description

gnrc_netif expects NETOPT_RX_END_IRQ to be enabled by default, or else no packets will be received. All current netdev drivers enable some of these flags by default, but it seems hacky to depend on flag default values. With this change, the device drivers can be simplified and the preprocessor conditional on MODULE_NETSTATS_L2 for NETOPT_TX_END_IRQ can be removed from the device drivers as well.

Not sure how the other network stacks may be affected so there are no changes to the netdev device drivers in this PR.

Issues/PRs references

@jnohlgard jnohlgard added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: network Area: Networking GNRC CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Jun 29, 2018
@jnohlgard jnohlgard added this to the Release 2018.07 milestone Jun 29, 2018
@jnohlgard jnohlgard requested a review from miri64 June 29, 2018 20:00
Copy link
Copy Markdown
Member

@PeterKietzmann PeterKietzmann left a comment

Choose a reason for hiding this comment

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

ACK from my side. Would like to wait for @miri64 before merging

Copy link
Copy Markdown
Member

@PeterKietzmann PeterKietzmann left a comment

Choose a reason for hiding this comment

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

Did a routine test, pinging couple of thousand times between two iotlab-m3 nodes on the tested -> l2 netstats output looks as expected

@PeterKietzmann PeterKietzmann merged commit 15b0fe4 into RIOT-OS:master Jul 9, 2018
static const netopt_enable_t enable = NETOPT_ENABLE;
int res = dev->driver->set(dev, NETOPT_RX_END_IRQ, &enable, sizeof(enable));
if (res < 0) {
LOG_ERROR("gnrc_netif: enable NETOPT_RX_END_IRQ failed: %d\n", res);
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.

Couldn't that have been DEBUG? I now get this error message every time on native.

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.

See #9525

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.

You're right, DEBUG is probably better

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: 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.

4 participants