This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

RTOS/TMS320C6678: NDK jumbo frame support on C6678

Part Number: TMS320C6678

Tool/software: TI-RTOS

HI,

My customer is getting stack at NDK jumbo frame verification on their custom board. Basically they have followed the following step to modify NDK and PDK NIMU:

Considering their reports, I felt OK for
- NDK customization built for jumbo frame
- NIMU layer modification for PBM : PBM_alloc(10236)

... But this wiki is too old for the lates ProcSDK environment (v05.01.00.11). NIMU build system had been changed from CCS to gmake.

It seems Eric has verified to work jumbo frame with the ProcSDK on C6678 EVM. See the following link.

My question here is what was the exact build step for modifying NIMU source code to support jumbo frame ? The post suggested like:

We just knew an issue in the K2H NIMU driver, ping failed on 1500 bytes of packets. In the K2H, nimu_eth.c, we changed 

From:
if (Init_Cpsw ((uint32_t) ptr_device->mtu, ptr_pvt_data->pdi.bMacAddr) != 0)

To:
if (Init_Cpsw ((uint32_t) (ptr_device->mtu + ETHHDR_SIZE + 4U), ptr_pvt_data->pdi.bMacAddr) != 0)

With this change we were about to ping with >1500 bytes packets (without jumbo support, the packets are fragmented as expected). Without this change, ping has no response for >1500 bytes packets. Maybe the same fix also apply to the C6678 as well as this is the CPSW setup MTU size code.

But i'm not sure the similar modification was actually needed or not. Could you clarify ?

Best Regards,
NK

  • Hi,

    The issue was reported on K2H device which used NIMU V2 driver and was fixed. We didn't test C6678, which used the NIMU V1 driver. If you run the basic C6678 NIMU example and ping the DSP with packets > 1500 bytes of length, did it work?

    Regards, Eric
  • Hi,

    I suggested the customer to see if the ptr_device->mtu indicated the jumbo frame as expected:

    C:\ti\pdk_c667x_<version>\packages\ti\transport\ndk\nimu\src\v1\nimu_eth.c

    static int EMACInit_Core (STKEVENT_Handle hEvent)
    
    {
    
        NETIF_DEVICE*       ptr_device;
    
        EMAC_DATA*  ptr_pvt_data;
    
        char names[6][5]={"eth0","eth1","eth2","eth3","eth4","eth5"};
    
        uint32_t coreNum, i;
    
        NIMU_EMAC_EXT_info emac_info;
    
     
    
    ...
    
    ... 
    
    ...
    
     
    
        /* Init Logical Device */
    
        /* ptr_pvt_data->pdi.hEther = hEther; */
    
     
    
        /* Allocate memory for the EMAC. */
    
        ptr_device    = Osal_nimuMalloc (NIMU_roundUp(sizeof(NETIF_DEVICE), CACHE_LINESZ), CACHE_LINESZ);
    
     
    
        if (ptr_device == NULL)
    
        {
    
            NIMU_drv_log ("Error: Unable to allocate memory for the EMAC\n");
    
            return -1;
    
        }
    
     
    
        /* Initialize the allocated memory block. */
    
        mmZeroInit (ptr_device, sizeof(NETIF_DEVICE));
    
     
    
        /* Populate the Network Interface Object. */
    
        strcpy (ptr_device->name, names[coreNum]);
    
        ptr_device->mtu         = ETH_MAX_PAYLOAD - ETHHDR_SIZE;
    
        ptr_device->pvt_data    = (void *)ptr_pvt_data;
    
     
    
    ...
    
    ... 
    
    ...

    And they have confirmed that it was much smaller than value than jumbo frame. This means they failed to build the nimu with _INCLUDE_JUMBOFRAME_SUPPORT pre-defined macro. I suggested the following instruction to build the nimu and now they have verified to work correctly:

    1. Modify the related makefile: C:\ti\pdk_c667x_<version>\packages\ti\transport\ndk\nimu\build\makefile.mk

    --------------------------------------------------------------------------------------------------------

    PACKAGE_SRCS_COMMON = makefile nimu_eth.h nimu_component.mk \
                          src/NIMU_drv_log.h src/nimu_osal.h

    CFLAGS_LOCAL_COMMON += -D_INCLUDE_JUMBOFRAME_SUPPORT

    CFLAGS_LOCAL_COMMON += $(PDK_CFLAGS)

    --------------------------------------------------------------------------------------------------------

    2. And build the nimu in the command prompt.

    cd C:\ti\pdk_c667x_<version>\packages
    pdksetupenv.bat
    gmake nimu_clean
    gmake nimu

     

    I close the thread now.

    Best Regards,
    NK