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

[GitHub] [nuttx] anchao opened a new pull request, #8333: support ipv4 ToS and ipv6 TrafficClass

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

   ## Summary
   
   commit 4a45bfea5d0d2e7327471019f26b6914a6a549c5
   Author: chao an <an...@xiaomi.com>
   Date:   Sun Jan 29 13:11:57 2023 +0800
   
       net/tcp: reuse common api to replace some ip select code
       
       Signed-off-by: chao an <an...@xiaomi.com>
   
   commit 0907c6da35692c9ce8216a05cc0110b08618e563
   Author: zhanghongyu <zh...@xiaomi.com>
   Date:   Thu Jan 19 17:08:59 2023 +0800
   
       tcp_reset: check the conn is exist when tcp_reset
       
       tcp_input:
       If we didn't find an active connection that expected the packet,
       If the SYN flag isn't set,
       It is an old packet and we send a RST.
       conn is NULL when this case
       
       Signed-off-by: zhanghongyu <zh...@xiaomi.com>
   
   commit 1acbe5b7d0e65786e53e43ea573e4e628bc84eac
   Author: 梁超众 <li...@xiaomi.com>
   Date:   Wed Dec 21 12:40:42 2022 +0800
   
       support ipv4 ToS and ipv6 TrafficClass
       
       Signed-off-by: 梁超众 <li...@xiaomi.com>
   
   commit ab2f424bcd4cec995a2c2c0120fc1875cdaf2f88
   Author: 梁超众 <li...@xiaomi.com>
   Date:   Fri Jan 13 19:31:05 2023 +0800
   
       add UDP compile option to avoid build error
       
       The following build error happens when CONFIG_NET_IPv6 is enabled and CONFIG_NET_UDP is not enabled.
       
       inet/ipv6_setsockopt.c:132:19: error: invalid use of undefined type 'struct udp_conn_s'
       132 |               conn->flags |= _UDP_FLAG_PKTINFO;
       |                   ^~
         inet/ipv6_setsockopt.c:132:30: error: '_UDP_FLAG_PKTINFO' undeclared (first use in this function)
           132 |               conn->flags |= _UDP_FLAG_PKTINFO;
               |                              ^~~~~~~~~~~~~~~~~
         inet/ipv6_setsockopt.c:132:30: note: each undeclared identifier is reported only once for each function it appears in
         inet/ipv6_setsockopt.c:136:19: error: invalid use of undefined type 'struct udp_conn_s'
           136 |               conn->flags &= ~_UDP_FLAG_PKTINFO;
       
       Signed-off-by: 梁超众 <li...@xiaomi.com>
   
   
   
   ## Impact
   
   N/A
   
   ## Testing
   
   ipv4/v6 iperf test
   


-- 
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] acassis commented on a diff in pull request #8333: net/tcp: reuse common api to replace some ip select code

Posted by "acassis (via GitHub)" <gi...@apache.org>.
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


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

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


##########
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:
   Yes, so we can reuse the checking code from netdev_txnotify_dev() and remove the redundant check



-- 
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 #8333: net/tcp: reuse common api to replace some ip select code

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


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