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 2020/06/24 10:21:02 UTC

[GitHub] [incubator-nuttx] anchao opened a new pull request #1291: socket/SOL: sync the SOL index with linux

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


   ## Summary
   socket/SOL: sync the SOL index with linux 
   
   ## Testing
   
   CI check is enough
   


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

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



[GitHub] [incubator-nuttx] anchao commented on pull request #1291: socket/SOL: sync the SOL index with linux

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


   > @anchao is there any benefit to be "sync" with linux?
   
   Unsynchronized options will cause some compatibility issues, 
   for example:
   
   `setsockopt(sock, IPPROTO_IP, IP_ADD_MEMBERSHIP, &mreq, sizeof(mreq));`
   
   ```
   int psock_setsockopt(FAR struct socket *psock, int level, int option,
                        FAR const void *value, socklen_t value_len)
   ...
         case SOL_IP:    <-- 
           ret = ipv4_setsockopt(psock, option, value, value_len);
           break;
   ....
   ```
   
   this option configure will be failure since IPPROTO_IP and SOL_IP are different definitions in NuttX,
   if we want to be fully compatible with posix applications, the experience of adopting Linux will be a good choice.


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

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



[GitHub] [incubator-nuttx] yamt commented on pull request #1291: socket/SOL: sync the SOL index with linux

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


   i suspect dense numbers are easier for compilers to optimize switch statements.


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

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



[GitHub] [incubator-nuttx] acassis commented on pull request #1291: socket/SOL: sync the SOL index with linux

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


   @PetervdPerk-NXP Could you please review?


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

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



[GitHub] [incubator-nuttx] anchao edited a comment on pull request #1291: socket/SOL: sync the SOL index with linux

Posted by GitBox <gi...@apache.org>.
anchao edited a comment on pull request #1291:
URL: https://github.com/apache/incubator-nuttx/pull/1291#issuecomment-650964575


   > ok. sync with IPPROTO_ makes sense.
   > actually, shouldn't we just remove all SOL_ constants except SOL_SOCKET, and use IPPROTO_ constants instead?
   
   Done, please help to review the following PR:
   https://github.com/apache/incubator-nuttx/pull/1320
   https://github.com/apache/incubator-nuttx-apps/pull/311
   
   


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

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



[GitHub] [incubator-nuttx] anchao commented on pull request #1291: socket/SOL: sync the SOL index with linux

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


   > ok. sync with IPPROTO_ makes sense.
   > actually, shouldn't we just remove all SOL_ constants except SOL_SOCKET, and use IPPROTO_ constants instead?
   
   Done, please help to review the following PR:
   https://github.com/apache/incubator-nuttx/pull/1291
   https://github.com/apache/incubator-nuttx-apps/pull/311
   
   


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

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



[GitHub] [incubator-nuttx] jerpelea commented on pull request #1291: socket/SOL: sync the SOL index with linux

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


   LGTM


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

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



[GitHub] [incubator-nuttx] xiaoxiang781216 merged pull request #1291: socket/SOL: sync the SOL index with linux

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


   


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

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



[GitHub] [incubator-nuttx] yamt commented on pull request #1291: socket/SOL: sync the SOL index with linux

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


   ok. sync with IPPROTO_ makes sense.
   actually, shouldn't we just remove all SOL_ constants except SOL_SOCKET, and use IPPROTO_ constants instead?
   
   


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

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



[GitHub] [incubator-nuttx] yamt commented on pull request #1291: socket/SOL: sync the SOL index with linux

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


   @anchao is there any benefit to be "sync" with linux?


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

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