You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nuttx.apache.org by GitBox <gi...@apache.org> on 2022/11/29 19:03:31 UTC

[GitHub] [nuttx] anchao opened a new pull request, #7732: net/loopback: reuse devif_loopback() logic for device lo(loopback)

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

   ## Summary
   
   net/loopback: reuse devif_loopback() logic for device lo(loopback)
   
   TX poll callback in device lo(loopback) can be replaced by devif_loopback()
   from devif_poll() hook, remove duplicate code to reuse this logic
   
   Signed-off-by: chao an <an...@xiaomi.com>
   
   ## Impact
   
   N/A
   
   ## Testing
   
   net test on localhost(127.0.0.1) & localaddr(192.*.*.*)


-- 
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 commented on a diff in pull request #7732: net/loopback: reuse devif_loopback() logic for device lo(loopback)

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on code in PR #7732:
URL: https://github.com/apache/nuttx/pull/7732#discussion_r1035175202


##########
net/devif/devif_loopback.c:
##########
@@ -123,13 +123,6 @@ int devif_loopback(FAR struct net_driver_s *dev)
         }
 
       NETDEV_TXDONE(dev);
-
-      /* Add the link layer header length for the next loop */
-
-      if (dev->d_len != 0)
-        {
-          dev->d_len += dev->d_llhdrlen;

Review Comment:
   should we keep 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] anchao commented on a diff in pull request #7732: net/loopback: reuse devif_loopback() logic for device lo(loopback)

Posted by GitBox <gi...@apache.org>.
anchao commented on code in PR #7732:
URL: https://github.com/apache/nuttx/pull/7732#discussion_r1035180536


##########
net/devif/devif_loopback.c:
##########
@@ -123,13 +123,6 @@ int devif_loopback(FAR struct net_driver_s *dev)
         }
 
       NETDEV_TXDONE(dev);
-
-      /* Add the link layer header length for the next loop */
-
-      if (dev->d_len != 0)
-        {
-          dev->d_len += dev->d_llhdrlen;

Review Comment:
   Add link layer length in loopback is unnecessary after below change checkin:
   https://github.com/apache/nuttx/pull/7703
   the length of the link layer will be increased in devif_out if any response from ipv4_input()



-- 
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 #7732: net/loopback: reuse devif_loopback() logic for device lo(loopback)

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 merged PR #7732:
URL: https://github.com/apache/nuttx/pull/7732


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