Sarthak-Pandey commented on PR #20702:
URL: https://github.com/apache/nuttx/pull/20702#issuecomment-6556190306

   Hi @casaroli and @acassis,
   
   Thank you for the detailed feedback. I have updated the PR description and 
performed comprehensive verification on both Flat and Kernel builds, including 
stress testing and existing application testing.
   
   ### 1. PR Description Corrections
   - Corrected the POSIX guard return value in the PR description: `msg_iovlen 
== 0` returns `-EMSGSIZE` (matching the implementation and POSIX spec).
   - Clarified the TCP send zero-allocation item: intermediate buffer bypass 
occurs when `CONFIG_NET_TCP_WRITE_BUFFERS=y` is enabled.
   
   ### 2. Verification Matrix
   | Test Suite / Scope | Target Build | Result | Notes |
   |---|---|---|---|
   | `iob` Unit & Dynamic Stress (1k + 10k loops) | Flat (`sim:tcploop`) | 
**PASS** | No memory leaks; tested asymmetric vectors, non-zero offsets, and 
boundary crossings. |
   | `net_iov_test` (UNIX / Local Sockets) | Flat (`sim:tcploop`) & Kernel 
(`rv-virt:knsh`) | **PASS** | 3 iovs send -> 4 iovs recv with `MSG_WAITALL`. 
100% data match. |
   | `net_iov_test` (UDP Datagram Sockets) | Flat (`sim:tcploop`) & Kernel 
(`rv-virt:knsh`) | **PASS** | Full datagram multi-iov send/recv + shorter iov 
truncation verification. |
   | `net_iov_test` (TCP Stream Sockets) | Flat (`sim:tcploop`) & Kernel 
(`rv-virt:knsh`) | **PASS** | Multi-iov send across stream boundaries. |
   | `net_iov_test` (CAN RAW Sockets) | Flat (`sim:tcploop`) & Kernel 
(`rv-virt:knsh`) | **PASS** | Verified POSIX `msg_iovlen == 0` guard and MTU 
integrity. |
   | Shorter Buffer / Truncation (UDP) | Flat & Kernel | **PASS** | Verified 
partial copy into shorter vector buffer with trailing datagram payload 
discarded. |
   | Existing Application (`tcpblaster`) | Flat (`sim:tcploop`) | **PASS** | 
Streamed >5MB over TCP loopback with `CONFIG_NET_TCP_WRITE_BUFFERS=y`. |
   
   ### 3. Execution Logs
   
   <details>
   <summary><b>Kernel Build Log (rv-virt:knsh on QEMU + OpenSBI)</b></summary>
   
   ```text
   OpenSBI v1.7
   Platform Name : riscv-virtio,qemu
   Runtime SBI Version : 3.0
   NuttShell (NSH) NuttX-13.1.0
   nsh> net_iov_test
   
   ============================================================
      Apache NuttX Scatter-Gather (msg_iov) Verification Suite  
   ============================================================
   
   ------------------------------------------------------------
   [TEST 1/4] UNIX Domain Stream Sockets (AF_LOCAL)
   ------------------------------------------------------------
     [PASS] recvmsg(msg_iovlen = 0) returns -EMSGSIZE
     [PASS] sendmsg(3 iovs: 16+32+16) sent 64 bytes
     [PASS] recvmsg(4 iovs: 8+20+16+20, WAITALL) read 64 bytes
     [PASS] Data integrity: 100% match across all vectors
   ------------------------------------------------------------
   [TEST 2/4] UDP Datagram Sockets (AF_INET, SOCK_DGRAM)
   ------------------------------------------------------------
     [PASS] recvmsg(msg_iovlen = 0) returns -EMSGSIZE
     [PASS] sendmsg(3 iovs: 20+20+24 = 64 bytes) sent OK
     [PASS] recvmsg(2 iovs: 32+32) full datagram match 100%
     [PASS] Shorter iov buffer: recvmsg returned 28 bytes
     [PASS] Truncated data copied; remaining data dropped
   ------------------------------------------------------------
   [TEST 3/4] TCP Stream Sockets (AF_INET, SOCK_STREAM)
   ------------------------------------------------------------
     [PASS] sendmsg(msg_iovlen = 0) returns -EMSGSIZE
     [PASS] sendmsg(3 iovs: 15+35+50 = 100 bytes) sent OK
     [PASS] recvmsg(2 iovs: 50+50) received full 100 bytes
   ------------------------------------------------------------
   [TEST 4/4] CAN RAW Sockets (AF_CAN, SOCK_RAW)
   ------------------------------------------------------------
     [PASS] can sendmsg guard: returns -ENODEV without netdev
     [PASS] can recvmsg(msg_iovlen = 0) returns -EMSGSIZE
     [PASS] can sendmsg guard: returns -ENODEV without netdev
   
   ============================================================
     >>> ALL SCATTER-GATHER (IOV) TESTS PASSED! <<<
   ============================================================
   


-- 
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