-
Notifications
You must be signed in to change notification settings - Fork 32
[PPM-275] Replace CLIENT_BEACON_11K_REQUEST/RESPONSE on the standard one #1585
base: master
Are you sure you want to change the base?
[PPM-275] Replace CLIENT_BEACON_11K_REQUEST/RESPONSE on the standard one #1585
Conversation
According to the EMR2 specification (17.2.27 BeaconMetricsQuery) need to add h-field - Number of AP Channel Reports. Add new uint8_t variable between ssid and ap_channel_reports_list_length. Also add updated autogenerated files. https://jira.prplfoundation.org/browse/PPM-275 Signed-off-by: Vladyslav Tupikin <[email protected]>
Need to create new method for sending BEACON_METRICS_QUERY_MESSAGE to the agent. Create new method with filling up fields according to the EMR2 specification. Also autoformatting removed whitespace from 1 commentary. https://jira.prplfoundation.org/browse/PPM-275 Signed-off-by: Vladyslav Tupikin <[email protected]>
Need to replace code for creating vendor-specific message CLIENT_BEACON_11K_REQUEST on the new method for creating BEACON_METRICS_QUERY_MESSAGE. Replace code for case CHECK_11K_BEACON_MEASURE_CAP on the call send_beacon_metrics_query_msg(). Also autoformatting removed whitespace for commentary. https://jira.prplfoundation.org/browse/PPM-275 Signed-off-by: Vladyslav Tupikin <[email protected]>
Need to replace CLIENT_BEACON_11K_REQUEST vendor-specific message on the same easy mesh message. Replace code for creating CLIENT_BEACON_11K_REQUEST message on the method send_beacon_metrics_query_msg(). Also autoformating removed whitespace from the commentary. https://jira.prplfoundation.org/browse/PPM-275 Signed-off-by: Vladyslav Tupikin <[email protected]>
Need to replace creating vendor-specific message ACTION_CONTROL_CLIENT_BEACON_11K_REQUEST on the standard one. Replace creation of vendor-specific message on the forwarding standard BEACON_METRICS_QUERY_MESSAGE. https://jira.prplfoundation.org/browse/PPM-275 Signed-off-by: Vladyslav Tupikin <[email protected]>
Need to create method for handling BEACON_METRICS_QUERY_MESSAGE. Create method handle_beacon_metrics_query(). https://jira.prplfoundation.org/browse/PPM-275 Signed-off-by: Vladyslav Tupikin <[email protected]>
Need to add new method for creation BEACON_METRICS_RESPONSE_MESSAGE. Add create_beacon_metrics_response(). https://jira.prplfoundation.org/browse/PPM-275 Signed-off-by: Vladyslav Tupikin <[email protected]>
Need to modify RRM_Beacon_Response event processing by replacing creation of vendor-specific message on the standard one. Replace creation vendor-specific message ACTION_CONTROL_CLIENT_BEACON_11K_RESPONSE on the call of the new method create_beacon_metrics_response(). https://jira.prplfoundation.org/browse/PPM-275 Signed-off-by: Vladyslav Tupikin <[email protected]>
Nee to create handler for message BEACON_METRICS_RESPONSE_MESSAGE which coming from the monito. Create method handle_monitor_beacon_metrics_response() which receives data from the monitor and forwards it to the controller. https://jira.prplfoundation.org/browse/PPM-275 Signed-off-by: Vladyslav Tupikin <[email protected]>
Need to modify ACTION_CLI_CLIENT_BEACON_11K_REQUEST by replacing creation vendor-specific message to the standard one. Replace ACTION_CONTROL_CLIENT_BEACON_11K_REQUEST to BEACON_METRICS_QUERY_MESSAGE. https://jira.prplfoundation.org/browse/PPM-275 Signed-off-by: Vladyslav Tupikin <[email protected]>
41dffae
to
a95d340
Compare
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.
the PR looks good and I liked how you split the commits - much easier to review.
I gave some comments, but wanted to add comments that are communal to all code/commits:
- in commit messages:
replace x on y
should bereplace x with y
- many comments don't start with capitals - same for log prints
Would have approved the PR - but I see the tests are failing - the change might also require adjustments in the tests-flows - so not approving until the tests are fixed
@@ -505,3 +505,70 @@ bool son_actions::send_ap_config_renew_msg(ieee1905_1::CmduMessageTx &cmdu_tx, d | |||
|
|||
return result; | |||
} | |||
|
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.
I think the commit title doesn't stand for itself - would be really hard to differentiate this commit from other based on the title.
would expect the title to mention what is added (not just "method").
e.g.:
controller: son_actions: add beacon_metrics_query method
|
||
auto measurement_request = | ||
cmdu_tx.create(0, ieee1905_1::eMessageType::BEACON_METRICS_QUERY_MESSAGE); | ||
|
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.
line-space can be removed
(nitpick)
} | ||
|
||
auto tlvBeaconMtericsQuery = cmdu_tx.addClass<wfa_map::tlvBeaconMetricsQuery>(); | ||
|
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.
line-space can be removed
(nitpick)
// According to the 10.3.3 from EMR1 specification | ||
// reporting_detail_value should be 1 for minimize | ||
// the disruption potentially caused to the ongoing | ||
// traffic of the specified STA |
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.
// According to the 10.3.3 from EMR1 specification | |
// reporting_detail_value should be 1 for minimize | |
// the disruption potentially caused to the ongoing | |
// traffic of the specified STA | |
// According to the 10.3.3 from EMR1 specification reporting_detail_value should be 1 to | |
// minimize the disruption potentially caused to the ongoing traffic of the specified STA |
tlvBeaconMtericsQuery->ssid_length() = ssid.length(); | ||
|
||
if (!tlvBeaconMtericsQuery->alloc_ssid(ssid.length() + 1)) { | ||
LOG(ERROR) << "Failed allocage buffer for SSID"; |
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.
LOG(ERROR) << "Failed allocage buffer for SSID"; | |
LOG(ERROR) << "Failed to allocage buffer for SSID"; |
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.
and what about "allocage" -> "allocate"? 🙂
} | ||
|
||
auto beacon_metrics_response_tlv = cmdu_tx.addClass<wfa_map::tlvBeaconMetricsResponse>(); | ||
|
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.
line-space can be removed
(nitpick)
return false; | ||
} | ||
|
||
// TODO: Add filling up the correct data according to the specification. |
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.
it seems the monitor response and the forwarded message contain the exact same TLV: tlvBeaconMetricsResponse
.
do we, and if not - shouldn't we, support a full copy of a TLV?
@morantr might be able to answer this.
} | ||
|
||
auto beacon_metrics_request_tlv = cmdu_tx.addClass<wfa_map::tlvBeaconMetricsQuery>(); | ||
|
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.
line-space can be removed
(nitpick)
break; | ||
} | ||
beacon_metrics_request_tlv->associated_sta_mac() = cli_request->client_mac(); | ||
|
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.
line-space can be removed
(nitpick)
beacon_metrics_request_tlv->ssid_length() = beerocks::message::WIFI_SSID_MAX_LENGTH; | ||
|
||
if (!beacon_metrics_request_tlv->alloc_ssid(beerocks::message::WIFI_SSID_MAX_LENGTH)) { | ||
LOG(ERROR) << "Couldn't allocate memory for SSID."; | ||
isOK = false; | ||
break; | ||
} |
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.
beacon_metrics_request_tlv->ssid_length() = beerocks::message::WIFI_SSID_MAX_LENGTH; | |
if (!beacon_metrics_request_tlv->alloc_ssid(beerocks::message::WIFI_SSID_MAX_LENGTH)) { | |
LOG(ERROR) << "Couldn't allocate memory for SSID."; | |
isOK = false; | |
break; | |
} | |
beacon_metrics_request_tlv->ssid_length() = message::WIFI_SSID_MAX_LENGTH; | |
if (!beacon_metrics_request_tlv->alloc_ssid(message::WIFI_SSID_MAX_LENGTH)) { | |
LOG(ERROR) << "Couldn't allocate memory for SSID."; | |
isOK = false; | |
break; | |
} |
the file contains using namespace beerocks
so no need to explicitly specify it.
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.
changed to request-changes due to the test-flows not passing
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.
I reviewed only the first 4 commits and did not continue because it is clear to me that this PR breaks the functionality of the code.
I think you should close this PR and return to the planning phase. Some infrastructure needs to be added to the controller task infrastructure before even starting with replacing the beacon measurement message.
Also, I would not insert this kind of change without full steering test by QA.
@kantera800 @adam1985d
return false; | ||
} | ||
|
||
auto tlvBeaconMtericsQuery = cmdu_tx.addClass<wfa_map::tlvBeaconMetricsQuery>(); |
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.
auto tlvBeaconMtericsQuery = cmdu_tx.addClass<wfa_map::tlvBeaconMetricsQuery>(); | |
auto tlvBeaconMetricsQuery = cmdu_tx.addClass<wfa_map::tlvBeaconMetricsQuery>(); |
tlvBeaconMtericsQuery->ssid_length() = ssid.length(); | ||
|
||
if (!tlvBeaconMtericsQuery->alloc_ssid(ssid.length() + 1)) { | ||
LOG(ERROR) << "Failed allocage buffer for SSID"; |
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.
and what about "allocage" -> "allocate"? 🙂
|
||
if (tlvBeaconMtericsQuery->channel_number() != 255) { | ||
|
||
// If the value of Channel Number field is not set to 255, |
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.
I see that usually when you writing comments on the code, you start a new line although you still have a lot of space left, before exceeding the 100 characters line limit.
Please don't to it. Use the max characters you can before exceeding the limit.
It is like driving on 40 Km/h on a road with a limit of 110 Km/h.
Also, if you have "TODO" like on a few lines below, start the new line under the "TODO".
tlvBeaconMtericsQuery->associated_sta_mac() = sta_mac; | ||
tlvBeaconMtericsQuery->operating_class() = | ||
database.get_hostap_operating_class(tlvf::mac_from_string(bssid)); | ||
tlvBeaconMtericsQuery->channel_number() = database.get_node_channel(bssid); | ||
tlvBeaconMtericsQuery->bssid() = tlvf::mac_from_string(bssid); |
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.
I don't understand why you filled it as like we will always request measurement on the bssid that the station is connected to?
Optimal path request beacon measurements on other bssids, in other channels/operating classes.
measurement_request->params().measurement_mode = | ||
beerocks::MEASURE_MODE_ACTIVE; // son::eMeasurementMode11K "passive"/"active"/"table" | ||
measurement_request->params().channel = database.get_node_channel(bssid); | ||
measurement_request->params().op_class = | ||
database.get_hostap_operating_class(tlvf::mac_from_string(bssid)); | ||
measurement_request->params().rand_ival = beerocks:: | ||
BEACON_MEASURE_DEFAULT_RANDOMIZATION_INTERVAL; // random interval - specifies the upper bound of the random delay to be used prior to making the measurement, expressed in units of TUs [=1024usec] | ||
measurement_request->params().duration = beerocks:: | ||
BEACON_MEASURE_DEFAULT_ACTIVE_DURATION; // measurement duration, expressed in units of TUs [=1024usec] | ||
measurement_request->params().sta_mac = tlvf::mac_from_string(sta_mac); | ||
measurement_request->params().bssid = tlvf::mac_from_string(bssid); | ||
//measurement_request.params.use_optional_ssid = true; | ||
measurement_request->params().expected_reports_count = 1; |
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.
There are a lot of parameters that we use to send and now we don't. How do we make up for it?
Did you fixate these parameters to hard-coded value on the monitor side?
Please add a description of it on the commit message.
add_pending_mac(radio_mac, beerocks_message::ACTION_CONTROL_CLIENT_BEACON_11K_RESPONSE); | ||
TASK_LOG(DEBUG) << "requested beacon measurement request from sta: " << sta_mac | ||
<< " on bssid: " << bssid; | ||
|
||
son_actions::send_cmdu_to_agent(agent_mac, cmdu_tx, database, radio_mac); | ||
set_responses_timeout(BEACON_MEASURE_REQ_TIME_SPAN); |
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.
You removed the add_pending_ma
and the set_response_timeout
. So what will happen now the state machine of the task will continue without making sure that responses were received?
If this is something you have a solution for on this PR, please add a description for it on the commit message.
} | ||
request->params() = measurement_request; | ||
|
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 does not make any sense. There is a state on the task that set the measurement parameters, and you replaced it with calling to a function that sends measurement request only on the bssid that the client is connected to.
This will break the optimal path task.
As part of the issue for replacing vendor-specific messages on the standard one (PPM-273) need to replace next messages
on the standard one
Vendor-specific messages:
Easy-mesh messages: