Skip to content
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

XER10-823 : Support VLAN Marking for Sky XER10 variant. #93

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions source/TR-181/include/dmsb_tr181_psm_definitions.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
#define PSM_WANMANAGER_IPV6EUI64FORMAT_SUPPPORT "dmsb.wanmanager.IPv6EUI64FormatSupport"
#define PSM_WANMANAGER_CONFIGUREWANIPV6ON_LANBRIDGE_SUPPPORT "dmsb.wanmanager.ConfigureWANIPv6OnLANBridgeSupport"
#define PSM_WANMANAGER_USEWANMAC_FOR_MGMT_SERVICES "dmsb.wanmanager.UseWANMACForManagementServices"
#define PSM_WANMANAGER_INTERFACE_VLAN_MARKING_SUPPORT "dmsb.wanmanager.InterfaceVLANMarkingSupport"

#define PSM_WANMANAGER_GROUP_COUNT "dmsb.wanmanager.group.Count"
#define PSM_WANMANAGER_GROUP_PERSIST_SELECTED_IFACE "dmsb.wanmanager.group.%d.PersistSelectedInterface"
Expand Down
3 changes: 2 additions & 1 deletion source/TR-181/include/wanmgr_dml.h
Original file line number Diff line number Diff line change
Expand Up @@ -590,7 +590,8 @@ typedef struct _DML_WANMGR_CONFIG_
BOOLEAN BackupWanDnsSupport;
BOOLEAN IPv6EUI64FormatSupport;
BOOLEAN ConfigureWANIPv6OnLANBridgeSupport;
BOOLEAN UseWANMACForManagementServices;
BOOLEAN UseWANMACForManagementServices;
BOOLEAN InterfaceVLANMarkingSupport;
} DML_WANMGR_CONFIG;

//WAN CONFIG
Expand Down
36 changes: 34 additions & 2 deletions source/TR-181/middle_layer_src/wanmgr_rdkbus_apis.c
Original file line number Diff line number Diff line change
Expand Up @@ -719,7 +719,7 @@ DmlWanDeletePSMRecordValue

#ifdef FEATURE_802_1P_COS_MARKING

#ifdef _HUB4_PRODUCT_REQ_
#if defined(_HUB4_PRODUCT_REQ_) || defined(_RDKB_GLOBAL_PRODUCT_REQ_)
static void AddSkbMarkingToConfFile(UINT data_skb_mark)
{
FILE * fp = fopen(DATA_SKB_MARKING_LOCATION, "w+");
Expand Down Expand Up @@ -799,6 +799,14 @@ ANSC_STATUS WanMgr_WanIfaceMarkingInit ()
return ANSC_STATUS_FAILURE;
}

#if defined(_RDKB_GLOBAL_PRODUCT_REQ_)
if( FALSE == gWanMgrDataBase.Config.data.InterfaceVLANMarkingSupport )
{
CcspTraceInfo(("%s %d - Interface VLAN Marking Not Supported\n", __FUNCTION__, __LINE__));
return ANSC_STATUS_SUCCESS;
}
#endif /** _RDKB_GLOBAL_PRODUCT_REQ_ */

//Initialise Marking Params
for( iLoopCount = 0; iLoopCount < pWanIfaceCtrl->ulTotalNumbWanInterfaces; iLoopCount++ )
{
Expand Down Expand Up @@ -954,7 +962,7 @@ ANSC_STATUS WanMgr_WanIfaceMarkingInit ()
CcspTraceInfo(("%s - Name[%s] Data[%s,%u,%u,%d]\n", __FUNCTION__, acTmpMarkingData, p_Marking->Alias, p_Marking->SKBPort, p_Marking->SKBMark, p_Marking->EthernetPriorityMark));

Marking_UpdateInitValue(pWanIfaceCtrl->pIface,ulIfInstanceNumber-1,ulInstanceNumber,p_Marking);
#ifdef _HUB4_PRODUCT_REQ_
#if defined(_HUB4_PRODUCT_REQ_) || defined(_RDKB_GLOBAL_PRODUCT_REQ_)
/* Adding skb mark to config file if alis is 'DATA', so that udhcpc could use it to mark dhcp packets */
if(0 == strncmp(p_Marking->Alias, "DATA", 4))
{
Expand Down Expand Up @@ -1031,6 +1039,23 @@ DmlCheckAndProceedMarkingOperations
return ANSC_STATUS_FAILURE;
}

#if defined(_RDKB_GLOBAL_PRODUCT_REQ_)
WanMgr_Config_Data_t *pWanConfigData = WanMgr_GetConfigData_locked();
unsigned char InterfaceVLANMarkingSupport = FALSE;

if( NULL != pWanConfigData )
{
InterfaceVLANMarkingSupport = pWanConfigData->data.InterfaceVLANMarkingSupport;
WanMgrDml_GetConfigData_release(pWanConfigData);
}

if( FALSE == InterfaceVLANMarkingSupport )
{
CcspTraceError(("%s %d - Interface VLAN Marking Not Supported. So ignoring %d request\n", __FUNCTION__, __LINE__, enMarkingOp));
return ANSC_STATUS_FAILURE;
}
#endif /** _RDKB_GLOBAL_PRODUCT_REQ_ */

//Find the Marking entry in PSM
ulIfInstanceNumber = pMarking->ulWANIfInstanceNumber;

Expand Down Expand Up @@ -1588,6 +1613,13 @@ ANSC_STATUS WanMgr_WanConfInit (DML_WANMGR_CONFIG* pWanConfig)
if ((retPsmGet == CCSP_SUCCESS) && (param_value[0] != '\0') && (0 == strncmp(param_value, "TRUE", 4)))
pWanConfig->UseWANMACForManagementServices = TRUE;

memset(param_name, 0, sizeof(param_name));
memset(param_value, 0, sizeof(param_value));
_ansc_sprintf(param_name, PSM_WANMANAGER_INTERFACE_VLAN_MARKING_SUPPORT);
retPsmGet = WanMgr_RdkBus_GetParamValuesFromDB(param_name,param_value,sizeof(param_value));
if ((retPsmGet == CCSP_SUCCESS) && (param_value[0] != '\0') && (0 == strncmp(param_value, "TRUE", 4)))
pWanConfig->InterfaceVLANMarkingSupport = TRUE;

return ret_val;
}

Expand Down
3 changes: 2 additions & 1 deletion source/WanManager/wanmgr_data.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ void WanMgr_SetConfigData_Default(DML_WANMGR_CONFIG* pWanDmlConfig)
pWanDmlConfig->BackupWanDnsSupport = TRUE;
pWanDmlConfig->IPv6EUI64FormatSupport = TRUE;
pWanDmlConfig->ConfigureWANIPv6OnLANBridgeSupport = FALSE;
pWanDmlConfig->UseWANMACForManagementServices = FALSE;
pWanDmlConfig->UseWANMACForManagementServices = FALSE;
pWanDmlConfig->InterfaceVLANMarkingSupport = FALSE;

/*In Modem/Extender Mode, CurrentActiveInterface should be always Mesh Interface Name*/
#if defined (RDKB_EXTENDER_ENABLED)
Expand Down