最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

configuration - How does VxWorks handle .cdf files in the build process, and do they affect NUM_DAT_CLBLKS? - Stack Overflow

programmeradmin2浏览0评论

I am working with VxWorks and encountering a network buffer full issue when appending RTP headers in my subroutine rtp_push_hdr. This function allocates space at the beginning of the packet buffer, causing packets to be copied to a new packet with headers prepended. However, during this operation, the buffer seems to be full, leading to allocation failures message in the console. rtp_push_hdr fails dropping packet::. errno:3997698

Method which calls rtd_push_hdr function

void packet_forward(...)
{
....
if (!(rtp = rtp_push_hdr(&new_pkt)))
    {
        print("rtp_push_hdr fails dropping packet::. errno:%d \n", errno);

        return -ENOMEM;
    }
....
}

rtp_push_hdr definition

/*******************************************************************************
*
* rtp_push_hdr - Allocates space at the beginning of the packet buffer
*              and returns a pointer to that space.
*
* Parameters:
* \is
* \i <ppkt>
* Pointer to Packet pointer.
* \ie
*
* RETURNS: A pointer to the newly allocated data area. NULL if failure.
*
* ERRNO:
*/
static __inline__ rtp_hdr_t* rtp_push_hdr(Ipcom_pkt **ppkt)
{
...
      if (IP_UNLIKELY(hdr == IP_NULL))
        {
            ipcom_pkt_free(*ppkt);
            return NULL;
        }
....

Based on my research, it appears that NUM_DAT_CLBLKS needs to be increased to expand the available buffer space. I found that NUM_DAT_CLBLKS is set within a .cdf file (comp_net_pool_vx.cdf) as follows:

Parameter NUM_DAT_MBLKS {
    NAME        NUM_DAT_MBLKS
    SYNOPSIS    # of MBLKS in Data Pool
    DEFAULT     NUM_DAT_CLBLKS
    TYPE        uint
}

I have tried to add NUM_DAT_CLBLKS and NUM_NET_MBLKS parameters to my project.wpj (workbench) setting file and to my surprise the prjParams.h file generated doesnt have these new params.

My question is,does VxWorks process .cdf files during the build process, and if so, how are these parameters included in the final configuration? Is modifying NUM_DAT_CLBLKS sufficient to resolve network buffer exhaustion, or should I also adjust related parameters such as NUM_DAT_MBLKS? Any help regarding would be greatly appreciated! Thanks!!!

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论