Please note as of Wednesday, August 15th, 2018 this wiki has been set to read only. If you are a TI Employee and require Edit ability please contact x0211426 from the company directory.

Enabling Jumbo Packet Support for C6678

From Texas Instruments Wiki
Jump to: navigation, search

Content is no longer maintained and is being kept for reference only!


This wiki will detail the necessary steps required to enable jumbo packet support for the Texas Instruments C6678.


Software Requirement

For this document the following software versions are required

  • BIOS_MCSDK_2_1_2_6
  • NDK_2_21_01_38
  • pdk_C6678_1_1_2_6
  • Bios_6_33_06_50
  • xdias_7_21_01_07
  • xdctools_3_23_04_60
  • Compiler c6000_7.4.4

bios-mcsdk can be downloaded from the following link

http://software-dl.ti.com/sdoemb/sdoemb_public_sw/bios_mcsdk/latest/index_FDS.html


NDK modifications

In order to have the Jumbo support for C6678 (packet sizes 1.5kb-9kb), the _INCLUDE_JUMBOFRAME_SUPPORT preprocessor definition has to be added in various files. The modifications below (file paths in bold) are the only changes made to the appropriate files. Please search through your file to find the relevant line. Also, note that some lines of code have been truncated for brevity, and any lead-up comments have been included to show the general vicinity of the change.


  • 'ndk_2_21_01_38\packages\ti\ndk\netctrl\package.bld'


