Skip to content

RDKCOM-5580: RDKBDEV-3433 RDKBWIFI-202 Implementation of Traffic Separation - #972

Open
siddharth-nair-dtdl wants to merge 93 commits into
rdkcentral:developfrom
siddharth-nair-dtdl:RDKBWIFI-202
Open

RDKCOM-5580: RDKBDEV-3433 RDKBWIFI-202 Implementation of Traffic Separation#972
siddharth-nair-dtdl wants to merge 93 commits into
rdkcentral:developfrom
siddharth-nair-dtdl:RDKBWIFI-202

Conversation

@siddharth-nair-dtdl

@siddharth-nair-dtdl siddharth-nair-dtdl commented Mar 16, 2026

Copy link
Copy Markdown

Reason for change: Added traffic seperation TLV implementation via single bridge
Test Procedure: Verify build is successfull and check if traffic seperation is functional
Dependency: rdkcentral/utopia#263
Risks: Medium
Priority: P2

@siddharth-nair-dtdl
siddharth-nair-dtdl requested a review from a team as a code owner March 16, 2026 10:25
@github-actions github-actions Bot added the community contribution Contributions from community. label Mar 16, 2026
Comment thread source/core/wifi_ctrl_webconfig.c Outdated
Comment thread source/core/wifi_ctrl_webconfig.c Outdated
Comment thread source/core/wifi_ctrl_webconfig.c Outdated
Comment thread source/core/wifi_ctrl_webconfig.c
Comment thread source/core/wifi_ctrl_webconfig.c Outdated
Comment thread source/core/wifi_ctrl_webconfig.c Outdated
Comment thread source/core/wifi_ctrl_webconfig.c
Comment thread source/core/wifi_ctrl_webconfig.c Outdated
Comment thread source/webconfig/wifi_decoder.c

Copilot AI 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.

Pull request overview

Implements EasyMesh “Traffic Separation” policy support end-to-end in the webconfig pipeline, including schema additions, JSON encode/decode, EasyMesh translation, and applying resulting VLAN/SSID settings to VAP configuration.

Changes:

  • Added traffic_separation_policy structures to em_config_t.
  • Implemented JSON encoding/decoding for “Traffic Separation Policy” in the webconfig EM policy object.
  • Added translation from EasyMesh policy to internal EM config and applied VLAN/SSID values via a new EM subdoc apply path.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
source/webconfig/wifi_encoder.c Encodes Traffic Separation policy into the EM “Policy” JSON.
source/webconfig/wifi_decoder.c Decodes Traffic Separation policy from EM “Policy” JSON into em_config_t.
source/webconfig/wifi_easymesh_translator.c Copies Traffic Separation policy from EasyMesh structures into internal policy config.
source/core/wifi_ctrl_webconfig.c Adds EM subdoc apply handler that updates VAP SSID/VLAN and syscfg + service restart.
include/wifi_base.h Introduces Traffic Separation policy structs/limits and wires them into em_config_t.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/webconfig/wifi_encoder.c
Comment thread source/webconfig/wifi_encoder.c Outdated
Comment thread source/webconfig/wifi_decoder.c
Comment thread source/webconfig/wifi_decoder.c
Comment thread source/webconfig/wifi_easymesh_translator.c
Comment thread source/core/wifi_ctrl_webconfig.c Outdated
Comment thread source/core/wifi_ctrl_webconfig.c Outdated
Comment thread source/core/wifi_ctrl_webconfig.c
Comment thread source/core/wifi_ctrl_webconfig.c Outdated
Comment thread source/core/wifi_ctrl_webconfig.c
@sundaresh-k-oss

Copy link
Copy Markdown

Hi @amarnathhullur -We have made the changes suggested and replied to other comments.

    We have built the latest changes and OneWifi is crashing. After Factory reset, the box is recovered and OneWifi is not getting crashed (in some scenarios). The box is not consistent with each reboot. 

     For traffic separation TLV parsing, the agent is not getting parsed traffic separation properly. The issue is due to the vendor specific tlv parsing done in the file: src/em/policy_cfg/em_policy_cfg.cpp. We have commented the changes for vendor specific tlv and issue was resolved. That is due to adding the break as the vendor_tlv->num is zero in this case, control is coming out of while loop. Because of this, the control is coming out of TLV and some of the lines are not executed. 

