Embedded Design Handbook

ID 683689
Date 8/28/2023
Public
Document Table of Contents

7.4.4.2.2. Disabling Nonessential NicheStack Modules

Because the NicheStack networking stack is highly configurable, many modules are available for you to optionally include. Some examples are an FTP client, an FTP server, and a web server. Every module included in your system might result in some performance degradation due to the overhead associated with having the Nios® II processor service these modules.

This degradation can happen because the main NicheStack task, tk_netmain, periodically polls each of these modules. Also, these modules might insert time-based callback functions, which further decrease the overall performance of the networking stack.

You can control what is enabled or disabled in the NicheStack networking stack through a series of macro definitions in the ipport.h configuration file. In addition, the NicheStack software component inserts some definitions in the system.h file belonging to the board support package (BSP). A list of NicheStack features and modules to disable, which can increase system performance, follows. (To disable a particular feature or module, ensure that its #define statement is present in neither the ipport.h file nor the system.h configuration file.)

The NicheStack features to disable include the following items:

  • IN_MENUS—enable NicheTool command interface
  • NPDEBUG—enable debugging aids
  • MEM_WRAPPERS—debugging aid to validate memory
  • QUEUE_CHECKING—debugging aid to validate memory queues
  • MULTI_HOMED—not needed if only one networking device
  • IP_ROUTING—not needed if only one networking device

The NicheStack modules to disable include the following items:

  • PING_APP—enable ping support
  • UDPSTEST, TCP_ECHOTEST—enable echotest programs
  • FTP CLIENT, FTP SERVER—enable FTP client/server
  • TELNET_SVR—enable Telnet server
  • USE_SYSLOG_TASK—enable statistics collection
  • SMTP_ALERTS—enable email client
  • INCLUDE_SNMP—enable simple network management protocol (SNMP) server
  • DNS_SERVER—enable domain name system (DNS) server

Disabling unused NicheStack networking stack features and modules in your system helps increase overall system performance.

The NicheStack networking stack also supports a wide variety of features and modules not listed here. Refer to the NicheStack documentation and your ipport.h file for more information.