You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by "zhhyu7 (via GitHub)" <gi...@apache.org> on 2023/08/18 15:20:33 UTC

[GitHub] [nuttx] zhhyu7 opened a new pull request, #10293: arp_wait: print dest ip address when receive wait timeout

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

   ## Summary
   If the arp query times out, the destination ip address is displayed to help locate the problem
   
   ## Impact
   
   ## Testing
   sim:local
   


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] pkarashchenko commented on a diff in pull request #10293: arp_wait: print dest ip address when receive wait timeout

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on code in PR #10293:
URL: https://github.com/apache/nuttx/pull/10293#discussion_r1298737288


##########
net/arp/arp_send.c:
##########
@@ -372,7 +372,9 @@ int arp_send(in_addr_t ipaddr)
       /* Increment the retry count */
 
       state.snd_retries++;
-      nerr("ERROR: arp_wait failed: %d\n", ret);
+      nerr("ERROR: arp_wait failed: %d, ipaddr: %d.%d.%d.%d\n", ret,
+           (int)(ipaddr & 0xff), (int)((ipaddr >> 8) & 0xff),
+           (int)((ipaddr >> 16) & 0xff), (int)(ipaddr >> 24));

Review Comment:
   @anchao could you please take a look?



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] pkarashchenko commented on a diff in pull request #10293: arp_wait: print dest ip address when receive wait timeout

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on code in PR #10293:
URL: https://github.com/apache/nuttx/pull/10293#discussion_r1298843556


##########
net/arp/arp_send.c:
##########
@@ -372,7 +372,9 @@ int arp_send(in_addr_t ipaddr)
       /* Increment the retry count */
 
       state.snd_retries++;
-      nerr("ERROR: arp_wait failed: %d\n", ret);
+      nerr("ERROR: arp_wait failed: %d, ipaddr: %d.%d.%d.%d\n", ret,
+           (int)(ipaddr & 0xff), (int)((ipaddr >> 8) & 0xff),
+           (int)((ipaddr >> 16) & 0xff), (int)(ipaddr >> 24));

Review Comment:
   Here is the change https://github.com/apache/nuttx/pull/10301



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] xiaoxiang781216 merged pull request #10293: arp_wait: print dest ip address when receive wait timeout

Posted by "xiaoxiang781216 (via GitHub)" <gi...@apache.org>.
xiaoxiang781216 merged PR #10293:
URL: https://github.com/apache/nuttx/pull/10293


-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] pkarashchenko commented on a diff in pull request #10293: arp_wait: print dest ip address when receive wait timeout

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on code in PR #10293:
URL: https://github.com/apache/nuttx/pull/10293#discussion_r1298732246


##########
net/arp/arp_send.c:
##########
@@ -372,7 +372,9 @@ int arp_send(in_addr_t ipaddr)
       /* Increment the retry count */
 
       state.snd_retries++;
-      nerr("ERROR: arp_wait failed: %d\n", ret);
+      nerr("ERROR: arp_wait failed: %d, ipaddr: %d.%d.%d.%d\n", ret,
+           (int)(ipaddr & 0xff), (int)((ipaddr >> 8) & 0xff),
+           (int)((ipaddr >> 16) & 0xff), (int)(ipaddr >> 24));

Review Comment:
   Actually I'm not sure about this change. I just looked into `inet_ntoa_r` implementation and see that it does similar to current code. I will fill a separate issue for this.



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] pkarashchenko commented on a diff in pull request #10293: arp_wait: print dest ip address when receive wait timeout

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on code in PR #10293:
URL: https://github.com/apache/nuttx/pull/10293#discussion_r1298721293


##########
net/arp/arp_send.c:
##########
@@ -372,7 +372,9 @@ int arp_send(in_addr_t ipaddr)
       /* Increment the retry count */
 
       state.snd_retries++;
-      nerr("ERROR: arp_wait failed: %d\n", ret);
+      nerr("ERROR: arp_wait failed: %d, ipaddr: %d.%d.%d.%d\n", ret,
+           (int)(ipaddr & 0xff), (int)((ipaddr >> 8) & 0xff),
+           (int)((ipaddr >> 16) & 0xff), (int)(ipaddr >> 24));

Review Comment:
   ```suggestion
         nerr("ERROR: arp_wait failed: %d, ipaddr: %d.%d.%d.%d\n", ret,
              ip4_addr1(ipaddr), ip4_addr2(ipaddr),
              ip4_addr3(ipaddr), ip4_addr4(ipaddr));
   ```



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] pkarashchenko commented on a diff in pull request #10293: arp_wait: print dest ip address when receive wait timeout

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on code in PR #10293:
URL: https://github.com/apache/nuttx/pull/10293#discussion_r1298736182


##########
net/arp/arp_send.c:
##########
@@ -372,7 +372,9 @@ int arp_send(in_addr_t ipaddr)
       /* Increment the retry count */
 
       state.snd_retries++;
-      nerr("ERROR: arp_wait failed: %d\n", ret);
+      nerr("ERROR: arp_wait failed: %d, ipaddr: %d.%d.%d.%d\n", ret,
+           (int)(ipaddr & 0xff), (int)((ipaddr >> 8) & 0xff),
+           (int)((ipaddr >> 16) & 0xff), (int)(ipaddr >> 24));

Review Comment:
   Yes. We need to use `ip4_addrX` macro in common code. `inet_ntoa_r` works as expected as is pronto byte by byte. Your code will not work well in BE systems



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [nuttx] pkarashchenko commented on a diff in pull request #10293: arp_wait: print dest ip address when receive wait timeout

Posted by "pkarashchenko (via GitHub)" <gi...@apache.org>.
pkarashchenko commented on code in PR #10293:
URL: https://github.com/apache/nuttx/pull/10293#discussion_r1299187357


##########
net/arp/arp_send.c:
##########
@@ -372,7 +372,9 @@ int arp_send(in_addr_t ipaddr)
       /* Increment the retry count */
 
       state.snd_retries++;
-      nerr("ERROR: arp_wait failed: %d\n", ret);
+      nerr("ERROR: arp_wait failed: %d, ipaddr: %lu.%lu.%lu.%lu\n", ret,

Review Comment:
   I've updated the macro and added `uint8_t` cast as currently only `PRIu32` is the portable way to print.



-- 
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: commits-unsubscribe@nuttx.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org