• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Embedded Software » BIOS » BIOS forum » How to enable jumbo frames
Share
BIOS
  • Forum
  • Announcements
Options
  • Subscribe via RSS

How to enable jumbo frames

How to enable jumbo frames

This question is answered
Nicholas Hinnerschitz
Posted by Nicholas Hinnerschitz
on Mar 02 2012 09:02 AM
Prodigy30 points

Hi all,

I'm using the NDK 2.0.0 and I'm trying to enable jumbo frames in the client.pjt example.  I am linking against the hal_eth_c6455_jumbo.lib, netctrl_jumbo.lib, nettool_jumbo.lib, and os_jumbo.lib libraries and I also added "_INCLUDE_JUMBOFRAME_SUPPORT" to the preprocessor pre-defined symbol section.

I can successfully build the application but when I run I get this error "Error: Unable to register the EMAC".  The client.pjt application works fine with the non-jumbo frame libraries.  Is there something I am missing to get jumbo frames working?

For reference I am using:

Code Composer Studio V3.3.38.2 with Code Generation Tools v7.0.3

DSP BIOS v5.33.06

C6455 DSP

Any help would be much appreciated. Thanks,

Nick

ndk EMAC ccs v3.3 JUMBO
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • desouza
    Posted by desouza
    on Mar 02 2012 09:14 AM
    Guru55995 points

    Nick,

    I will move this post to the BIOS forum, as they are more knowledgeable about NDK.

    Just for your reference, did you take a look at the entries 8 and 9 of the NDK FAQ? They contain information about the Jumbo Frames support in NDK 2.0.0

    Regards,

    Rafael


    If my reply answers your question please click on the green button "Verify Answer".
    Search the wiki or go to useful pages for SDOWP, CGT, BIOS, CCSv3, CCSv4, CCSv5
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Nicholas Hinnerschitz
    Posted by Nicholas Hinnerschitz
    on Mar 02 2012 09:24 AM
    Prodigy30 points

    Rafael,

    Thanks for moving the post to the appropriate forum, I wasn't sure which forum was best for NDK related questions.

    I did look at those two NDK FAQ entries which is where I got the information to link against the jumbo libraries and include the jumbo preprocessor define. 

    -Nick

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Steven Connell
    Posted by Steven Connell
    on Mar 02 2012 19:00 PM
    Mastermind20580 points

    Hi Nick,

    The error message you are seeing is coming from the Ethernet driver code, in file nimu_eth.c:

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


    The function NIMURegister() is in the stack code, and so it's returning an error.

    Can you try stepping through the NIMURegister() function to see where it's failing?

    A trick you can do in order to allow you to step through it is to add the following file (that contains the function) to your project:

    ndk_2_0_0\packages\ti\ndk\src\stack\nimu\nimu.c

    Then rebuild your project for debug mode.  Then once you load it, you can put a break point at NIMURegister() and once it hits you'll be able to step through.

    Looking at the function, there are several possible places for failure so the next step is to try to pinpoint which one is hitting.

    Steve

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Nicholas Hinnerschitz
    Posted by Nicholas Hinnerschitz
    on Mar 05 2012 14:57 PM
    Prodigy30 points

    Hi Steve,

    I took your advice about debugging the library code and I have some more info.

    The NIMURegister function is failing the line which calls the device start function:

         /* The device can now be opened and initialized. */
         if (ptr_netif_device->start (ptr_netif_device) < 0)
              return -1;

    Digging further, the start function pointer is pointing to "static int EmacStart (NETIF_DEVICE* ptr_net_device)" in nimu_eth.c.  That function is failing due to:

         /* Call low-level open function */
         if (HwPktOpen(&ptr_pvt_data->pdi) == 0)
         { ... }

    HwPktOpen bails out on the 17th attempt to call this line:

    hPkt = PBM_alloc(ecfg.PktMTU);

    which is inside a loop that iterates PKT_MAX (64) times.

    I'm continuing to dig through the PBM and jumbo PBM code to see why the memory allocation is failing but any additional insight would be much appreciated.

    Nick

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Steven Connell
    Posted by Steven Connell
    on Mar 06 2012 19:19 PM
    Verified Answer
    Verified by David Friedland
    Mastermind20580 points

    Nick,

    It seems like the PBM buffers are not large enough to handle all of these allocations.  You can make these buffers bigger, however it will require you to rebuild the stack source.  You can probably get away with adding the sources (pbm.c, jumbo_pbm.c) into your project, though.

    Also, you may want to add a call to the memory dump function

    void _mmCheck( uint CallMode, int (*pPrn)(const char *,...) )

    It will print out memory stats (similar to the 'mem' command that can be run from within the client example's telnet window.

    The buffers you probably need to be concerned about are:

    pbm.c:

    //
    // Data space for packet buffers
    //
    #pragma DATA_ALIGN(pBufMem, 128);
    #pragma DATA_SECTION(pBufMem, ".far:NDK_PACKETMEM");
    static UINT8 pBufMem[PKT_NUM_FRAMEBUF*PKT_SIZE_FRAMEBUF];

    #pragma DATA_ALIGN(pHdrMem, 128);
    #pragma DATA_SECTION(pHdrMem, ".far:NDK_PACKETMEM");
    static UINT8 pHdrMem[PKT_NUM_FRAMEBUF*sizeof(PBM_Pkt)];

    and in jumbo_pbm.c:

    /* P.I.T */
    #pragma DATA_SECTION(jumbo_pit, ".far:NDK_JMMBUFFER");
    JUMBO_PITENTRY jumbo_pit[JUMBO_RAW_PAGE_COUNT];
    #pragma DATA_SECTION(jumbo_pitBuffer, ".far:NDK_JMMBUFFER");
    UINT8    jumbo_pitBuffer[JUMBO_RAW_PAGE_SIZE*JUMBO_RAW_PAGE_COUNT];

    Steve

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use