GooTal commented on issue #9532:
URL: https://github.com/apache/nuttx/issues/9532#issuecomment-1605396629

   Thanks. I added `ping` for nuttx of loongarch referring to netnsh64 of 
riscv64 version.
   
   I try to ping my host. But no interrupt about network arrived.(I checked 
qemu, no ineterrupt about network raised).
   
   Here`s the description of the bug:
   I noticed that `icmp_ping` called `sendto`
   ```
         nsent = sendto(sockfd, iobuffer, result.outsize, 0,
                        (FAR struct sockaddr *)&destaddr,
                        sizeof(struct sockaddr_in));
         if (nsent < 0)
           {
             icmp_callback(&result, ICMP_E_SENDTO, errno);
             goto done;
           }
         else if (nsent != result.outsize)
           {
             icmp_callback(&result, ICMP_E_SENDSMALL, nsent);
             goto done;
           }
   ```
   `nsent` is the same value(0x40) as rv-virt:netnsh64. 
   Then the `poll` is called. But return value always shows time out (1000ms). 
If i set -1 for time, poll never returns.
   
![图片](https://github.com/apache/nuttx/assets/40800103/74992679-fb1b-43ca-a805-d434deacf913)
   
   Wireshark is not working for me. Because i used user mode for qemu netdev 
not tap mode. Wireshark can only parse the log that qemu dumped. So i used the 
`-object filter-dump,id=o1,netdev=u1,file=./netdump `. But it seems nothing in 
netdump:
   
![图片](https://github.com/apache/nuttx/assets/40800103/c32b25e3-a79d-4648-b122-5e863bca693c)
   
   I want to make sure host has received ping packet. Does the `nsent` value 
mean my host received packets successfully?
   If i can make sure host received packets, it would be easier to debug. Thanks


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