Quantcast
Channel: Forum - Recent Threads
Viewing all articles
Browse latest Browse all 5781

zero copy TCP usage

$
0
0

Hi,

I am developing a device using S7G2 with E2studio and am having issues with NetX zero copy function. I cannot find an application note or example to show how it works.

Here is the part of my code but it always return with 3 ( OVERFLOW ):

 

NX_PACKET *pTxPacket;

nx_packet_allocate(&g_packet_pool0, &pTxPacket, NX_TCP_PACKET, NX_WAIT_FOREVER);

 /* pass the tcp packet buffer to my application */       

length = myAppl(pTxPacket->nx_packet_prepend_ptr);

pTxPacket->nx_packet_length      = length;

pTxPacket->nx_packet_append_ptr  = pTxPacket->nx_packet_prepend_ptr + length;

status = nx_tcp_socket_send(&EthInfo.TcpSocket, pTxPacket, NX_WAIT_FOREVER );

if ( status == NX_SUCCESS ) {

        #ifdef ETH_DEBUG

         TxCount++;

        #endif

 } else {

         Error = status;

         nx_packet_release(pTxPacket);

}

as long as the length is a small number ( I believe it has to be smaller than MSS ), it works fine. When I want to send a bigger package such as length = 4096,  status is always 3 ( OVERFLOW ).

Appreciate if anyone knows if I am missing anything when using this tcp send function.

 

Thanks,

Jimmy


Viewing all articles
Browse latest Browse all 5781

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>