Left base folder: C:\MohanReddy\backup\mcu_plus_sdk_am243x_08_03_00_05 Right base folder: C:\ti\mcu_plus_sdk_am243x_08_03_00_05 --- examples\networking\lwip\enet_lwip_icssg\test_enet.c 2022-05-04 13:18:08.000000000 +-0530 +++ examples\networking\lwip\enet_lwip_icssg\test_enet.c 2022-06-20 13:22:06.000000000 +-0530 @@ -148,12 +148,31 @@ *enetType = ENET_ICSSG_DUALMAC; *instId = 2; *numMacPorts = 1; macPortList[0] = ENET_MAC_PORT_1; } +int32_t EnetApp_getcustomInterfaceMacAddrList(EnetRm_ResCfg *resCfg) +{ + int32_t status = ENET_SOK; + + /* For reference - Note: Allocate sufficient MAC addresses if using more than one interface*/ + /* Note: Only update if you want to go with custom mac else just return with ENET_SOK*/ + + resCfg->macList.macAddress[0][0] = 0x00; + resCfg->macList.macAddress[0][1] = 0x69; + resCfg->macList.macAddress[0][2] = 0xff; + resCfg->macList.macAddress[0][3] = 0x12; + resCfg->macList.macAddress[0][4] = 0x34; + resCfg->macList.macAddress[0][5] = 0x56; + + resCfg->macList.numMacAddress = 1; + + return status; +} + int enet_lwip_example(void *args) { Enet_Type enetType; uint32_t instId; Enet_MacPort macPortList[1]; uint8_t numMacPorts; --- source\networking\enet\core\lwipif\src\V1\lwipifcb.c 2022-05-04 13:18:09.000000000 +-0530 +++ source\networking\enet\core\lwipif\src\V1\lwipifcb.c 2022-06-20 13:22:11.000000000 +-0530 @@ -160,12 +160,18 @@ enetMcmCfg.perCfg = &icssgCfg; #endif EnetAppUtils_assert(NULL != enetMcmCfg.perCfg); EnetAppUtils_initResourceConfig(gLwipIfCbObj.enetType, EnetSoc_getCoreId(), resCfg); +#if (ENET_ENABLE_PER_ICSSG == 1) + status = EnetApp_getcustomInterfaceMacAddrList(resCfg); + + EnetAppUtils_assert(status == ENET_SOK); +#endif + enetMcmCfg.enetType = gLwipIfCbObj.enetType; enetMcmCfg.instId = gLwipIfCbObj.instId; enetMcmCfg.setPortLinkCfg = EnetApp_initLinkArgs; enetMcmCfg.numMacPorts = gLwipIfCbObj.numMacPorts; enetMcmCfg.periodicTaskPeriod = ENETPHY_FSM_TICK_PERIOD_MS; /* msecs */ enetMcmCfg.print = EnetAppUtils_print; @@ -328,12 +334,13 @@ status = Enet_ioctl(handleInfo.hEnet, coreId, ICSSG_MACPORT_IOCTL_SET_MACADDR, &prms); if (status != ENET_SOK) { EnetAppUtils_print("EnetAppUtils_addHostPortEntry() failed ICSSG_MACPORT_IOCTL_ADD_INTERFACE_MACADDR: %d\r\n", status); } EnetAppUtils_assert(status == ENET_SOK); } #endif } void LwipifEnetAppCb_releaseHandle(LwipifEnetAppIf_ReleaseHandleInfo *releaseInfo) --- source\networking\enet\utils\include\enet_apputils.h 2022-05-04 13:18:09.000000000 +-0530 +++ source\networking\enet\utils\include\enet_apputils.h 2022-06-20 13:21:57.000000000 +-0530 @@ -408,12 +408,15 @@ int32_t EnetAppUtils_showRxFlowStats(EnetDma_RxChHandle hRxFlow); int32_t EnetAppUtils_showTxChStats(EnetDma_TxChHandle hTxCh); void EnetApp_getEnetInstInfo(Enet_Type *enetType, uint32_t *instId, Enet_MacPort macPortList[], uint8_t *numMacPorts); + +int32_t EnetApp_getcustomInterfaceMacAddrList(EnetRm_ResCfg *resCfg); + void EnetApp_getCpswInitCfg(Enet_Type enetType, uint32_t instId, Cpsw_Cfg *cpswCfg); void EnetApp_initLinkArgs(EnetPer_PortLinkCfg *linkArgs, Enet_MacPort macPort); bool EnetApp_isPortLinked(Enet_Handle hEnet); /* ========================================================================== */