anchao opened a new pull request, #21027:
URL: https://github.com/apache/nuttx/pull/21027

   ## Summary                                                               
                                                                            
   Optimize the Telnet character driver RX and TX data paths by copying     
   ordinary data in chunks instead of processing every byte through the     
   slow path.                                                               
                                                                            
   ## Details                                                               
                                                                            
   This change adds two fast paths in `drivers/net/telnet.c`:               
                                                                            
   - On receive, normal data is copied in chunks until the next Telnet IAC  
     byte is found. Telnet option handling and sub-negotiation still use the
     existing byte-by-byte state machine.                                   
   - On transmit, output spans that do not need CR/LF translation are copied
     into the TX buffer in chunks. The existing per-byte path is still used 
     for CR/LF handling and buffer flush boundaries.                        
                                                                            
   This reduces per-byte loop overhead for common Telnet console traffic    
   while preserving protocol behavior.                                      
   
   ## Test
   
   sim/adb


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to