Copilot AI 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.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 8 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread source/webconfig/wifi_decoder.c
Comment thread source/webconfig/wifi_easymesh_translator.c
Comment thread source/webconfig/wifi_easymesh_translator.c
Comment thread source/webconfig/wifi_encoder.c
Comment thread source/webconfig/wifi_encoder.c
Comment thread source/core/wifi_ctrl_webconfig.c
Comment thread source/core/wifi_ctrl_webconfig.c
Comment thread source/core/wifi_ctrl_webconfig.c Outdated
@sundar2k sundar2k changed the title RDKBWIFI-202: Implementation of Traffic Separation RDKBWIFI-202: RDKBDEV-3433: Implementation of Traffic Separation Apr 23, 2026
@pradeeptakdas pradeeptakdas changed the title RDKBWIFI-202: RDKBDEV-3433: Implementation of Traffic Separation RDKCOM-5580: RDKBDEV-3433 RDKBWIFI-202 Implementation of Traffic Separation Apr 23, 2026
@Nikita-Hakai

Copy link
Copy Markdown
Contributor

Hi @siddharth-nair-dtdl, can you confirm if the copilot comments are addressed.

Comment thread include/wifi_base.h
Comment thread include/wifi_base.h
Comment thread source/core/wifi_ctrl_webconfig.c
Comment thread source/core/wifi_ctrl_webconfig.c
Comment thread source/core/wifi_ctrl_webconfig.c
Comment thread source/webconfig/wifi_decoder.c
Comment thread source/webconfig/wifi_decoder.c Outdated
Comment thread source/webconfig/wifi_easymesh_translator.c Outdated
Comment thread source/webconfig/wifi_encoder.c Outdated
@AkhilaReddyK7

Copy link
Copy Markdown

@siddharth-nair-dtdl / @sundaresh-k-oss
Can you please address the review comments and update the PR.

@sundaresh-k-oss

sundaresh-k-oss commented May 14, 2026

Copy link
Copy Markdown

@AkhilaReddyK7 - We have addressed the comments, tested and updated the PR . Can you please review the changes ?

@Nikita-Hakai

Nikita-Hakai commented May 14, 2026

Copy link
Copy Markdown
Contributor

Internal build success: https://gerrit.teamccp.com/#/c/956554/

@Nikita-Hakai

Copy link
Copy Markdown
Contributor

@siddharth-nair-dtdl and @sundaresh-k-oss , can you please address the build failure for:

  1. <syscfg/syscfg.h> as suggested by copilot above
  2. Build failures(Workflow) indicated as part of this active PR

Reason for change: Added traffic seperation TLV implementation via single bridge
Test Procedure: Verify build is successfull and check if traffic seperation is functional
Risks: Medium
Priority: P2
@sundaresh-k-oss

sundaresh-k-oss commented May 19, 2026

Copy link
Copy Markdown

@Nikita-Hakai -

  1. <syscfg/syscfg.h> as suggested by copilot above
  • The header file is already present as part of the Pull Request in the file source/core/wifi_ctrl_webconfig.c .
  1. Build failures(Workflow) indicated as part of this active PR.
  • Fixed the error and pushed the changes. Can you please check and let us know if the build is successful?

