2 Replies Latest reply on May 25, 2017 4:53 PM by AxLi_1746341

    Heavy Network Load with Crash - ARP Cache size

    grphc_1578046

      In our embedded application we need to send confirmation messages contantly between deivces. There is a lot of network traffice and there ar a lot of devices on a sub net - 128 or more. We are seeing the units constantly crash, the watchdog bites and they are rebooted. This is not an acceptable behaviour. We see this manifest during debug and can pause the processor and find that control is never returned to the application thread.

       

      When this happens the Appiclation thread is always attempting to get a packet - see attached capture of the point where the processor is before the watchdog bites

      break1.jpg

      We can reproduce this consistently when running in a enviroment with a large number of units Typically we see reboots every 5-10 minutes

       

      After examining the WiFi network trace we see that the devices are constantly asking for the MAC address of ajoining devices. My conclusion is that the ARP Cache is being cleared. In the NetX Documentation it states that the constant        can be used to control this - Excert

      This define specifies the number of seconds ARP entries remain valid. The default value of zero disables expiration or aging of ARP entries and is defined in nx_api.h. The application can override the default by defining the value before nx_api.h is included.

       

      This is defined in the WICED nx_api.h and already set to 0. Our thought was that the size of the cache is the issues and while the arp entries dont expire they are flushed out as new ones come in.

       

      Is there a way to extend the ARP Cache to prevent this from happening?

       

      Is there a way to prevent this crashing occuring?

       

      Thanks in advance

        • 1. Re: Heavy Network Load with Crash - ARP Cache size

          grphc_1578046

          The ARP cache holds a maximum of 6 records by default, if you are dealing with 128 devices on a network, you should increase the ARP cache to 128 records or more. In WICED/network/NetX_Duo/WICED/wiced_network.h change:

           

          #define ARP_CACHE_SIZE (6 * SIZE_OF_ARP_ENTRY)

           

          to

           

          #define ARP_CACHE_SIZE (128 * SIZE_OF_ARP_ENTRY)

          1 of 1 people found this helpful
          • 2. Re: Heavy Network Load with Crash - ARP Cache size
            AxLi_1746341

            webmstreric wrote:

             

            greg.phillips_1578046

            The ARP cache holds a maximum of 6 records by default, if you are dealing with 128 devices on a network, you should increase the ARP cache to 128 records or more. In WICED/network/NetX_Duo/WICED/wiced_network.h change:

             

            #define ARP_CACHE_SIZE (6 * SIZE_OF_ARP_ENTRY)

             

            to

             

            #define ARP_CACHE_SIZE (128 * SIZE_OF_ARP_ENTRY)

            You don't need to cache *all* 128 devices.

            It's absolute fine to have cache miss.

             

            BTW, sdk-5.0 includes below fix:

            * [all WiFi][fix] NetX-Duo version 5.7 SP3 fixes for ARP support

            1 of 1 people found this helpful