/* IPv6 netctrl_min library */
var libOptions = {
copts: " -D_NDK_EXTERN_CONFIG " +
" -D_INCLUDE_JUMBOFRAME_SUPPORT " +
" -DNETSRV_ENABLE_TELNET=0 " +
" -DNETSRV_ENABLE_HTTP=0 " +
" -DNETSRV_ENABLE_NAT=0 " +

/* IPv6 netctrl "standard" library */

var libName = "netctrl"; var libOptions = { copts: " -D_NDK_EXTERN_CONFIG " + " -D_INCLUDE_JUMBOFRAME_SUPPORT " + " -DNETSRV_ENABLE_TELNET=1 " + " -DNETSRV_ENABLE_HTTP=1 " +

/* IPv6 netctrl_full library */

var libName = "netctrl_full"; 2 var libOptions = { copts: " -D_NDK_EXTERN_CONFIG " + " -D_INCLUDE_JUMBOFRAME_SUPPORT " + " -DNETSRV_ENABLE_TELNET=1 " + " -DNETSRV_ENABLE_HTTP=1 " + " -DNETSRV_ENABLE_NAT=1 " +

/* IPv4 netctrl_min library */

var libName = "netctrl_min_ipv4"; var libOptions = { copts: " -D_NDK_EXTERN_CONFIG " + " -D_INCLUDE_JUMBOFRAME_SUPPORT " + " -DNETSRV_ENABLE_TELNET=0" +

/* IPv4 netctrl "standard" library */

var libName = "netctrl_ipv4"; var libOptions = { copts: " -D_NDK_EXTERN_CONFIG " + " -D_INCLUDE_JUMBOFRAME_SUPPORT " + " -DNETSRV_ENABLE_TELNET=1" +

/* IPv4 netctrl_full library */

var libName = "netctrl_full_ipv4"; var libOptions = { copts: " -D_NDK_EXTERN_CONFIG " + " -D_INCLUDE_JUMBOFRAME_SUPPORT " + " -DNETSRV_ENABLE_TELNET=1" +


  • ndk_2_21_01_38\packages\ti\ndk\stack\package.bld


/*
* Jumbo frame support
*
* To add support for jumbo frames, add the following file to this array
* and throw the following define to the compiler in 'copts' below:
*
* -D_INCLUDE_JUMBOFRAME_SUPPORT
*/
"pbm/jumbo_pbm.c",

/* stk.lib */ var libOptions = { copts: "-D_NDK_EXTERN_CONFIG -D_INCLUDE_NIMU_CODE " + "-D_INCLUDE_JUMBOFRAME_SUPPORT", incs: ndkPathInclude, };

/* stk6_ppp_pppoe.lib */ var libName = "stk6_ppp_pppoe"; var libOptions = { copts: "-D_INCLUDE_PPP_CODE -D_INCLUDE_PPPOE_CODE " + "-D_NDK_EXTERN_CONFIG -D_INCLUDE_NIMU_CODE " + "-D_INCLUDE_IPv6_CODE " + "-D_INCLUDE_JUMBOFRAME_SUPPORT", incs: ndkPathInclude, };


Building the NDK packages

Once the above changes have been made to the NDK package, it has to be rebuilt. This rebuilt NDK will be included in the NIMU driver, and also for the compilation of the test example that will be discussed in later section (5).

Modify the ndk.mak file as needed. The modifications for this example are below.


ndk_2_21_01_38\ndk.mak

DESTDIR ?=
XDC_INSTALL_DIR ?= C:/ti/bios_mcsdk_2126_jumbomodtest/xdctools_3_23_04_60
SYSBIOS_INSTALL_DIR ?= C:/ti/bios_mcsdk_2126_jumbomodtest/bios_6_33_06_50
ti.targets.elf.C66 ?= C:/ti/ccsv5/tools/compiler/c6000_7.4.4


For the purpose of this document, the NDK was rebuilt using gmake on a Windows 7 machine. The process is documented here.

http://processors.wiki.ti.com/index.php/Rebuilding_The_NDK_Core_Using_Gmake


If the build errors related to the package.bld files are encountered, ensure that the spaces are left trailing the flag e.g + "-D_INCLUDE_JUMBOFRAME_SUPPORT " Errors can be encountered when incorrect formatting is used.

  • Add the <xdc_install_dir> to your PATH environment variable so that the gmake executable can be found.

> gmake –f ndk.mak

Once the gmake command is entered, it could take a while for the NDK to build.


Jumbo1.png

NIMU modifications

pdk_C6678_1_1_2_6\packages\ti\transport\ndk\nimu\src\nimu_eth.c

/* Allocate the PBM packet for the Max MTU size*/
if (NULL == (hPkt = PBM_alloc(10236))) {
/* could not get a free NDK packet, maybe the next time around we can... */
gRxDropCounter++;

Rebuilding the NIMU

In order to the Jumbo support to be incorporated into the NIMU, it has to be rebuilt. Open CCS and navigate to the NIMU project located at pdk_C6678_1_1_2_6\packages\ti\transport\ndk\nimu. Import this project into the CCS workspace.


Jumbo2.png
Right click on project>properties.
In RTSC, the path to the NDK does not necessarily needs to point to the modified NDK. The main change was PBM_alloc(10236) in nimu_eth.c.


Jumbo3.png
The predefined symbol _INCLUDE_JUMBOFRAME_SUPPORT has also to be included in the build. Add this, by clicking the + symbol.


Jumbo4.png

Rebuild the NIMU project.

Jumbo5.png

Building an example

In order to test the jumbo packet functionality, import the helloWorld example from the path: mcsdk_2_01_02_06\examples\ndk\helloWorld\evmc6678l.
Modify helloWorld.c to use a static IP of your choice. For this example, 192.168.0.101 is used. You can also use DHCP which can be enabled on the EVM. Ensure that you have the right mode selected on the EVM:
SW9

User Switch 2 ON : DHCP
User Switch 2 OFF: Static IP


This is also mentioned in the C6678 HW wiki section 5

http://processors.wiki.ti.com/index.php/TMDXEVM6678L_EVM_Hardware_Setup

Jumbo6.png
This project needs to be built with the new NDK and NIMU that was built in the previous steps.


Jumbo7.png

Right-click and rebuild the project.


Demo

This Demo was run with the following setup:

C6678LE EVM (192.168.0.101) <-------> Ubuntu PC (192.168.0.106)

Wireshark running on the Ubuntu machine was used to observe the network traffic.

Before proceeding, ensure that the Ethernet interface on the Ubuntu machine is configured to handle a MTU size of 9100

$sudo ifconfig eth0 mtu 9100

Jumbo8.png

  • In CCS, launch the C6678 target in no-boot mode.
  • Connect to Core0 and load the C6678 helloworld_evmc6678l.out project that was built.
  • Run the program.


Observe the console for the example to come up. The IP address of the EVM will show up on the console.

Jumbo12.png
At this point, you can ping from the Linux machine with an instance of Wireshark running. You can vary the packet sizes by using the -s flag for ping.

$ ping 192.168.0.101 -s 9050

Jumbo9.png

On Wireshark

Jumbo10.png

Jumbo11.png