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

[GitHub] [nuttx] acassis commented on a diff in pull request #8333: net/tcp: reuse common api to replace some ip select code

acassis commented on code in PR #8333:
URL: https://github.com/apache/nuttx/pull/8333#discussion_r1090046635


##########
net/netdev/netdev_txnotify.c:
##########
@@ -57,17 +57,9 @@
 #ifdef CONFIG_NET_IPv4
 void netdev_ipv4_txnotify(in_addr_t lipaddr, in_addr_t ripaddr)
 {
-  FAR struct net_driver_s *dev;
-
   /* Find the device driver that serves the subnet of the remote address */
 
-  dev = netdev_findby_ripv4addr(lipaddr, ripaddr);
-  if (dev && dev->d_txavail)
-    {
-      /* Notify the device driver that new TX data is available. */
-
-      dev->d_txavail(dev);
-    }
+  netdev_txnotify_dev(netdev_findby_ripv4addr(lipaddr, ripaddr));

Review Comment:
   Good! I was worried about netdev_findby_ripv4addr() could return NULL dev, but I confirmed that netdev_txnotify_dev() is checking it before proceeding.



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