ksaipr036 and others added 24 commits July 21, 2026 19:50
…_TxRate value is empty (rdkcentral#1041)

Reason for Change: Parameter is defined as string, but backend implementation used uint and returned transmitPower instead of TxRate, resulting in an empty value.
Test Procedure: Run "dmcli eRT getv Device.WiFi.Radio.<i>.X_CISCO_COM_TxRate" and verify it's value should be non-empty
Risks: Low

Signed-off-by: ksaipr036 <kosika_saipriya@comcast.com>
Co-authored-by: Narendra Varma Dandu <narendandu@gmail.com>
…ype compliance fails for Device.WiFi.AccessPoint.<i>.ConnectionControl.PreAssocDeny.CuThresholdSupported (rdkcentral#1063)

* RDKBACCL-1615 : [TDK][AUTO][BPI][DML]Data type compliance fails for Device.WiFi.AccessPoint.<i>.ConnectionControl.PreAssocDeny.CuThresholdSupported

Reason for change: To satisfy the defined value for CuThresholdSupported, increased the length
Test Procedure: dmcli eRT getv Device.WiFi.AccessPoint.1.ConnectionControl.PreAssocDeny.CuThresholdSupported
Risks: None

Signed-off-by: ssiras826 <sandhyarani_sirasanagandla@comcast.com>

* Increase CuThresholdSupported type length to 64

---------

Signed-off-by: ssiras826 <sandhyarani_sirasanagandla@comcast.com>
Co-authored-by: Narendra Varma Dandu <narendandu@gmail.com>
Test Procedure: Build should be successful and the regression test should also succeed.

Risks: Low
Priority: P1
Signed-off-by: vanshika_lnu@comcast.com
Reason for change: Fixing Low priority Coverity issues.
Test Procedure: Build should be successful and the regression test should also succeed.
 
Risks: Low
Priority: P1
Signed-off-by: Velpula_Bharathi@comcast.com
Reason for change: Fixing high medium priority coverity issues.
Test Procedure: Build should be successful and the regression test should also succeed.
 
Risks: Low
Priority: P1
Signed-off-by: Velpula_Bharathi@comcast.com
Reason for change: Develop OneWIfi code to accomplish split brain recovery in the mesh network

Test Procedure: Load the OneWifi Image and verify as per Split brain
Feature scenario.

Risks: Low

Signed-off-by: aishwaryaashok_medpalliwar@comcast.com
Co-authored-by: yanaki_mahesh@comcast.com
Co-authored-by: sachinkumar_shah@comcast.com
Reason for change: Fixing Low priority Coverity issues.
Test Procedure: Build should be successful and the regression test should also succeed.

Risks: Low
Priority: P1
Signed-off-by: Velpula_Bharathi@comcast.com
…1105)

* changed
* Update wifi_db_apis.c
* Potential fix for pull request finding

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
…g WPA2-Personal by default when FeatureMFPConfig is enabled. (rdkcentral#1117)

* Set mfp for wpa2 personal as optional
* Update cosa_wifi_dml.c
* Update wifi_encoder.c
* Update wifi_decoder.c
* Update wifi_ovsdb_translator.c
* Update wifi_multidoc_webconfig.c
* Potential fix for pull request finding
---------
Co-authored-by: Sathish Kumar Gnanasekaran <gsathish86@gmail.com>
…and setting bus data property types. (rdkcentral#1103)

This reverts commit 36fb822.

Co-authored-by: Narendra Varma Dandu <narendandu@gmail.com>
…tral#989)

Retrieve Channel Utilization and Station Count from the BSS Load element
of the Probe Response and populate the corresponding fields.

Ensure these values are correctly included in the Channel Scan Result TLV
within the Channel Scan Report message for EasyMesh.

Signed-off-by: Sangeetha <sangeetha.s1@tataelxsi.co.in>
Co-authored-by: Narendra Varma Dandu <narendandu@gmail.com>
…eter is not working Reason for change: Unable to get the harvester's rfc value once it is set. Test Procedure: Try to set the dmcli as true and test whether it perists dmcli eRT setv Device.WiFi.X_RDKCENTRAL-COM_Report.WifiClient.Enabled bool true Priority: P1 Risks: Low Signed-off-by: mothishree_mallaiyanjothimani@comcast.com (rdkcentral#1120)

Reason for change: Unable to get the harvester's rfc value once it is set through dmcli.
Test Procedure: Try to set the below dmcli as true and check it is true.
dmcli eRT setv Device.WiFi.X_RDKCENTRAL-COM_Report.WifiClient.Enabled bool true
Priority: P1
Risks: Low
Signed-off-by: mothishree_mallaiyanjothimani@comcast.com
Co-authored-by: Sathish Kumar Gnanasekaran <gsathish86@gmail.com>
…l#1124)

SHARMAN-4063: HostapMgtFrameCtrl is disabled POST upgrade.

Impacted Platforms: HUB6
Reason for change: DB version is higher than expected
Test Procedure: Upgrade the image from 8.2 and check the value
Risks: Low
Priority: P2
Signed-off-by:RaviShankar.R_Rangaraj@comcast.com

* SHARMAN-4063: HostapMgtFrameCtrl is disabled POST upgrade.

Impacted Platforms: HUB6
Reason for change: DB version is higher than expected
Test Procedure: Upgrade the image from 8.2 and check the value
Risks: Low
Priority: P2
Signed-off-by:RaviShankar.R_Rangaraj@comcast.com
* Revert "RDKBACCL-1330: Updated current tx_power hal api call in OneWifi (rdkcentral#1092)"

This reverts commit 8545402.

* Revert "RDKBACCL-1330: Updated current tx_power in onewifi and unified-mesh (rdkcentral#768)"

This reverts commit 02b7856.
…tral#1129)

Reason for change: LinkAddress is empty for MLO client's assoc events
Test Procedure: Connect MLO client to AP and verify the link address is
                correctly populated in the stats and events.
Risks: Low
Priority: P1

Signed-off-by: Petro Krynytskyi <Petr0krynytskiy@gmail.com>
Reason for change: notify_associated_entries called multiple times
Test Procedure: 1. connect a client, disconnect, reconnect.
		2. Check for calls to notify_associated_entries.
		3. notify_associated_entries should be called only
		   once per connect/disconnect.
Risks: Low
Priority: P1

Signed-off-by: Narendra Varma Dandu <narendandu@gmail.com>
…kcentral#1138)

Reason for change: Added Fix as per the build error

Test Procedure: Load the OneWifi Image and verify as per Split brain
Feature scenario.

Risks: Low

Signed-off-by: aishwaryaashok_medpalliwar@comcast.com
Co-authored-by: yanaki_mahesh@comcast.com
Co-authored-by: sachinkumar_shah@comcast.com

Signed-off-by: aishwaryaashok_medpalliwar@comcast.com
Co-authored-by: amedpa922 < aishwaryaashok_medpalliwar@comcast.com>
Co-authored-by: Sathish Kumar Gnanasekaran <gsathish86@gmail.com>
…ction (rdkcentral#1128)

Co-authored-by: Raja Shah <167130396+rshah-1@users.noreply.github.com>
…l#1143)

* Propagating tcm_enabled_rfc state to Vap specific RFC based on cloud
push after reset
* update
* Update cosa_wifi_dml.c

---------

Co-authored-by: Sathish Kumar Gnanasekaran <gsathish86@gmail.com>
… counters (rdkcentral#1141)

Reason for Change:
Existing command used awk '{print $6} to extract the
rxprobereq value, but the counter output is a single long line with
multiple key-value pairs. Field $6 was pointing to wrong counter
rxauth_req_denied and not rxprobereq

Fixed by using grep -o "rxprobereq" [0-9]*" which directly extracts only
the rxorobereq value and awk '{print $2}' to get the correct count

Changed done in both 2GHz and 5GHz pre and cur counters

Signed-off-by: Sake Victor Daniel <VictorDaniel_Sake@comcast.com>
Co-authored-by: Sathish Kumar Gnanasekaran <gsathish86@gmail.com>
…ment insertion (rdkcentral#1146)

Reason for change: Memory leak in onewifi process
Test Procedure: Debug
Priority: P1
Risks: Low


(cherry picked from commit d6c1379)

Signed-off-by: Petro Krynytskyi <petr0krynytskiy@gmail.com>
Co-authored-by: Narendra Varma Dandu <narendandu@gmail.com>
Co-authored-by: Nikita Hakai <nikita.hakai999@gmail.com>
Copilot AI review requested due to automatic review settings July 21, 2026 20:00
@github-actions

Copy link
Copy Markdown


Thank you for your submission, we really appreciate it. Like many open-source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution. You can sign the CLA by just posting a Pull Request Comment same as the below format.


I have read the CLA Document and I hereby sign the CLA


22 out of 23 committers have signed the CLA.
siddharth-nair-dtdl
WellPeter
Srijeyarankesh
rediska01
stanislavkuchar2
rakhilpe
SanjayVenkatesan190
kpandu987
vlad-safonov
amarnathhullur
KarthikeyanNanjundan
vfrvtlk
pramod7456
mateuszCieslak-GL
Aniket0606
rhegde114
ArsenPodoba
narendradandu
sundram0711
nefiguclu
Sangeetha-selvaraj18
SakeVictorDaniel
lavanyachimmiri15
You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Copilot AI 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.

Pull request overview

Copilot reviewed 113 out of 115 changed files in this pull request and generated 8 comments.

Comments suppressed due to low confidence (3)

source/apps/levl/wifi_levl.c:1586

  • radio is parsed with %u, so it’s an unsigned type; the (radio < 0) branch is dead and can trigger compiler warnings. This check also changed behavior vs the previous guard that rejected radio == 0. Keep the intended validation (instance numbers start at 1).
            if ((radio < 0) || (radio > MAX_NUM_RADIOS)) {
                wifi_util_dbg_print(WIFI_APPS, "%s:%d Invalid Radio: %u\n", __func__, __LINE__, radio-1);
                pthread_mutex_unlock(&wifi_app->data.u.levl.lock);
                return bus_error_general;
            }

lib/ovsdb/ovsdb_utils.c:200

  • get_pair() may return NULL, but the loop unconditionally dereferences pair in ds_tree_insert(tree, pair, pair->key). This can crash on allocation failure. Add a NULL check and abort building the tree cleanly.
        key = keys[i];
        value = values[i];
        pair = get_pair(key, value);
        loop = (pair != NULL);
        ds_tree_insert(tree, pair, pair->key);
        i++;
        loop &= (i < nelems);

lib/ovsdb/ovsdb_utils.c:377

  • get_ipair() may return NULL, but the loop unconditionally dereferences pair in ds_tree_insert(tree, pair, pair->key). This can crash on allocation failure; add a NULL check and abort.
        key = keys[i];
        value = values[i];
        pair = get_ipair(key, value);
        loop = (pair != NULL);
        ds_tree_insert(tree, pair, pair->key);
        i++;
        loop &= (i < nelems);

Comment thread source/utils/scheduler.c
Comment on lines 563 to 568
if((tt->repetitions != 0 && tt->execution_counter == tt->repetitions) || tt->cancel == true) {
queue_remove(sched->timer_list, i);
if (tt->id == lp_id) {
lp_update_index = 0;
sched->index = (i > 0) ? (i - 1) : 0;
sched->index = i-1;
}
Comment thread source/utils/scheduler.c
Comment on lines 578 to 583
if((tt->repetitions != 0 && tt->execution_counter == tt->repetitions) || tt->cancel == true) {
queue_remove(sched->high_priority_timer_list, i);
if (tt->id == hp_id) {
hp_update_index = 0;
sched->hp_index = (i > 0) ? (i - 1) : 0;
sched->hp_index = i-1;
}
Comment on lines 4231 to 4234
if (vap_row->wpa == false) {
vap->u.sta_info.security.mode = wifi_security_mode_none;
vap->u.bss_info.security.encr = wifi_encryption_none;
} else {
Comment on lines 4249 to 4252
}
vap->u.sta_info.security.mode = enum_sec;
vap->u.bss_info.security.encr = enum_encr;

Comment thread lib/ovsdb/ovsdb_table.c
Comment on lines 332 to 337
bool onewifi_ovsdb_table_upsert_where_f(const char *ovsdb_sock_path, ovsdb_table_t *table,
json_t *where, void *record, bool update_uuid, char *filter[])
{
json_t *jrow = NULL;
ovs_uuid_t *uuid = update_uuid ? (ovs_uuid_t *)((char *)record + table->uuid_offset) : NULL;
ovs_uuid_t *uuid = update_uuid ? uuid = record + table->uuid_offset : NULL;
bool ret;
Comment thread lib/ovsdb/ovsdb_table.c
Comment on lines 392 to 396
char *parent_table, json_t *parent_where, char *parent_column)
{
json_t *jrow = NULL;
ovs_uuid_t *uuid = update_uuid ? (ovs_uuid_t *)((char *)record + table->uuid_offset) : NULL;
ovs_uuid_t *uuid = update_uuid ? uuid = record + table->uuid_offset : NULL;
bool ret;
Comment on lines +91 to +108
vap_stats = (vap_traffic_stats_t *)calloc(1, sizeof(vap_traffic_stats_t));
if (vap_stats == NULL) {
wifi_util_error_print(WIFI_MON, "%s:%d calloc failed\n", __func__, __LINE__);
return RETURN_ERR;
}

/*
if (wifi_getxxx(args->vap_index, vap_stats) != RETURN_OK) {
wifi_util_error_print(WIFI_MON, "%s:%d wifi_getxxx failed for vap_index %d\n",
__func__, __LINE__, args->vap_index);
free(vap_stats);
return RETURN_ERR;
} */
getVAPArrayIndexFromVAPIndex(args->vap_index, &vap_array_index);

pthread_mutex_lock(&mon_data->data_lock);
memcpy(&mon_data->bssid_data[vap_array_index].vap_traffic, vap_stats, sizeof(vap_traffic_stats_t));
pthread_mutex_unlock(&mon_data->data_lock);
Comment on lines +19 to 24
#include "sequence.h"
#include "number.h"
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@pradeeptakdas

Copy link
Copy Markdown
Contributor

Hi @siddharth-nair-dtdl
While resolving the merge conflict, it appears that commits from the develop branch were unintentionally merged into your PR.

Could you please update your fork and rebase your changes accordingly? Once the updates are complete, we can proceed with requesting a review from the component owner and move toward merging.

I had previously noted this in the ticket: https://jira.rdkcentral.com/jira/browse/RDKBWIFI-202. Since there was no response, I attempted to address the merge conflict.

Please take a look and make the necessary updates so we can proceed with the review and merge.

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

Labels

community contribution Contributions from community.

Projects

None yet

Development

Successfully merging this pull request may close these issues.