This repository was archived by the owner on Sep 7, 2020. It is now read-only.
Conversation
15bd0f7 to
3bfd26a
Compare
a8c06d6 to
c7b9267
Compare
kantera800
reviewed
Jul 30, 2020
35e63f8 to
07544ab
Compare
07544ab to
79d6ee7
Compare
morantr
approved these changes
Jul 30, 2020
79d6ee7 to
88b33b5
Compare
The type of the mac address parameter is incorrect. Changed sta_mac from char[6] to uint8_t[6]. PPM-5. Signed-off-by: Itay Elenzweig <itayx.elenzweig@intel.com> Signed-off-by: Adam Dov <adamx.dov@intel.com>
- In client_set_client changed incoming type from INT_ARG to STRING_ARG. To use parameters as optional parameters, we need to retrieve them from the CLI as strings and convert them to integers. - Added int conversion in the client_set_client LOG print. To print the incoming values in client_set_client, need to convert them to type int, otherwise, they will be printed as Char. - Added tlvf::mac_to_string in the client_get_client LOG print. The received mac address needs to be converted to a readable format to be printed. PPM-5. Signed-off-by: Itay Elenzweig <itayx.elenzweig@intel.com Signed-off-by: Adam Dov <adamx.dov@intel.com>
Changed returning error values in the code to a negative values as expected by the BML. PPM-5. Signed-off-by: Itay Elenzweig <itayx.elenzweig@intel.com> Signed-off-by: Adam Dov <adamx.dov@intel.com>
Removed excess spaces from selected-bands debug print. PPM-5. Signed-off-by: Adam Dov <adamx.dov@intel.com>
The introduction of the stay_on_selected_device configuration, its DB support, and utilization delayed to the next phase of the smart-steering feature. Removed the stay_on_selected_device from the BML interface - from set_client and get_client APIs related structs. Removed the stay_on_selected_device from the BML CLI interface - both from set_client and get_client CLI functions. Note that the stay_on_selected_device infrastructure in the BML message to/from the controller is not removed, but not used. PPM-5. Signed-off-by: Adam Dov <adamx.dov@intel.com>
Added verification of "is someone waiting for the promise" before handling the response. Implement the function with error-handling first according to the agreed coding guidelines. Fixed broken return-on-error in the "get_client" implementation. PPM-5. Signed-off-by: Itay Elenzweig <itayx.elenzweig@intel.com> Signed-off-by: Adam Dov <adamx.dov@intel.com>
The BML APIs provide an optional-parameters interface, meaning the user can use the API with some of the parameters set to "NOT_CONFIGURED" value, and these parameters not configured in the DB. However, using the API with all the parameters set to "NOT_CONFIGURED" value is not a valid case and should be handled as an error. Added verification that at least one of the given parameters not set to "NOT_CONFIGURED" value. PPM-5. Signed-off-by: Itay Elenzweig <itayx.elenzweig@intel.com> Signed-off-by: Adam Dov <adamx.dov@intel.com>
The current condition of comparing the client's passed-timelife-delay against max-timelife-delay is correct but doesn't reflect the actual logic behind it which is "is remaining timelife over". This change enables a more coherent comparison of current-client-remaining-timelife-delay against a candidate-client-for-removal-timelife-delay (if the DB is full). Changed the aging condition to "client-remaining-time < 0". PPM-5. Signed-off-by: Adam Dov <adamx.dov@intel.com>
The current client_db_entry_to_mac receives a const& to the mac address and internally makes a copy to perform an in-place replacement of characters. Changed the function to receive a copy instead of a const& and changed the implementation accordingly. PPM-5. Signed-off-by: Adam Dov <adamx.dov@intel.com>
Added `using ValuesMap = std::unordered_map<std::string, std::string>` and replaced DB APIs and private function to use the new `ValuesMap` instead of `std::unordered_map<std::string, std::string>`. The above change is a fix to comment raised in a previous PR, and it results in much cleaner code. PPM-5. Signed-off-by: Adam Dov <adamx.dov@intel.com>
The current implementation of selected bands mistakenly used the existing beerocks::eFreqType as the storage type. This is not extensible and doesn't define the full possible configurations. Moreover, by using the newly introduced eClientSelectedBands instead, which is used in the BML<->controller messaging, we can simplify the set and get operations and any future extension of supported values. Changed in node class the storage type of the selected bands and its description. Changed the DB APIs to use the int8_t instead of beerocks::eFreqType. Changed the selected bands` default value from beerocks::eFreqType::FREQ_UNKNOWN to beerocks::PARAMETER_NOT_CONFIGURED. PPM-5. Signed-off-by: Adam Dov <adamx.dov@intel.com>
As part of the load_persistent_db_clients() a corner-case where the user added to the persistent DB more than the allowed max-clients-db-size must be handled. Added a check of the number-of-added-clients against the max-clients-db-size - if the condition is met - the clients' DB is full. If clients DB is full, find a candidate client for removal and compare it against the client read from persistent DB and we are trying to add. If the new client's remaining timelife is greater than the timelife of the candidate_for_removal, then the candidate is removed from the runtime DB and the persistent DB and the new client is added instead to the runtime DB. If the new client's remaining timelife is smaller or equal to the timelife of the candidate_for_removal, then the new client is removed from the persistent DB and we continue to the next client. PPM-5. Signed-off-by: Adam Dov <adamx.dov@intel.com>
Preparative commit. Added API to get all the clients in the runtime DB that have persistent information configured. The assumption is that a client with persistent data configured must have a timestamp configured (which differs from the default value that the not-configured clients have). The API returns a dqueu of the MAC addresses of the above-mentioned clients. PPM-5. Signed-off-by: Adam Dov <adamx.dov@intel.com>
Changed the ACTION_BML_CLIENT_GET_CLIENT_LIST_REQUEST handling to read the clients from persistent DB using the get_clients_with_persistent_data_configured() DB API. Removed the related cpp-check issue from cppcheck_existing_issues.txt. PPM-5. Signed-off-by: Adam Dov <adamx.dov@intel.com>
Change the ACTION_BML_CLIENT_GET_CLIENT_REQUEST handling to read the client information from the DB using the DB APIs. The handling also takes care of the following scenarios: "client does not exist in DB" - handled as an error. "client timestamp not exist" - handled as an error. PPM-5. Signed-off-by: Adam Dov <adamx.dov@intel.com>
Change the ACTION_BML_CLIENT_SET_CLIENT_REQUEST handling to configure the client information to the runtime DB using the DB APIs. If persistent DB is enabled - the update_client_persistent_db() API called to update the persistent DB with the client information (to prevent multiple persistent DB access overhead). Note that if the client is not yet part of the runtime DB, a node for it added before-hand. Moreover, managing the persistent DB max size limit is handled internally and is transparent to the user. PPM-5. Signed-off-by: Adam Dov <adamx.dov@intel.com>
When configuring the stay_on_initial_radio the initial_radio needs to be set as well. If stay_on_initial_radio is disabled - clear the initial_radio configuration. If stay_on_initial_radio is enabled and the client is connected - set the initial_radio to the parent radio (not bssid) mac. PPM-5. Signed-off-by: Adam Dov <adamx.dov@intel.com>
The stay-on-initial-radio can be configured for disconnected clients as well as clients which never connected yet. This means, that when the client connects, we need to check if the stay-on-initial-radio is enabled and if so set the initial-radio. Note that the initial-radio is set only if it wasn't set before - to prevent overriding previous configuration. The value set to the initial-radio is the parent radio (not bssid) mac. Added the above-described functionality to the association_handling_task::finalize_new_connection() which is called on client connection. PPM-5. Signed-off-by: Adam Dov <adamx.dov@intel.com>
As part of testing the full flows of the persistent Db we encountered an issue where a successful removal of a client entry from the persistent DB resulted in a false-positive error. The cause of this error is that remove_client_entry_and_update_counter() in the db class returned false both for success and for failure. Changed the successful return value of the above-mentioned function from false to true. Signed-off-by: Adam Dov <adamx.dov@intel.com>
88b33b5 to
9a6a759
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR handles comments raised in the previous controller DB PR - related to the runtime DB in the controller.
As part of this PR - I have also added handling for the following BML requests which complete the BML<->controller integration for the smart-steering feature.
ACTION_BML_CLIENT_GET_CLIENT_LIST_REQUEST
ACTION_BML_CLIENT_SET_CLIENT_REQUEST
ACTION_BML_CLIENT_GET_CLIENT_REQUEST
The above-mentioned Fixes are limited to the BML, BML-CLI, and controller.
The controller<->BPL integration is handled separately by the following PR: #1502