-
Notifications
You must be signed in to change notification settings - Fork 3k
Add Wi-SUN statistics interface #12766
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
Conversation
@mikaleppanen, thank you for your changes. |
if (!statistics) { | ||
return -1; | ||
} | ||
memcpy(stats, &statistics->phy_statistics, sizeof(phy_rf_statistics_s)); |
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.
nervous about to use that memcpy like at other functions. If structure type is same we can do just *stats = statistic->why_statistic;
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.
corrected
@amarjeet-arm @gkumaar @debdeep-arm @prashant-arm @umesh-arm Here is the statistics interface pull request to mbed-os |
return -1; | ||
} | ||
memcpy(stats, &statistics->phy_statistics, sizeof(phy_rf_statistics_s)); | ||
return 0; |
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.
This binds the nanostack API to mbedOS API and we can't make changes to any independently
I think we need to select the wanted statistics to Mbed OS API and just copy those not take everything at bulk
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.
corrected
uint32_t fhss_unknown_neighbor; /*<! FHSS TX to unknown neighbour counter. */ | ||
uint32_t fhss_channel_retry; /*<! FHSS channel retry counter. */ | ||
} mesh_fhss_statistics_t; | ||
|
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.
Take everything ever defined is not The best approach
We need to have some thought what are the needed and usable statistics this will make the messages huge
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.
removed not needed statistics
uint32_t buf_alloc; /*<! Buffer allocation count. */ | ||
uint32_t buf_headroom_realloc; /*<! Buffer headroom realloc count. */ | ||
uint32_t buf_headroom_shuffle; /*<! Buffer headroom shuffle count. */ | ||
uint32_t buf_headroom_fail; /*<! Buffer headroom failure count. */ |
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.
These are useless stats and We are missing more important stats that are available memory usage/max alloc fails
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.
removed
uint32_t mac_beacon_tx_count; /*<! MAC Beacon TX packet count. */ | ||
uint32_t mac_rx_drop_count; /*<! MAC RX packet drop count. */ | ||
uint32_t mac_tx_bytes; /*<! MAC TX bytes count. */ | ||
uint32_t mac_rx_bytes; /*<! MAC RX bytes count. */ |
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.
We have multiple levels of RX counts and byte counts I think one is enough
Mac_tx/rx_count
Mac_bx_tx/rx_count and
Mac_tx/rx/bytes
seems the best on that area
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.
corrected
uint32_t rpl_global_repair; /*<! RPL global repair count. */ | ||
uint32_t rpl_malformed_message; /*<! RPL malformed message count. */ | ||
uint32_t rpl_time_no_next_hop; /*<! RPL seconds without a next hop. */ | ||
uint32_t rpl_total_memory; /*<! RPL current memory usage total. */ |
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.
rpl memory amounts
parent ETX values are usable others not so much
parent IP address would be great but should it be in statistics API? or own getter
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.
corrected
uint32_t mac_tx_failed_count; /*<! MAC TX failed count. */ | ||
uint32_t mac_retry_count; /*<! MAC TX retry count. */ | ||
uint32_t mac_cca_attempts_count; /*<! MAC CCA attempts count. */ | ||
uint32_t mac_failed_cca_count; /*<! MAC failed CCA count. */ |
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.
Mac_failed_cca and tx failed are usable
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.
ok
uint32_t mac_tx_bytes; /*<! MAC TX bytes count. */ | ||
uint32_t mac_rx_bytes; /*<! MAC RX bytes count. */ | ||
uint32_t mac_tx_failed_count; /*<! MAC TX failed count. */ | ||
uint32_t mac_retry_count; /*<! MAC TX retry count. */ |
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.
mac_bc_tx_count, mac_tx_count and mac_retry_count are important.
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.
ok
*/ | ||
typedef struct { | ||
uint16_t mac_tx_queue_size; /*<! MAC TX queue current size. */ | ||
uint16_t mac_tx_queue_peak; /*<! MAC TX queue peak size. */ |
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.
We need to be able to set mac_tx_queue_peak and adapt_layer_tx_queue_peak to 0 if we want short term peak values.
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.
removed
Added network and MAC statistics to Wi-SUN interface.
Corrected review comments, please re-review. |
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.
OK for me
I'll try to schedule the CI job later today (as it uses different configuration, it can't run at the same time as master, making more difficult). |
CI started |
Test run: FAILEDSummary: 1 of 11 test jobs failed Failed test jobs:
|
test restarted |
@artokin Also ready for integration? |
Summary of changes
Added network, physical layer, MAC and FHSS statistics to Wi-SUN interface. There are new functions to enable/disable and read the statistics.
Impact of changes
None
Migration actions required
None
Documentation
None
Pull request type
Test results
Reviewers
@mikter @JarkkoPaso @artokin @juhhei01 @amarjeet-arm