This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA2EXEVM: TFDTP: ERROR: PBM_alloc() failure...exiting

Part Number: TDA2EXEVM
Other Parts Discussed in Thread: SYSBIOS

Dear kind people of TI forum,

I am trying to run TFDTP  on TDA2x(VISION_SDK_02_12_01_00).

When i run the "TDFTPRx link + Display", i keep getting the following error:
     ERROR: PBM_alloc() failure...exiting!
     PBMQ_free count = 10239


However, when i try to use Network RX/TX usecases -> 1.Network RX + Display -> 1. TFDTP, i can not get anything on my port. The board seems to be waiting for data...

Here is what i have done so far:
- set NDK_PROC_TO_USE = ipu1_1 in cfg.mk
- NSP_TFDTP_INCLUDE=yes in cfg.mk
- UC_tfdtprx_display=yes in uc_cfg.mk
- set NullSource (IPU1_1) -> Display_Video in chains_networkRxDisplay.txt
- #define TFDTP_TX_STREAMING_MODE 1 in network_tx_priv.h
- rebuilt the network tools
- used --usetfdtp in network tools

Is there a solution for this error?

Thank you in advance,
Stefan.

  • Hi Stefan,

    I have forwarded your question to an expert for comment.

    Regards,
    Yordan
  • Hello Stefan,

    Can you please share your NDK buffer allocations in NDK_config.cfg? Meanwhile we'll try to reproduce this issue at our set up.
    Also if i may ask, any special reason you want to use TFDTP Rx link instead of Null source link with TFDTP?
  • It would be better if i could use the NullSrc with the TFDTP, that would be preferred option. However, when i use that option, the data is being dropped. I can see that network tools is immediately sending out data which i can catch over wireshark, the load on
    M4-1 jumps on ~80 percent but i cannot see anything more on my display. As for the data statistics, it is as follows:
    New data Recv = 10
    Driver/Notify Cb = 9.96
    In Recv FPS = 10
    out FPS = 0
    Out Drop FPS = 10
    all else = 0.0

    Does this mean that i have a bad IPC or link?

    NullSrc works normally when its not in FTDTP mode...

    The problem with PMB_alloc occurs only with the TFDTPRx + Display

    Bellow is the full NDK_config.cfg, only change made to the original is var enableStaticIP = 1.


    /*******************************************************************************
    * file name: NDK_config.cfg
    * This file is included in the core which uses NDK
    *
    *******************************************************************************/

    var enableInstrumentation = 0;
    var enableStaticIP = 1;


    /* use modules */
    var BIOS = xdc.useModule("ti.sysbios.BIOS");
    var IntXbar = xdc.useModule('ti.sysbios.family.shared.vayu.IntXbar');
    var NdkProcToUse = java.lang.System.getenv("NDK_PROC_TO_USE");
    var NspTfdtpInclude = java.lang.System.getenv("NSP_TFDTP_INCLUDE");
    var DualA15_smpbios = java.lang.System.getenv("DUAL_A15_SMP_BIOS");

    if(NdkProcToUse=="a15_0")
    {
    var Hwi = xdc.useModule('ti.sysbios.family.arm.gic.Hwi');
    }
    else
    {
    var Hwi = xdc.useModule('ti.sysbios.family.arm.m3.Hwi');
    }

    /* NDK modules */
    var NdkConfigGlobal = xdc.useModule('ti.ndk.config.Global');
    var Ip = xdc.useModule('ti.ndk.config.Ip');
    var Tcp = xdc.useModule('ti.ndk.config.Tcp');
    var Udp = xdc.useModule('ti.ndk.config.Udp');
    var Telnet = xdc.useModule('ti.ndk.config.Telnet');

    if(DualA15_smpbios=="yes")
    {
    /* Use semaphore exclusion for SMP environment */
    NdkConfigGlobal.useSemLibs = true;
    }

    /* NSP Driver */
    var GMACSW = xdc.useModule('ti.nsp.drv.GMACSW');

    if (enableInstrumentation)
    {
    GMACSW.instrumentedBuild = true;
    }
    else
    {
    GMACSW.instrumentedBuild = false;
    }


    /* Enalbe TFDTP Stack in NSP */
    if (NspTfdtpInclude == "yes")
    {
    GMACSW.tfdtpBuild = true;
    NdkConfigGlobal.stackBeginHook = '&Utils_tfdtpDmaInit';
    NdkConfigGlobal.networkIPAddrHook = '&Network_ndkIPAddrHookFxn';
    }

    if (java.lang.System.getenv("AVBRX_INCLUDE") == "yes")
    {
    /* AVBTP stack */
    var AVBTP = xdc.useModule('ti.avbtp.AVBTP');
    if (enableInstrumentation)
    {
    AVBTP.instrumentedBuild = true;
    }
    else
    {
    AVBTP.instrumentedBuild = false;
    }
    }

    /**********************************************************************\
    | Miscellaneous Configuration |
    \**********************************************************************/

    /* Specify startup init function for Bios */
    BIOS.startupFxns = ['&NDK_NSP_Init']; /* call the init function at startup time */

    var irqOffset = 0;

    if(NdkProcToUse=="a15_0")
    {
    irqOffset = 32;
    }

    /* GMAC_SW RX_THRESH_PULSE Interrupt */
    IntXbar.connectIRQMeta(57, 334);
    var hwi_param_0 = new Hwi.Params;
    hwi_param_0.arg = 0;
    Hwi.create(57+irqOffset, '&HwIntRxThresh', hwi_param_0);

    /* GMAC_SW RX_PULSE Interrupt */
    IntXbar.connectIRQMeta(58, 335);
    var hwi_param_1 = new Hwi.Params;
    hwi_param_1.arg = 0;
    Hwi.create(58+irqOffset, '&HwIntRx', hwi_param_1);

    /* GMAC_SW TX_PULSE Interrupt */
    IntXbar.connectIRQMeta(59, 336);
    var hwi_param_2 = new Hwi.Params;
    hwi_param_2.arg = 0;
    Hwi.create(59+irqOffset, '&HwIntTx', hwi_param_2);

    /* GMAC_SW MISC_PULSE Interrupt */
    IntXbar.connectIRQMeta(60, 337);
    var hwi_param_3 = new Hwi.Params;
    hwi_param_3.arg = 0;
    Hwi.create(60+irqOffset, '&HwIntMisc', hwi_param_3);


    /**********************************************************************\
    | NDK configuration |
    \**********************************************************************/

    /* select the stack library we want */
    NdkConfigGlobal.IPv6 = false;
    NdkConfigGlobal.stackLibType = NdkConfigGlobal.MIN;
    NdkConfigGlobal.netSchedulerPri = NdkConfigGlobal.NC_PRIORITY_HIGH;
    NdkConfigGlobal.debugAbortLevel = NdkConfigGlobal.DBG_NONE;
    NdkConfigGlobal.debugPrintLevel = NdkConfigGlobal.DBG_NONE;

    /* Assign memory sections and sizes */
    NdkConfigGlobal.pbmDataSection = ".bss:NDK_PACKETMEM";
    NdkConfigGlobal.memDataSection = ".bss:NDK_MMBUFFER";
    NdkConfigGlobal.lowTaskStackSize = 8192;
    NdkConfigGlobal.normTaskStackSize = 8192;
    NdkConfigGlobal.highTaskStackSize = 8192;
    NdkConfigGlobal.ndkThreadStackSize = 8192;
    NdkConfigGlobal.pktSizeFrameBuf = 1536;
    if (NspTfdtpInclude == "yes")
    {
    /* TFDTP stack needs at least 512 NDK Frame buffers */
    NdkConfigGlobal.pktNumFrameBufs = 512;
    }
    else
    {
    NdkConfigGlobal.pktNumFrameBufs = 192;
    }
    NdkConfigGlobal.memRawPageSize = 3072;
    NdkConfigGlobal.memRawPageCount = 16;

    /* Use hook functions available in the ti.ndk.config.Global module to add CGI commands */
    NdkConfigGlobal.networkOpenHook = '&netOpenHook';
    NdkConfigGlobal.networkCloseHook = '&netCloseHook';

    /* change the size of our receive buffers */
    Tcp.transmitBufSize = 64*1024;
    Tcp.receiveBufSize = 64*1024;
    Tcp.receiveBufLimit = 64*1024;
    Udp.receiveBufSize = 64*1024;

    /* increase buffer sizes when NDK runs on A15 to get higher throughput */
    if(NdkProcToUse=="a15_0")
    {
    NdkConfigGlobal.pktNumFrameBufs = 192*8;
    NdkConfigGlobal.memRawPageCount = 16*8;
    Tcp.transmitBufSize = 256*1024;
    Tcp.receiveBufSize = 256*1024;
    Tcp.receiveBufLimit = 256*1024;
    }

    if (enableStaticIP)
    {
    /* Settings for static IP configuration */
    Ip.address = "192.168.1.200";
    Ip.mask = "255.255.255.0";
    Ip.gatewayIpAddr = "192.168.1.1";
    Ip.ifIdx = 1;
    }
    else
    {
    Ip.dhcpClientMode = Ip.CIS_FLG_IFIDXVALID;
    }

    if(0)
    {
    /* Add a Telnet server */
    var telnetParams = new Telnet.Params();
    telnetParams.callBackFxn = '&ConsoleOpen';
    var telnet = Telnet.create(telnetParams);

    /* Add some user accounts */
    var acct1 = new NdkConfigGlobal.Account();
    acct1.username = "username";
    acct1.password = "password";
    NdkConfigGlobal.addUserAccount(acct1);
    }
  • Hello Stefan,

    Sorry for late reply. Wanted to try both use-cases on my set up first. I could run both use-case without any issues.
    Here are few points to be noted.

    1. TFDTP Rx+ Display works in streaming mode, so this needs rebuild of tools with TFDTP_TX_STREAMING_MODE to 1
    2. For null source with TFDTP use-case, default binaries can be used. If tools are rebuild with streaming mode, this use-case will fail. It needs TFDTP_TX_STREAMING_MODE set to 0

    I believe in your case with Null source TFDTP, data is dropped because you are using streaming mode Tx binary. Can you please confirm?
    Also have you made any changes in the use-case? Current fps is configured to 10 in this use-case, though with TFDTP you can get ~30fps.
    I would suggest to try first with 10fps and then increase.
  • The null source with TFDTP acts like this - When TFDTP_TX_STREAMING_MODE is set to 0, I get the same PBM_alloc error as I mentioned. In that case, I get only upper half of my first frame shown on my display and it is green. Network tools keeps sending out data frames, but nothing is changed on my display (because of that allocation problem).

    I am not working on EVA board anymore because it has some issues and I can not ping it every time... I have switched to board that we have developed (TDA2xx)... I can run all network use cases on it without any problems. We haven't changed anything that could influence TFDTP.
    Can you tell me, what SDK are you using and what is your setup? Did i miss anything during TFDTP configuration (please see the first post again)?

    Is it possible to set the null source (without TFDTP) to work on 30fps?
  • Hello Stefan,

    Are you running PC tools on Linux machine? If not can you please run it on Linux PC?
    If you are already running on Linux machine, we can have webex session to debug this further.

    Is it possible to set the null source (without TFDTP) to work on 30fps?
    >> If you are running networking stack on IPU then you can't get 30fps; moving it to A15 you can get.
  • Hey Prasad,

    sorry for the late response, I was trying various scenarios.
    I was working on windows and now I have switched to linux after which I've concluded that it is the network tools on windows that causes that allocation issue.
    I have tried putting an appimage both built in linux and in windows on my board and to run network tools from linux and TFDTP works without any problems.
    What could cause this bug in windows network tools? Our entire team works in windows so this could be an issue.
  • Hello Stefan,

    Flowcontrol (throughput throttling) on network Tx tools is not supported on the Windows PC. Due to this on Windows PC the Tx rate is actual wire rate (~1Gb) which nullsource couldnt handle and hence causing packet drops.
    Currently for Linux the flow control is implemented using delays which cant be used as it is for Windows.
    You can refer to apps\tools\network_tools\common\src\tfdtp_api.c for flow control code.

    Let me know if any clarifications needed. Thanks.