Skip to content

cc2538_rf: default to netdev_ieee802154_submac#15534

Merged
fjmolinas merged 1 commit into
RIOT-OS:masterfrom
jia200x:pr/cc2538_rf_submac
Dec 8, 2020
Merged

cc2538_rf: default to netdev_ieee802154_submac#15534
fjmolinas merged 1 commit into
RIOT-OS:masterfrom
jia200x:pr/cc2538_rf_submac

Conversation

@jia200x

@jia200x jia200x commented Dec 1, 2020

Copy link
Copy Markdown
Member

Contribution description

Following #15132, this PR makes netdev_ieee802154_submac default for cc2538_rf. The basic driver doesn't support ACK handling and retransmissions, so the SubMAC fixes this lack.

Testing procedure

Compare ping statistics (with 1kb packets) for any cc2538_rf board between current master and this PR.

Issues/PRs references

#15132

@jia200x jia200x requested a review from fjmolinas December 1, 2020 12:23
@jia200x jia200x requested a review from smlng as a code owner December 1, 2020 12:23
@jia200x jia200x requested review from benpicco, maribu and miri64 December 1, 2020 12:23
@benpicco benpicco added Area: drivers Area: Device drivers 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 labels Dec 2, 2020
benpicco
benpicco previously approved these changes Dec 7, 2020

@fjmolinas fjmolinas left a comment

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.

If I compile without using docker (newer toolchain) I get the following:

/home/francisco/workspace/RIOT2/sys/net/link_layer/ieee802154/submac.c: In function 'ieee802154_set_state':
/home/francisco/workspace/RIOT2/sys/net/link_layer/ieee802154/submac.c:415:21: error: implicit conversion from 'enum <anonymous>' to 'ieee802154_submac_state_t' [-Werror=enum-conversion]
  415 |                     state == IEEE802154_STATE_IDLE
      |                     ^~~~~
/home/francisco/workspace/RIOT2/sys/net/link_layer/ieee802154/submac.c:419:64: error: implicit conversion from 'ieee802154_submac_state_t' to 'ieee802154_trx_state_t' [-Werror=enum-conversion]
  419 |         if ((res = ieee802154_radio_request_set_trx_state(dev, new_state)) < 0) {
      |                                                                ^~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [/home/francisco/workspace/RIOT2/Makefile.base:107: /home/francisco/workspace/RIOT2/examples/gnrc_networking/bin/openmote-b/ieee802154/submac.o] Error 1
make[2]: *** [/home/francisco/workspace/RIOT2/Makefile.base:30: ALL--/home/francisco/workspace/RIOT2/sys/net/link_layer/ieee802154] Error 2
make[2]: *** Waiting for unfinished jobs....

@benpicco benpicco dismissed their stale review December 8, 2020 13:14

issue with new gcc needs to be resolved

@fjmolinas

Copy link
Copy Markdown
Contributor

/home/francisco/workspace/RIOT2/sys/net/link_layer/ieee802154/submac.c: In function 'ieee802154_set_state':
/home/francisco/workspace/RIOT2/sys/net/link_layer/ieee802154/submac.c:415:21: error: implicit conversion from 'enum ' to 'ieee802154_submac_state_t' [-Werror=enum-conversion]
415 | state == IEEE802154_STATE_IDLE
| ^~~~~
/home/francisco/workspace/RIOT2/sys/net/link_layer/ieee802154/submac.c:419:64: error: implicit conversion from 'ieee802154_submac_state_t' to 'ieee802154_trx_state_t' [-Werror=enum-conversion]
419 | if ((res = ieee802154_radio_request_set_trx_state(dev, new_state)) < 0) {
| ^~~~~~~~~
cc1: all warnings being treated as errors
make[3]: *** [/home/francisco/workspace/RIOT2/Makefile.base:107: /home/francisco/workspace/RIOT2/examples/gnrc_networking/bin/openmote-b/ieee802154/submac.o] Error 1
make[2]: *** [/home/francisco/workspace/RIOT2/Makefile.base:30: ALL--/home/francisco/workspace/RIOT2/sys/net/link_layer/ieee802154] Error 2
make[2]: *** Waiting for unfinished jobs....

Seems this is unrelated to this PR though and should be fixed in master.

@fjmolinas

Copy link
Copy Markdown
Contributor

When built in docker and pinging with parameters ping6 -s 1024 -c 10 -i 170

  • master
2020-12-08 14:34:17,359 #  ping6 -s 1024 -c 10 -i 170 fe80::204:2519:1801:cca0
2020-12-08 14:34:19,886 #
2020-12-08 14:34:19,887 # --- fe80::204:2519:1801:cca0 PING statistics ---
2020-12-08 14:34:19,903 # 10 packets transmitted, 0 packets received, 100% packet loss

  • pr
2020-12-08 14:34:50,511 #  ping6 -s 1024 -c 10 -i 170 fe80::204:2519:1801:cca0
2020-12-08 14:34:50,670 # 1032 bytes from fe80::204:2519:1801:cca0%6: icmp_seq=0 ttl=64 rssi=191 dBm time=146.890 ms
2020-12-08 14:34:50,831 # 1032 bytes from fe80::204:2519:1801:cca0%6: icmp_seq=1 ttl=64 rssi=191 dBm time=149.028 ms
2020-12-08 14:34:51,007 # 1032 bytes from fe80::204:2519:1801:cca0%6: icmp_seq=2 ttl=64 rssi=191 dBm time=147.896 ms
2020-12-08 14:34:51,182 # 1032 bytes from fe80::204:2519:1801:cca0%6: icmp_seq=3 ttl=64 rssi=191 dBm time=147.283 ms
2020-12-08 14:34:51,342 # 1032 bytes from fe80::204:2519:1801:cca0%6: icmp_seq=4 ttl=64 rssi=191 dBm time=139.046 ms
2020-12-08 14:34:51,518 # 1032 bytes from fe80::204:2519:1801:cca0%6: icmp_seq=5 ttl=64 rssi=191 dBm time=142.993 ms
2020-12-08 14:34:51,679 # 1032 bytes from fe80::204:2519:1801:cca0%6: icmp_seq=6 ttl=64 rssi=191 dBm time=143.986 ms
2020-12-08 14:34:51,855 # 1032 bytes from fe80::204:2519:1801:cca0%6: icmp_seq=7 ttl=64 rssi=191 dBm time=150.631 ms
2020-12-08 14:34:52,030 # 1032 bytes from fe80::204:2519:1801:cca0%6: icmp_seq=8 ttl=64 rssi=191 dBm time=145.850 ms
2020-12-08 14:34:52,191 # 1032 bytes from fe80::204:2519:1801:cca0%6: icmp_seq=9 ttl=64 rssi=191 dBm time=137.350 ms
2020-12-08 14:34:52,191 #
2020-12-08 14:34:52,192 # --- fe80::204:2519:1801:cca0 PING statistics ---
2020-12-08 14:34:52,193 # 10 packets transmitted, 10 packets received, 0% packet loss
2020-12-08 14:34:52,206 # round-trip min/avg/max = 137.350/145.095/150.631 ms

So seems situation is for some reason worse than when the cc2538_radio_ops was introduced, more reason to get this in.

@fjmolinas

Copy link
Copy Markdown
Contributor

#15584 will take care of the compilation error, but for good measure we should wait for that one to get in before.

fjmolinas
fjmolinas previously approved these changes Dec 8, 2020

@fjmolinas fjmolinas left a comment

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.

ACK

@fjmolinas fjmolinas added the State: waiting for other PR State: The PR requires another PR to be merged first label Dec 8, 2020
@benpicco benpicco added Area: CI Area: Continuous Integration of RIOT components and removed State: waiting for other PR State: The PR requires another PR to be merged first Area: CI Area: Continuous Integration of RIOT components labels Dec 8, 2020
@fjmolinas fjmolinas added Area: CI Area: Continuous Integration of RIOT components and removed Area: CI Area: Continuous Integration of RIOT components labels Dec 8, 2020
@fjmolinas fjmolinas dismissed their stale review December 8, 2020 16:58

testing something with the lavel check

@fjmolinas fjmolinas left a comment

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.

re-ACK.

@fjmolinas fjmolinas merged commit ee80e5a into RIOT-OS:master Dec 8, 2020
@fjmolinas

Copy link
Copy Markdown
Contributor

Gooo! Thanks for the great work @jia200x !!

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

Labels

Area: drivers Area: Device drivers 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.

3 participants