Skip to content

ieee802154: migrate netdev_ieee802154_dst_filter to a common ieee802154#16576

Merged
MrKevinWeiss merged 4 commits intoRIOT-OS:masterfrom
jia200x:pr/netdev/migrate_dst_filter
Jun 29, 2021
Merged

ieee802154: migrate netdev_ieee802154_dst_filter to a common ieee802154#16576
MrKevinWeiss merged 4 commits intoRIOT-OS:masterfrom
jia200x:pr/netdev/migrate_dst_filter

Conversation

@jia200x
Copy link
Member

@jia200x jia200x commented Jun 21, 2021

Contribution description

This PR migrates netdev_ieee802154_dst_filter to ieee802154_dst_filter.
This not only makes it not dependent to netdev, but will help with Kconfig modelling since now netdev_ieee802154 can be represented as a pure netdev layer. I will add a follow up PR that shows this in action.

netdev_ieee802154_dst_filter is marked as deprecated and will be removed after 2022.01.

Testing procedure

Check that examples/gnrc_networking compiles for e.g nrf52840dk (with USEMODULE=nrf802154_netdev_legacy`) and confirm that pinging still works.

Issues/PRs references

None so far

@github-actions github-actions bot added Area: cpu Area: CPU/MCU ports Area: drivers Area: Device drivers Area: network Area: Networking Area: sys Area: System Platform: ARM Platform: This PR/issue effects ARM-based platforms labels Jun 21, 2021
@MrKevinWeiss MrKevinWeiss added this to the Release 2021.07 milestone Jun 21, 2021
@benpicco benpicco added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Jun 21, 2021
@github-actions github-actions bot added the Area: tests Area: tests and testing framework label Jun 22, 2021
@MrKevinWeiss
Copy link
Contributor

I pushed the changes and added unit tests, therefore can no longer ack... Hi @benpicco 👋

@jia200x jia200x force-pushed the pr/netdev/migrate_dst_filter branch from 0490335 to b7c3e1a Compare June 22, 2021 15:54
@jia200x
Copy link
Member Author

jia200x commented Jun 22, 2021

squashed

@MrKevinWeiss
Copy link
Contributor

Seems like some -Werror=strict-aliasing issue on the esp8266 I thought I fixed that but maybe you can take another look @jia200x

@jia200x jia200x force-pushed the pr/netdev/migrate_dst_filter branch from b7c3e1a to 9425f56 Compare June 23, 2021 08:55
@jia200x
Copy link
Member Author

jia200x commented Jun 23, 2021

The test is fine. I just changed the short address from uint16_t to network_uint16_t.

@MrKevinWeiss MrKevinWeiss added the Process: API change Integration Process: PR contains or issue proposes an API change. Should be handled with care. label Jun 23, 2021
@MrKevinWeiss
Copy link
Contributor

Please squash, murdock is happy now.

Comment on lines +415 to +416
int ieee802154_dst_filter(const uint8_t *mhr, uint16_t pan,
network_uint16_t short_addr, const eui64_t *ext_addr);
Copy link
Contributor

Choose a reason for hiding this comment

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

Just to clarify: pan is uint16_t but short_addr is network_uint16_t?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes :(
Unfortunately this is the way how it's presented in many ieee802154_xxx functions.

I would actually migrate everything to little endian values. We could the use all ieee802154_get_xxx operations without any kind of memcpy / reverse. But we would need to adapt many modules.

Copy link
Contributor

Choose a reason for hiding this comment

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

Lets keep it simple for now, the reversing issue is out of scope of this PR.

@jia200x
Copy link
Member Author

jia200x commented Jun 23, 2021

done!

@jia200x jia200x force-pushed the pr/netdev/migrate_dst_filter branch from 9425f56 to 48ef2ec Compare June 23, 2021 14:44
@MrKevinWeiss
Copy link
Contributor

I just saw #16576, maybe we can get 2 birds with one stone?

@jia200x
Copy link
Member Author

jia200x commented Jun 24, 2021

I just saw #16576, maybe we can get 2 birds with one stone?

I think it's #11191

Although they touch the same file, the mechanism has changed quite a lot since the SubMAC was introduced. The packet in practice is parsed before it gets to the frame filter. So, I think we should keep them separate.

@MrKevinWeiss
Copy link
Contributor

copy pasta 🤦

@MrKevinWeiss
Copy link
Contributor

Good good.

@MrKevinWeiss
Copy link
Contributor

ping @benpicco

Copy link
Contributor

@benpicco benpicco left a comment

Choose a reason for hiding this comment

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

Communication using short addresses still works between samr21-xpro and nrf52840dk

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: cpu Area: CPU/MCU ports Area: drivers Area: Device drivers Area: network Area: Networking Area: sys Area: System Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Platform: ARM Platform: This PR/issue effects ARM-based platforms Process: API change Integration Process: PR contains or issue proposes an API change. Should be handled with care.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants