<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>MQX Software Solutions中的主题 UDP Socket Problem...</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/UDP-Socket-Problem/m-p/186860#M3310</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm testing UDP Socket program.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I made 8 UDP server tasks and each tasks has their own UDP socket.&lt;/P&gt;&lt;P&gt;(MQX Version&amp;nbsp; 3.4.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Every socket was created successfully. ( _RTCS_socket_part_init&amp;nbsp; is set to&amp;nbsp; 10)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;_RTCS_socket_part_init = 10;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code works fine with short UDP frame less than 800 bytes frame.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, If UDP frame is longer than 800, recvfrom() function is never return.&lt;/P&gt;&lt;P&gt;(I'm not sure the exact number. But,&amp;nbsp;I just tested by 800 bytes frame and 900 bytes frame sending UDP client.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I traced into recvfrom() and I found OVERRUN error.&lt;/P&gt;&lt;P&gt;Received packet length seems to correct,&amp;nbsp;however packet was discarded.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't understand, why overrun error occured.....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I received Long(1500)&amp;nbsp;UDP frame.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Who can tell me where I'm wrong or something can be modified?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I appreciate any kind of your reply...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 29 Oct 2020 09:38:01 GMT</pubDate>
    <dc:creator>OOLife</dc:creator>
    <dc:date>2020-10-29T09:38:01Z</dc:date>
    <item>
      <title>UDP Socket Problem...</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UDP-Socket-Problem/m-p/186860#M3310</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hello?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm testing UDP Socket program.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I made 8 UDP server tasks and each tasks has their own UDP socket.&lt;/P&gt;&lt;P&gt;(MQX Version&amp;nbsp; 3.4.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Every socket was created successfully. ( _RTCS_socket_part_init&amp;nbsp; is set to&amp;nbsp; 10)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;_RTCS_socket_part_init = 10;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My code works fine with short UDP frame less than 800 bytes frame.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But, If UDP frame is longer than 800, recvfrom() function is never return.&lt;/P&gt;&lt;P&gt;(I'm not sure the exact number. But,&amp;nbsp;I just tested by 800 bytes frame and 900 bytes frame sending UDP client.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So, I traced into recvfrom() and I found OVERRUN error.&lt;/P&gt;&lt;P&gt;Received packet length seems to correct,&amp;nbsp;however packet was discarded.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't understand, why overrun error occured.....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I received Long(1500)&amp;nbsp;UDP frame.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Who can tell me where I'm wrong or something can be modified?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I appreciate any kind of your reply...&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:38:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UDP-Socket-Problem/m-p/186860#M3310</guid>
      <dc:creator>OOLife</dc:creator>
      <dc:date>2020-10-29T09:38:01Z</dc:date>
    </item>
    <item>
      <title>Re: Asking more details...</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UDP-Socket-Problem/m-p/186861#M3311</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, experts...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Following is my RTCS Setup code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt; _RTCSPCB_init = 4; _RTCSPCB_grow = 2; _RTCSPCB_max = 20; _RTCS_msgpool_init = 4; _RTCS_msgpool_grow = 2; _RTCS_msgpool_max  = 20; _RTCS_socket_part_init = 4; _RTCS_socket_part_grow = 2; _RTCS_socket_part_max  = 20;  _UDP_max_queue_size    = 3000;    _RTCSTASK_priority = 6; _RTCSTASK_stacksize = 10000;... error = RTCS_create(); error = ipcfg_init_device(0, mac); error = ipcfg_bind_staticip(0, &amp;amp;ip_data);...// Each Task call this function for socket binding.// currently, I used 8 UDP sockets.void Bindings( uint_32 *pSock, sockaddr_in *pladdr, uint_32 portNo ){ uint_32     error; pladdr-&amp;gt;sin_family      = AF_INET; pladdr-&amp;gt;sin_port        = portNo; pladdr-&amp;gt;sin_addr.s_addr = INADDR_ANY; *pSock = socket(PF_INET, SOCK_DGRAM, 0); if( *pSock==RTCS_SOCKET_ERROR ) {  printf("error; port=%d\n", portNo);  _task_block(); }  error = bind(*pSock, pladdr, sizeof(sockaddr_in)); if( error!=RTCS_OK ) {  printf("error; bind port=%d, error=0x%lx\n", error);  _task_block(); }}// Each Task has infinite while loop.void TASK1( uint_32 initial_data ){ // local variable definition ... Bindings( &amp;amp;sock, &amp;amp;laddr, 20000 ); while( 1 ) {  rlen = sizeof(raddr);  length = recvfrom(sock, buffer, sizeof(buffer), 0, &amp;amp;raddr, &amp;amp;rlen);  printf("received length = %d\n", length);... }}&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Abobe code works fine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, if frame size is longer than 823 bytes then recvfrom() is never return.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;CW7.2 / RTCS / Ethernet Status&amp;nbsp; dialog is shown attached image.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Rx DMA Overrun: 63&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; --&amp;gt; this counter is exactly matched with my test sending counter.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I fix it?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Let me know if I the question isn't very clear.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to know how to&amp;nbsp;modify&amp;nbsp;or check my souce code&amp;nbsp;in order to prevent this Rx DMA Overrun error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 29 Oct 2020 09:38:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UDP-Socket-Problem/m-p/186861#M3311</guid>
      <dc:creator>OOLife</dc:creator>
      <dc:date>2020-10-29T09:38:02Z</dc:date>
    </item>
    <item>
      <title>Re: Asking more details...</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/UDP-Socket-Problem/m-p/186862#M3312</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Finally, I got the answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Everything works fine !! &lt;IMG alt=":smileyvery-happy:" class="emoticon emoticon-smileyvery-happy" id="smileyvery-happy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-very-happy.gif" title="Smiley Very Happy" /&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Don't create DMA Buffer (of RTCS Task) on the External Memory....&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It's the answer.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;OOLife&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Mar 2010 10:31:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/UDP-Socket-Problem/m-p/186862#M3312</guid>
      <dc:creator>OOLife</dc:creator>
      <dc:date>2010-03-29T10:31:24Z</dc:date>
    </item>
  </channel>
</rss>

