-
Notifications
You must be signed in to change notification settings - Fork 585
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
lwip: version up 2.0.2 #1260
lwip: version up 2.0.2 #1260
Conversation
Code Rule Check OK. |
1 similar comment
Code Rule Check OK. |
d47e7f1
to
28faa6e
Compare
Code Rule Check OK. |
@sinzah |
Thanks for comment. I didn't consider BUILD_PROTECTED configuration. As you knew that the lwIP netdb API doesn't call TCP/IP thread API directly. I mean that lwIP netdb implementation considering the separation between application and lwIP TCP/IP thread. Could you tell me your opinion and let me know if you have any kinds of question. Additionally, |
28faa6e
to
e2d3e70
Compare
Code Rule Check OK. |
Current implementation will have a problem if protecteced mode(i.e syscall) is enabled. so netdb API should support syscall. |
Could you add comment for further steps?
After fixed above compilation error, I need to fix compilation errors on artik053/nettest configuration. Thanks |
70477df
to
7245304
Compare
apps/system/utils/netcmd_ping.c
Outdated
printf("nu_ping_recv: error [%d]\n", errno); | ||
break; | ||
} | ||
else if (len == 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a coding rule violation. You should locate else if
at same line of closing bracket.
} else if (len == 0) {
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
os/include/net/ethernet.h
Outdated
@@ -59,12 +59,27 @@ | |||
|
|||
#include <stdint.h> | |||
|
|||
#if CONFIG_NET_LWIP |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#ifdef
is correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
os/include/net/lwip/api.h
Outdated
|
||
/* Helpers to process several netconn_types by the same code */ | ||
#define NETCONNTYPE_GROUP(t) (t&0xF0) | ||
#define NETCONNTYPE_DATAGRAM(t) (t&0xE0) | ||
#define NETCONNTYPE_GROUP(t) ((t)&0xF0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add spaces around &
.
((t) & 0xF0)
Same as line 113, 117, 118
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
os/include/net/lwip/api.h
Outdated
/** A callback prototype to inform about events for a netconn */ | ||
typedef void (*netconn_callback)(struct netconn *, enum netconn_evt, u16_t len); | ||
/* A callback prototype to inform about events for a netconn */ | ||
typedef void (*netconn_callback) (struct netconn *, enum netconn_evt, u16_t len); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's remove an added space
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
os/include/net/lwip/api.h
Outdated
#if LWIP_SOCKET | ||
int socket; | ||
struct socketlist *slist; | ||
/** interoperability with tinyara network stack */ | ||
int crefs; /** for dup */ | ||
/* interoperability with tinyara network stack * */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's remove added *.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
os/include/net/lwip/debug.h
Outdated
|
||
#ifndef LWIP_NOASSERT | ||
#define LWIP_ASSERT(message, assertion) do { if (!(assertion)) { \ | ||
LWIP_PLATFORM_ASSERT(message); }} while(0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's use a tab for indentation. coding rule violation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
os/include/net/lwip/debug.h
Outdated
#error "If you want to use LWIP_DEBUG, LWIP_PLATFORM_DIAG(message) needs to be defined in your arch/cc.h" | ||
#endif | ||
#define LWIP_DEBUGF(debug, message) do { \ | ||
if ( \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
same as previous
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
os/include/net/lwip/def.h
Outdated
@@ -60,46 +66,23 @@ extern "C" { | |||
#define LWIP_MAX(x , y) (((x) > (y)) ? (x) : (y)) | |||
#define LWIP_MIN(x , y) (((x) < (y)) ? (x) : (y)) | |||
|
|||
/* Get the number of entries in an array ('x' must NOT be a pointer!) */ | |||
#define LWIP_ARRAYSIZE(x) (sizeof(x)/sizeof((x)[0])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spaces around '/'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
os/include/net/lwip/def.h
Outdated
#define LWIP_ARRAYSIZE(x) (sizeof(x)/sizeof((x)[0])) | ||
|
||
/** Create u32_t value from bytes */ | ||
#define LWIP_MAKEU32(a,b,c,d) (((u32_t)((a) & 0xff) << 24) | \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
space after ','
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
os/include/net/lwip/def.h
Outdated
(((x) & 0xff0000UL) >> 8) | \ | ||
(((x) & 0xff000000UL) >> 24)) | ||
#define PP_HTONL(x) ((((x) & 0x000000ffUL) << 24) | \ | ||
(((x) & 0x0000ff00UL) << 8) | \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
spaces at start of line are not allowed to coding rule.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
@sinzah There are some coding rule violations. Could you check all of lwip source codes through our coding rule checker? ( I saw it roughly) |
Thanks for reviews Is it fine to use /os/tools/formatter.sh ? |
@sinzah There is the formatter.sh on os/tools. But be aware of abnormal operation for type casting. |
e2d3e70
to
0037f5c
Compare
Code Rule Check OK. |
Code Rule Check Result: |
caf4ec0
to
19f0685
Compare
Code Rule Check OK. |
19f0685
to
c3e446f
Compare
Code Rule Check Result: |
c3e446f
to
b245fc5
Compare
Code Rule Check Result: |
b245fc5
to
63376e6
Compare
Code Rule Check OK. |
63376e6
to
a9d694e
Compare
Code Rule Check OK. |
I've rebased my github to rearrage the commit, so some commits are disappeared. As results of code rule checker, hopefully every code rule is OK in my pull request. If you have any kinds of concerns, please comment |
add checking that AF_NETLINK is set, before test AF_NETLINK network tests Change-Id: I7ad8c6d6a5b23cab8543e20d5678db1e9f3f8018 Signed-off-by: Olga Pokrovskaya <[email protected]>
htons, htonl, inet_addr, inet_ntoa, inet_ntop, inet_pton APIs are duplicate in libc and lwip. This patch removes APIs in libc and also includes changes so that lwip APIs can be used. Change-Id: Ic05bd09d68e74678298a5b6d41548bb246ab5749 Signed-off-by: EunBong Song <[email protected]>
lwip_rand() is defined in net/lwip/arch.h INET_ADDRSTRLEN and INET6_ADDRSTRLEN are defined in arpa/inet.h Change-Id: I070f2997dd85fad66a90042a6e18bfda2a4a7aae Signed-off-by: bossjisu <[email protected]>
function wrapping method is changed from definition to function wrapping. this is better to avoid side effects. Change-Id: I5873e82357286bb0073a9caa68e1f73949faf745 Signed-off-by: jisuu.kim <[email protected]>
This commit is patch to fix compilation warning on recvmsg. - to prevent build compliation error, fix it Signed-off-by: Jin-Seong Kim <[email protected]>
This commit is patch to fix build error. - the header file (inet.h) location has been changed from /lwip/ipv4/inet.h to /lwip/inet.h on lwIP 2.0.2 Signed-off-by: Jin-Seong Kim <[email protected]>
This commit is patch to fix to introduce cmsghdr data structure - add cmsghdr and related MACRO to support iotivity and so on - struct iovec is defined in multiple header file, to prevent duplicated definition, fix them to use struct iovec in uio.h Signed-off-by: Jin-Seong Kim <[email protected]>
This commit is to introduce getnameinfo API - add getnameinfo for the compatibility with iotivity. this function provide restricted function. - supported flags: NI_NUMERICHOST, NI_NUMERICSERV - unsupported flags: NI_NOFQDN, NI_NAMEREQD, NI_DGRAM, NI_NUMERICSCOPE Change-Id: I7dc999614c1f4c324df0b7aee9053474fb3f26ad Signed-off-by: jisuu.kim <[email protected]>
This commit is patch to fix compatibility issues on iotivity after updated lwip 2.0.2 - add CONFIG_NET_IPv6 configuration, to prevent derefernce either undefined variables, macros or definitions - EAI_SYSTEM is unsupported on lwIP so add condition - USE_IP_MREQN is not supported on TizenRT so undef it Signed-off-by: Jin-Seong Kim <[email protected]>
This commit is patch to restore sock_internal.h file - qemu build configuration doesn't configure CONFIG_NET_LWIP, so socket related data structure is not defined on qemu build configuration. - to support qemu build configuration, restore sock_internal.h header which is only used without CONFIG_NET_LWIP option. Signed-off-by: Jin-Seong Kim <[email protected]>
This commit is patch to remove duplicated defined APIs - prototypes for netdb API are defined in netdb.h, however lwip/netdb.h has macro to map them to lwip APIs. - it can cause linking error due to duplicated definition, so remove macros in lwip/netdb.h. Signed-off-by: Jin-Seong Kim <[email protected]>
This commit is patch to fix type on Kconfig - previously wrong name is used as TCP_WND_UPDATE_THREASHOLD, fix it to TCP_WND_UPDATE_THRESHOLD Change-Id: I1ff85b2158143ee9c7dc6628d768553dfc04d5d1 Signed-off-by: Jin-Seong Kim <[email protected]>
This commit is patch to fix typo and update value of TCP_WND_UPDATE_THRESHOLD - fix typo : THREASHOLD -> THRESHOLD - increase value of TCP_WND_UPDATE_THRESHOLD to 14600 - lwIP 1.4.1 default value is set to (TCP_WND / 4) lwIP 2.0.2 changed it to LWIP_MIN((TCP_WND / 4), (TCP_MSS * 4)), so without fixed type, the value is set to (1460 * 4) = 5840 - it can cause TCP throughput degradation due to congestion control through window inflation Change-Id: Id3f553920d2dfd239c60f0697048250ecaae3a87 Signed-off-by: Jin-Seong Kim <[email protected]>
This commit is build error fixes after version-up lwip 2.0.2 - AF_UNIX is not supported socket domain on lwip so add !__TIZENRT__ condition. - IPPROTO_IPV6 should be used with CONFIG_NET_IPv6, so added condition to resolve build error. Signed-off-by: Jin-Seong Kim <[email protected]>
This commit is cosmetic patch for TizenRT coding style - else if should be located at the same line of closing bracket Signed-off-by: Jin-Seong Kim <[email protected]>
This commit is cosmetic patch for TizenRT coding style - some headers violates TizenRT coding style, so fixed it. Signed-off-by: Jin-Seong Kim <[email protected]>
arm-none-eabi-gcc 7.2.1 shows below compilation error message on sendmsg socket/sendmsg.c: In function 'sendmsg': error: pointer targets in initialization differ in signedness [-Werror=pointer-sign] int *addrlen = &(msg->msg_namelen); Signed-off-by: Jin-Seong Kim <[email protected]>
This function is for backward compatibility to TizenRT socket function.
1. If there are no dot (".") on given IPv4 address, return 0. 2. Fix return value of inet_pton when received invalid af. If address family is not neither AF_INET or AF_INET6, inet_pton should return -1 as Linux man page (man inet_pton). - If af does not contain a valid address family, -1 is returned and errno is set to EAFNOSUPPORT.
f73924b
to
b9d7bab
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems good to me
@pillip8282 |
@sinzah Could you check my comment again? I again find year of copyright is 2016 in newly added file, like snmp.h. |
Update year of license for newly added files on lwip 2.0.2
I changed year of license from 2016 to 2018 for below newly added files (130 files). |
Target : [5d05e2d] - Code Rule Check OK. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems good to me
# lwIP version up - initial updates from 1.4.1 to 2.0.2
To support IPv6 completely, lwIP version should be updated to later than 2.0.2
So, this pull request is registered to version up TizenRT lwip stack from 1.4.1 to 2.0.2
This is a base pull request to go next step for merging IPv6 Ready patches
Major Changes:
struct hostent *gethostbyname(const char *name) { return lwip_gethostbyname(name); }
Minor Changes:
Test Results
Basic regression test (IPv4, configuration : artik053/nettest)
Build Sanity Test : OK