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/03/12 06:22:51 UTC

[GitHub] [incubator-nuttx] xiaoxiang781216 opened a new pull request #5725: Optimize network subsystem initialization

xiaoxiang781216 opened a new pull request #5725:
URL: https://github.com/apache/incubator-nuttx/pull/5725


   ## Summary
   
   - net: Remove net_lockinitialize
   - net/local: Remove local_initialize 
   - net/tcp: Remove tcp_listen_initialize
   - net/route: Remove net_init_fileroute
   - net/igmp: Remove igmp_initialize 
   - net: Remove the unnecessary initialization code
   - net: Reoder the initialize sequence(mac->ip->tcp/udp) 
   
   ## Impact
   Minor, code refactor
   
   ## Testing
   Pass CI
   


-- 
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] [incubator-nuttx] pkarashchenko commented on pull request #5725: Optimize network subsystem initialization

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on pull request #5725:
URL: https://github.com/apache/incubator-nuttx/pull/5725#issuecomment-1065893814


   Please add `const` to `ip` parameter of `void igmp_removemcastmac(FAR struct net_driver_s *dev, FAR in_addr_t *ip)` and `static void igmp_mcastmac(in_addr_t *ip, FAR uint8_t *mac)`


-- 
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] [incubator-nuttx] pkarashchenko merged pull request #5725: Optimize network subsystem initialization

Posted by GitBox <gi...@apache.org>.
pkarashchenko merged pull request #5725:
URL: https://github.com/apache/incubator-nuttx/pull/5725


   


-- 
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] [incubator-nuttx] xiaoxiang781216 commented on pull request #5725: Optimize network subsystem initialization

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #5725:
URL: https://github.com/apache/incubator-nuttx/pull/5725#issuecomment-1065886718


   > Maybe we can remove
   > 
   > ```
   > #define sq_init(q) \
   >   do \
   >     { \
   >       (q)->head = NULL; \
   >       (q)->tail = NULL; \
   >     } \
   >   while (0)
   > 
   > #define dq_init(q) \
   >   do \
   >     { \
   >       (q)->head = NULL; \
   >       (q)->tail = NULL; \
   >     } \
   >   while (0)
   > ```
   > 
   > if those are not used anymore
   
   Still has some caller, let's do in the new patch.


-- 
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] [incubator-nuttx] pkarashchenko commented on a change in pull request #5725: Optimize network subsystem initialization

Posted by GitBox <gi...@apache.org>.
pkarashchenko commented on a change in pull request #5725:
URL: https://github.com/apache/incubator-nuttx/pull/5725#discussion_r825303147



##########
File path: net/utils/net_lock.c
##########
@@ -49,9 +49,9 @@
  * Private Data
  ****************************************************************************/
 
-static sem_t        g_netlock;
-static pid_t        g_holder = NO_HOLDER;
-static unsigned int g_count  = 0;
+static sem_t        g_netlock = SEM_INITIALIZER(1);
+static pid_t        g_holder  = NO_HOLDER;
+static unsigned int g_count   = 0;

Review comment:
       ```suggestion
   static unsigned int g_count;
   ```




-- 
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] [incubator-nuttx] xiaoxiang781216 commented on a change in pull request #5725: Optimize network subsystem initialization

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on a change in pull request #5725:
URL: https://github.com/apache/incubator-nuttx/pull/5725#discussion_r825304161



##########
File path: net/utils/net_lock.c
##########
@@ -49,9 +49,9 @@
  * Private Data
  ****************************************************************************/
 
-static sem_t        g_netlock;
-static pid_t        g_holder = NO_HOLDER;
-static unsigned int g_count  = 0;
+static sem_t        g_netlock = SEM_INITIALIZER(1);
+static pid_t        g_holder  = NO_HOLDER;
+static unsigned int g_count   = 0;

Review comment:
       Done.




-- 
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] [incubator-nuttx] xiaoxiang781216 commented on pull request #5725: Optimize network subsystem initialization

Posted by GitBox <gi...@apache.org>.
xiaoxiang781216 commented on pull request #5725:
URL: https://github.com/apache/incubator-nuttx/pull/5725#issuecomment-1065903258


   Done, @pkarashchenko .


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