• 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 » 64 byte packets Flooding and Burst causing NDK Halting
Share
BIOS
  • Forum
  • Announcements
Options
  • Subscribe via RSS

Forums

64 byte packets Flooding and Burst causing NDK Halting

This question is answered
Mark Depp
Posted by Mark Depp
on Apr 06 2012 01:30 AM
Intellectual765 points

I am using EVM DM648 with NDK2.0. I am using the helloworld application which comes with the board. The application is configured in the ALEBYPASS/PROMISCUOUS MODE. The throughput of the application is very much close to the benchmarks supplied with the boards documentations.
 
The problems is that when i send a burst of 64byte packets the board starts dropping packets abruptly. This is natural and no problem with me. But after sometime when i increase the no. of packets in the burst the board halts and i have to restart the board to make it continue transmitting/receiving the packets. I can live with the dropping of packets but cannot with the halting and restarting of the board by re-powering it. This behaviour is also sometimes experienced with 128byte packets. The board works fine with the packet sizes above 128 bytes.
 
Can you please help me?
 

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Steven Connell
    Posted by Steven Connell
    on Jun 25 2012 18:13 PM
    Mastermind21695 points

    Mark,

    I wanted to give you an update.  I have been trying to reproduce the crash again today following your revised instructions and diagram for h/w set up.

    The good news is that I finally was able to see the crash!  The bad news is that it took me a while, and I was changing different variables in order to make it happen because I didn't see it right away using the colasoft settings you specified.  I didn't realize that the app had gone into UTL_halt after I had already tried various settings (I was changing Colasoft settings such as the destination MAC to be broadcast, different IP addresses, etc.  Also changed the h/w setup slightly)

    So I need to try again and find the exact scenario which caused it.  Once I am able to make it fail consistently, I will be able to debug the failure case.  I have a couple of questions ...

    When you see it, is the failure very consistent?  Or does it only happen sporadically?  Also, how long does it take for you to see the problem after you start the packet bursts?

    Steve

    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 Jul 03 2012 19:48 PM
    Mastermind21695 points

    Mark,

    I've been working on your problem some more.  I'm still *not* able to reproduce a crash scenario (except for the one occurence that I saw last week), however I am able to see the connection slow down and get hung up after sending the packet bursts using Colasoft.  I also see some error messages coming out of the driver about invalid packet ("EMAC_sendPacket() returned error").

    Before going into further details, the error message gave me a hint to a problem with the DM648 driver.  The driver contains printf() functions within ISR context.  This is not allowed within BIOS and is known to cause programs to abort, as you have reported seeing.  Can you try checking the LOG_system log within CCS at the point you see the program halt?  Do you see any error messages in there?  In any case, I think you should change all of the printf() calls in the driver code (I believe you should have copies of the Ethernet driver C files in your modified helloWorld project) to instead call LOG_printf().  See this for more details: http://e2e.ti.com/support/embedded/bios/f/355/t/68883.aspx

    Now, regarding the hang up, this is what I see.  Once the modified helloWorld application is loaded and running onto the DM648 board, I am then able to get an IP address from PC2 (The PC connected to the DM648 which is in turn connected to a switch that connects to the TI network).

    At this point I can use a web browser and visit various web sites.  I can also ping other machines on the network.

    I then run the colasoft tool, and I see the Windows warning message regarding a duplicate IP address, as expected (I'm using slightly different settings in order to get this problem to happen, I'll paste a screen shot after this).  I only need to run for about 5 seconds, then I stop sending the packet bursts.

    At this point, I can no longer ping from PC2.  Nor can I connect to web pages from within the browser.  But, what I noticed at first was that if I just left everything running for a while, everything would recover, I was able to ping again and connect to the web after 5 minutes or so.

    After looking at various stats in the NDK stack, I see that there isn't really anything going on.  I guess this makes sense, as you've configured the hardware for bypass mode.  I think this causes the network stack to be skipped entirely, and all the data is just going through the driver, is that correct?

    After further experimenting, I found that I can get the entire setup to recover immediately by allowing the Windows network stack on PC2 to reset.  I did this by pulling the Ethernet cable out, waiting for a few seconds, then plugging it back in.  So, I can run the Colasoft tool, causing the network connection on PC2 to hang up (along with the Windows duplicate IP address warning), and then get it to work again by unplugging and replugging in the Ethernet cable.  Based on this, I believe this hang up that I'm seeing is caused by the Windows side network stack being hung up, as the cable unplug/replug allows all to work again.

    Please let me know what you think.

    Steve

    P.S. here are the Colasoft settings that allowed me to see the duplicate IP message and the network hang up on PC2:

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Mark Depp
    Posted by Mark Depp
    on Jul 31 2012 07:52 AM
    Intellectual765 points

    Dear Steven,
                Thank you very much for the help and your concern regarding the issue. I have been testing the board throughput and its behavior  since long. Board choking and stack crashing issue is still under examination. Some of the statistics are as under. Cola-soft generates approx 19000 packets of 64 bytes in 1 sec (1G connection), whereas according to our hardware testing (via ixia) stack crashes at the rate of approx 200000 packets. In any case the board should not choke indefinitely, i.e. after the removal of incoming data the board should regain its original condition and one need not to restart it.
                    
    I have replaced all the printf with LOG_printf but the problem is still there. Currently trying to put that benchmark  load using software by running multiple network applications simultaneously (i.e. Cola-soft, Packet builder, ping, mails etc ). Is there any way to soft-reset the board in this condition?

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Mark Depp
    Posted by Mark Depp
    on Aug 03 2012 00:20 AM
    Intellectual765 points

    Dear Steve,

              

     I have now been able to create a scenario in which board crashes at a specific software load

    1. Cola-soft packet builder: 57720 ARP packets of 64 byte each  and send in an infinite loop with no delay between the loops. Pictorially shown below

     

     

    1. Ping: To any intra network system
    2. e-mail: of size > 12 MB send in a loop i.e. to the same generating station in intra network (this process should be repeated twice or thrice )

     

    Following the afore mentioned procedure will halt the board for indefinite time. Even releasing all these loads is of no use.

     

    CCS status  and Wire-Shark display at the time of halt is shown below for reference

     

     

     

     

    1.       CCS Snap shot

    2. Wireshark Snapshot

     

    Is there any way to soft reset the board in this condition?

     

     

    Please kindly try to regenarate the problem at your end also use latest csl_emac.c file i have sent you on private chat, use this csl_emac.c in the earlier project to get new .out file.

    Regards

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Karl Wechsler
    Posted by Karl Wechsler
    on Aug 09 2012 17:54 PM
    Mastermind18265 points

    Hi Mark --

    Can you use the Kernel/Object View tools (available via one of the CCS tools menus) to look at the state of your tasks?   It would be useful to see which task is in the "running" state at the time of the crash.   It would also be helpful to see the state of the task stacks.   One of your task stacks might have overflowed.

    If that doesn't help, it would be useful to check the value of 'B3'.   B3 will contain the return address of the last function call.   This might give some clues.    Use disassembly view and enter 'B3' and it should bring up some code.  Scroll up and we'll know which function was executing right before the failure.

    -Karl-

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Mark Depp
    Posted by Mark Depp
    on Aug 10 2012 04:20 AM
    Intellectual765 points

    I am using CCSv3.3 kindly clearly specify the tasks. Moreover i think you have just started following this post, Steven had already done this regarding the B3 register values it doesn't helps.

    Please tell me which Kernel tool to use i will try to do it, i agree that the Stacks may have been overflowed but i dnt know how to detect and rectify it.

    Regards

    Mark

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Karl Wechsler
    Posted by Karl Wechsler
    on Aug 10 2012 15:03 PM
    Mastermind18265 points

    The Kernel/Object View tool is a CCS tool.   You can find it in your top-level CCS menus.  DSP/BIOS->Kernel/Object View.

    You should be able to see Task info and other info that might help by poking around in this tool.

    -Karl-

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Mark Depp
    Posted by Mark Depp
    on Aug 18 2012 03:00 AM
    Intellectual765 points

    Karl

    I have been trying to do it, i will reply you asap.

    @Steven I hope you are back, i am waiting for a reply from your side.

    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 Aug 22 2012 21:12 PM
    Verified Answer
    Verified by David Friedland
    Mastermind21695 points

    Mark,

    The stack can be rebooted

    Mark Depp
    Is there any way to soft reset the board in this condition?

    You can reboot the stack by calling:

    NC_NetStop(1);

    So if you can catch this error condition, you can decide if you want to reboot at that time by calling the above.

    Steve

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Gilen
    Posted by Gilen
    on Jan 11 2013 03:22 AM
    Prodigy210 points

    Dear Mark,

    Does this mean that NDK stack will be crashed and the board halted with a "ping flood" attack?

    This is the effect that I can reproduce in a Beaglebone wit SYS/BIOS and NDK with ping flood attack. The same is happening if a video streaming is being sent into the network by RTP protocol (Real-time Transport Protocol) with multicast frames.

    Is any way to avoid this effect? Is any configuration for the NDK stack to reject frames before overflow its buffers memory or the stack of the tasks?

    Thanks and regards

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Victor Ivanov
    Posted by Victor Ivanov
    on Jan 16 2013 10:27 AM
    Intellectual730 points

    Hi All!

    Gilen, the NDK does crash with "ping flood" attack. In the project when there is only NDK and nothing more 

    hping --flood --udp --ipproto 1 -d 20 192.168.1.100

    causes its crash very soon. Unfortunately, not only attack crashes it but quite reasonable amount of data but it takes a little longer. (as you have seen from http://e2e.ti.com/support/embedded/bios/f/355/p/223029/838245.aspx#838245)


     Mark, have you tried NC_NetStop(1)? I tried it and it seems that NDK successfully restarts only once. (http://e2e.ti.com/support/embedded/bios/f/355/t/239456.aspx)

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
123
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