This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Tcp/IP Stack performance doubt

Hi, when I use MDK Network component(RL-TCPnet) based on RL-RTX, I find that the TCP/IP stack can only use polling mode other than interrupt mode? and it's interval is 20ms(I got it from 'eth_thread' in Event Viewer, it excutes every 20ms). Is that right?

The problem is how can I improve the performance within 1ms? If the Network comonent can not work out, is LWIP the better choice for real-time intended applications?

I'm looking forward for your reply. Thank you very much!

Parents
  • Actually it is the driver who defines the operation mode in Driver Capabilities. Network component is capable of using both, interrupt driven and polling mode of CMSIS ethernet driver.

    Here is an example of EMAC_LPC43xx.c ethernet driver capabilities:

    /* Driver Capabilities */
    static const ARM_ETH_MAC_CAPABILITIES DriverCapabilities = {
      0,                                /* checksum_offload_rx_ip4  */
      0,                                /* checksum_offload_rx_ip6  */
      0,                                /* checksum_offload_rx_udp  */
      0,                                /* checksum_offload_rx_tcp  */
      0,                                /* checksum_offload_rx_icmp */
      0,                                /* checksum_offload_tx_ip4  */
      0,                                /* checksum_offload_tx_ip6  */
      0,                                /* checksum_offload_tx_udp  */
      0,                                /* checksum_offload_tx_tcp  */
      0,                                /* checksum_offload_tx_icmp */
      (RTE_ENET_RMII) ?
      ARM_ETH_INTERFACE_RMII :
      ARM_ETH_INTERFACE_MII,            /* media_interface          */
      0,                                /* mac_address              */
      1,                                /* event_rx_frame           */
      1,                                /* event_tx_frame           */
      1,                                /* event_wakeup             */
      (EMAC_TIME_STAMP) ? 1 : 0         /* precision_timer          */
    };
    

    The method you are suggesting is already implemented in new Network Dual Stack. The system creates also a Network Core thread in netInitialize function. This thread waits for an event to occur. An event is either a frame received from any interface or a timer tick. Then net_main is processed, protocol timers are updated and Network Core thread waits for another event to come.

Reply
  • Actually it is the driver who defines the operation mode in Driver Capabilities. Network component is capable of using both, interrupt driven and polling mode of CMSIS ethernet driver.

    Here is an example of EMAC_LPC43xx.c ethernet driver capabilities:

    /* Driver Capabilities */
    static const ARM_ETH_MAC_CAPABILITIES DriverCapabilities = {
      0,                                /* checksum_offload_rx_ip4  */
      0,                                /* checksum_offload_rx_ip6  */
      0,                                /* checksum_offload_rx_udp  */
      0,                                /* checksum_offload_rx_tcp  */
      0,                                /* checksum_offload_rx_icmp */
      0,                                /* checksum_offload_tx_ip4  */
      0,                                /* checksum_offload_tx_ip6  */
      0,                                /* checksum_offload_tx_udp  */
      0,                                /* checksum_offload_tx_tcp  */
      0,                                /* checksum_offload_tx_icmp */
      (RTE_ENET_RMII) ?
      ARM_ETH_INTERFACE_RMII :
      ARM_ETH_INTERFACE_MII,            /* media_interface          */
      0,                                /* mac_address              */
      1,                                /* event_rx_frame           */
      1,                                /* event_tx_frame           */
      1,                                /* event_wakeup             */
      (EMAC_TIME_STAMP) ? 1 : 0         /* precision_timer          */
    };
    

    The method you are suggesting is already implemented in new Network Dual Stack. The system creates also a Network Core thread in netInitialize function. This thread waits for an event to occur. An event is either a frame received from any interface or a timer tick. Then net_main is processed, protocol timers are updated and Network Core thread waits for another event to come.

Children