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.

ask help on NDK jumbo frame

Hi,

I'm uisng NDK 2.0.0 with jumbo frame enabled on C6455. Everything runs fine with non-jumbo frame mode.

To enable jumbo frame, i include all  *_jmubo.lib and add the macro _INCLUDE_JUMBOFRAME_SUPPORT into my project, it build successfully, but when i run it, the following error come out:

Error: Unable to register the EMAC
NIMUIOCTL Failed with error code: -22

Can someone help me out?

thanks,

Weslly

  • Dear Weslly,
    Can you please refer to the following post and try that code change ?
    e2e.ti.com/.../620989

    Let me know if its not working for you.
  • thanks, Quote, according to it ,first i tried to change memory allocation both in pbm.c and jumbo_pbm.c:

    pbm.c:

    //#define PKT_NUM_FRAMEBUF 192   (original)
    #define PKT_NUM_FRAMEBUF 256

    jumbo_pbm.c

    //#define JUMBO_RAW_PAGE_COUNT 16    (original)
    #define JUMBO_RAW_PAGE_COUNT (16*4)

    still no fixed. So i add the _mmCheck in nimu_eth.c:

    /* Register the device with NIMU */
    if (NIMURegister (ptr_device) < 0)
    {
    printf ("Error: Unable to register the EMAC\n");
    _mmCheck(0, &printf);
    return -1;
    }

    here is the printf output:

    TCP/IP Stack Example Client
    Using MAC Address: 82-76-b5-fc-25-7e
    Error: Unable to register the EMAC

    7:48 ( 10%) 6:96 ( 18%) 1:128 ( 4%) 1:256 ( 8%)
    1:512 ( 16%) 0:1536 0:3072
    (15360/49152 mmAlloc: 16/0/1, mmBulk: 0/0/0)

    1 blocks alloced in 512 byte page
    7 blocks alloced in 48 byte page
    5 blocks alloced in 96 byte page
    1 blocks alloced in 128 byte page
    1 blocks alloced in 256 byte page

    So what does it mean? Any mem block not enough?

    thanks,

    Weslly

  • Dear Weslly,
    Yes, it might be issue due to insufficient allocated memory.
    Did you rebuild the NDK once you modified the NDK stack code (pbm.c & jumbo_pbm.c) ?

    If not, please rebuild the NDK package (version) which you linked into your project.

    Refer these wikis to rebuild the NDK package.
    processors.wiki.ti.com/.../Rebuilding_The_NDK_Core_Using_Gmake
    processors.wiki.ti.com/.../Rebuilding_the_NDK_Core
  • Hi, Titus,

    I made a mistake, actually this register issue was fixed after i changed "JUMBO_RAW_PAGE_COUNT" from 16 to 64.

    But now i have another issue:

    I found my udp receive didnt' work in jumbo frame mode, here is my code:

    rv = recvfrom(t_NetComHdl.s_recv, p, len, 0, (struct sockaddr*)&RemoteAddr, &len2);

    it will block at this point, meaning receiving nothing. 

    And if i justt undefine "_INCLUDE_JUMBOFRAME_SUPPORT", making it woking in non-jumbo frame mode, nothing else changed, then udp receive turns to work.

    So what's the problem, am i still missing something.

    thanks,

    Weslly