chao.an
6fe0941119
net/tcp: correct the port byte order
...
Change-Id: Ic68e9ff1ddd8b0f00c0a431bf108669edb8aa4fd
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-03-20 00:25:01 +08:00
chao.an
f78bc74d6c
net/usrsock: add send multi-elements support
...
Change-Id: I514cbc98b611f9eb6c76a00c527675cf44bef14a
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-03-20 00:25:01 +08:00
chao.an
a561e15406
usrsock/recv: adjust the close timing to avoid data discard
...
Change-Id: I7bf1cf06c3b73dc32ff38388926b7ffb979b832d
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-03-19 14:53:07 +08:00
chao.an
2919001e3e
net/tcp: do not start the tcp monitor if unestablished
...
Change-Id: Iace9ccfc73086db442db04b95bc508dd48827b82
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-03-19 11:11:40 +08:00
chao.an
08c6d63e9a
usrsock/recv: adjust the close timing to avoid data discard
...
Change-Id: I9dd97c8995201f7a4ca7f6198120ab2bd89d7ed9
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-03-19 11:11:40 +08:00
Jiuzhu Dong
7a6a1c1f42
fs: allocate file/socket dynamically
...
MIRTOS-273
Change-Id: I8aea63eaf0275f47f21fc8d5482b51ffecd5c906
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com >
2021-03-17 21:15:26 +08:00
ligd
1052b2a048
rpmsg_socket: fix rpmsg_socket_device_destroy() multi-access
...
Reason:
When user call rpmsg_socket_close() at the same time
rpmsg_socket_ns_unbind() is called by remote CPU,
then will meet multi-access to rpmsg_socket_device_destroy()
Fix:
reuse recvlock to handle this
Change-Id: I8f33658f19c56a4000382ff9355ff052c45afea0
Signed-off-by: ligd <liguiding1@xiaomi.com >
2021-03-17 14:44:33 +08:00
chao.an
6ef7435082
net/tcp: correct the cache output
...
Change-Id: I30e9352ca9c032e707a86f327c902a976f0cb375
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-03-12 16:34:06 +08:00
Peter Bee
9866f01908
net/local: fix sendmsg return length
...
MIRTOS-495
Return correct length now
Signed-off-by: Peter Bee <bijunda1@xiaomi.com >
Change-Id: I32e3bfc44d8aabd3c19963486cb43962a38f927f
2021-03-12 16:27:47 +08:00
chao.an
c52fc22af1
Revert "net/tcp: return ENOTCONN if the connect migrate to the closed state"
...
This reverts commit 3d0775e79a .
2021-03-08 11:53:30 +08:00
chao.an
3d0775e79a
net/tcp: return ENOTCONN if the connect migrate to the closed state
...
Change-Id: I15ee2a7ccbdc792c2c910ee9632714622bc5e0fd
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-03-06 18:37:15 +08:00
chao.an
19947e0414
net/tcp: correct the port byte order
...
1. correct the port byte order
2. Do not re-select the port if the local port has been bind()
Change-Id: Ia83f7d1aab5c2c0007eb4141fcdaa9ccaea3d319
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-03-06 15:57:41 +08:00
dongjiuzhu1
bb65de6cae
net: unify socket info file descriptor
...
MIRTOS-255
Change-Id: Iee680c8ac07fe87fb6e7900b4f792e0f1ff5036d
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com >
2021-03-03 22:23:44 +08:00
ligd
49389e2695
mm/net/sched: fix warnings
...
Change-Id: I92db0e2cb7ff9e63eef8086a7cc084f67045d69c
Signed-off-by: ligd <liguiding1@xiaomi.com >
2021-03-03 19:26:43 +08:00
chao.an
60f7f71e6c
net/tcp: fix invaild application preload
...
Change-Id: Ifebe4c2715ccfc0e11d8b45792d51912f110d92e
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-03-03 00:25:35 +08:00
Peter Bee
a2a31c735e
net/socket: move si_send/recv into sendmsg/recvmsg
...
MIRTOS-272
Implement si_send/sendto/recvfrom with si_sendmsg/recvmsg, instead of
the other way round.
Change-Id: I7b858556996e0862df22807a6edf6d7cfe6518fc
Signed-off-by: Peter Bee <bijunda1@xiaomi.com >
2021-03-02 17:33:01 +08:00
chao.an
800421e231
net/tcp: cache the drop packet to avoid retransmit
...
Change-Id: Ia27ed17a7708df8481ac96d9a3a870b6ccef4d24
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-03-02 10:12:56 +08:00
chao.an
9c946e2af6
make/archive: replace the dependency to preprequisite list
...
Change-Id: Id63f3cd32906461a54cb016ef8078d4d922845e2
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-03-01 21:10:15 +08:00
chao.an
af341ee4fc
mm/iob: rename the iob_free_queue() to iob_destroy_queue()
...
make the semantics more precise
Change-Id: Ie3ac87d6a478cdd65e9129e708afc833f0a124b0
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-02-26 20:38:44 +08:00
ligd
df76063a35
Revert "net: unify socket info file descriptor"
...
This reverts commit 27b332283e .
2021-02-26 10:21:02 +08:00
Jiuzhu Dong
27b332283e
net: unify socket info file descriptor
...
N/A
Change-Id: I9bcd21564e6c97d3edbb38aed1748c114160ea36
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com >
2021-02-25 16:53:58 +08:00
chao.an
a77d103263
net/arp: add timeout to avoid infinite send wait
...
add timeout to avoid infinite send wait if the network device is unreachable
Change-Id: I839a5fe1fb64b7d6eee7ad28d93d2b27f067b915
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-02-22 10:37:58 +08:00
Xiang Xiao
897270bcbf
net/local: Add an option to specify the prefix of named pipe
...
N/A
to avoid the user create socket under the real filesystem
which isn't supported by nuttx VFS yet.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com >
Change-Id: Ib04c90e9c3c5a215bfda65515498d81e5f834895
2021-02-17 19:29:56 +08:00
chao.an
65b95eea6f
net/tcp: dynamic calculation of available iobs
...
Change-Id: I4b0d01204af74f1692ae061914617dbb4e8698c0
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-02-08 10:47:43 +08:00
chao.an
9dd135ff07
net/ip: do not drop the udp packet from IP layer
...
N/A
this change to support receive the udp data from the specified
port without obtaining the address.
e.g: disable the Bootstrap flag on dhcpc handshake
Reference:
RFC1542: Clarifications and Extensions for the Bootstrap Protocol.
Change-Id: I9e2c4d8223e3be62e1722d51bf5b2f8258bee307
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-01-29 17:36:48 +08:00
chao.an
673526fc74
net/tcp: reset the connection ref count before tcp_free()
...
reset the connection refcount if SYN retry count has elapsed
Assertion:
up_assert: Assertion failed at file:tcp/tcp_conn.c line: 764 task: netdev_wq
N/A
Change-Id: I3b0966af52a9dc52d459e8b5aa7d478955d6691f
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-01-28 19:54:11 +08:00
danguanghua
85d38b9348
print message with nwarn to avoid constantly printout.
...
Change-Id: Ie549935ee227615e5b2b1fb13374608313ce1c66
Signed-off-by: danguanghua <danguanghua@xiaomi.com >
2021-01-25 22:13:29 +08:00
chao.an
1cd39d813f
net/dev: check the available address further
...
check the available address further to avoid obtain unusable device
Change-Id: Icdd91cf0c4cb158f00a49f74d054425c2aeacd14
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-01-20 16:33:43 +08:00
chao.an
043c92fedd
net/tcp: only print the error when disable the TCP_NODELAY
...
Since we do not have the Nagle's algorithm,
the TCP_NODELAY socket option is enabled by default.
Change-Id: I0c8619bb06cf418f7eded5bd72ac512b349cacc5
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-01-18 18:21:55 +08:00
chao.an
4e77f7cf9f
net/tcp: change the log level to warning if iob_tryalloc fail
...
Change-Id: I544d8132ba89eebd9f29e793307010a35d9c161e
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-01-18 18:18:10 +08:00
chao.an
1a0a0e84a0
net/ipv4: bypass the udp drop and filter the packet from udp stack
...
Change-Id: I00055a6e930e2a0d9b1a8bd8929c5eb4e045c0d1
Signed-off-by: chao.an <anchao@xiaomi.com >
2021-01-18 18:15:32 +08:00
ligd
365df8d188
net/rpmsg/rpmsg_sockif.c: fix compile error in socketrpmsg
...
Change-Id: Ibbc62826317e204c49c744d1fb125da7b54eb7a3
Signed-off-by: ligd <liguiding1@xiaomi.com >
2021-01-07 14:17:03 +08:00
ligd
91de680de8
net/rpmsg/rpmsg_sockif.c: fix temporary sendsize is 0 bug
...
Change-Id: I4348fab159eda7e015340ea8067ff7866105bdd5
Signed-off-by: ligd <liguiding1@xiaomi.com >
2021-01-07 11:09:51 +08:00
chao.an
b7100ed99a
net/rpmsg: correct the lifecycle of sendlock
...
Change-Id: Ie23ee4c0052cf2fc66972ea9bc5f11c070fbcf8a
Signed-off-by: chao.an <anchao@xiaomi.com >
2020-12-29 18:45:57 +08:00
chao.an
be88bb00ca
net/tcp/handshake: send the SYN immediately.
...
Change-Id: I761cff3b9950b75327fa03fb53b861ea088d8b35
Signed-off-by: chao.an <anchao@xiaomi.com >
2020-12-15 21:41:29 +08:00
chao.an
ede54cad35
net/tcp: send the ack on nonblock mode
...
Change-Id: Ib5b74a97393c3fed4cc00c3678d738c1cb27ce1a
Signed-off-by: chao.an <anchao@xiaomi.com >
2020-12-15 21:41:10 +08:00
ligd
9ac98f21dc
net/rpmsgsocket: fix connect timeout when remote not ready
...
force connect to block mode
Change-Id: I458f806411c93def0e64596f8e1c1680c485b298
Signed-off-by: ligd <liguiding1@xiaomi.com >
2020-12-11 15:01:59 +08:00
ligd
4c7124ae6c
socket_rpmsg: correct return values when type is DGRAM
...
Change-Id: I299686769616894e919eaa7a5727494aed92a302
Signed-off-by: ligd <liguiding1@xiaomi.com >
2020-12-10 16:39:03 +08:00
chao.an
ed99d43735
[Performance]net/tcp: send the ACK in time after obtain ahead buffer from iobs
...
Request the TCP ACK to estimate the receive window after handle
any data already buffered in a read-ahead buffer.
Change-Id: Id998a1125dd2991d73ba4bef081ddcb7adea4f0d
Signed-off-by: chao.an <anchao@xiaomi.com >
2020-12-07 14:50:38 +08:00
chao.an
6a206d87a1
net/tcp: add a member to record the current receiving window
...
Change-Id: Ic4c46d643a905fdd3a828e563eab4814da70dbe5
Signed-off-by: chao.an <anchao@xiaomi.com >
2020-12-07 14:44:55 +08:00
chao.an
11385f64d3
net/tcp: rename the winszie to snd_wnd to make the semantics more accurate
...
Change-Id: I8fdc7cf78a7f2cd53a30ef1de702b1a697c43238
Signed-off-by: chao.an <anchao@xiaomi.com >
2020-12-07 14:20:34 +08:00
chao.an
46df08ba31
net/setsockopt/IP_MULTICAST_TTL: add handles of different prototypes
...
Reference here:
https://github.com/torvalds/linux/blob/b3298500b23f0b53a8d81e0d5ad98a29db71f4f0/net/ipv4/ip_sockglue.c#L923-L932
Change-Id: Iad67c756eb549d969bd7a8ffe965d9b1dcc56988
Signed-off-by: chao.an <anchao@xiaomi.com >
2020-12-05 18:18:49 +08:00
chao.an
49f50e7169
net/igmp: fix nxstyle warning
...
Change-Id: I6bb84038e035b81ea66b128ebf109f4a392ee6ab
Signed-off-by: chao.an <anchao@xiaomi.com >
2020-12-05 15:33:21 +08:00
ligd
fe996fc69c
socket_rpmsg: add socket rpmsg support
...
N/A
Change-Id: I1e18a0b3d643e5b74b86624ef245f19ef616bc61
Signed-off-by: ligd <liguiding1@xiaomi.com >
2020-12-04 20:36:24 +08:00
chao.an
af1da5e047
net/igmp: add MULTICAST_TTL support
...
Change-Id: Ic8c9a4f4f9b1ebf9858fa5368c6c75e949de6800
Signed-off-by: chao.an <anchao@xiaomi.com >
2020-12-02 16:40:24 +08:00
chao.an
d45b4324ab
net/sockopt: Try usrsock further if the protocol not available
...
fallback to usrsock if the features are not implemented locally
Change-Id: I46e2d6452d7edd3fa5b3d508945511cd48f22ebb
Signed-off-by: chao.an <anchao@xiaomi.com >
2020-12-01 20:08:40 +08:00
chao.an
753ecb6ae1
net/sockopt: fix invalid option set
...
fix invalid option set if enable UDP without TCP
Change-Id: I732893501a9b28749706d6f860c77ae9e14b358c
Signed-off-by: chao.an <anchao@xiaomi.com >
2020-12-01 20:08:35 +08:00
chao.an
8ee9b0f6d5
net/procfs: handle opendir("/proc/net/") correctly
...
Change-Id: I092bade082ba673b30257add4f869ac5bfa55ca6
Signed-off-by: chao.an <anchao@xiaomi.com >
2020-12-01 15:12:24 +08:00
chao.an
96df173097
net/igmp: add sanity check to handle allocate fail
...
Change-Id: Ia3128c9c2b219345fb6ac2789ece7760c6aee663
Signed-off-by: chao.an <anchao@xiaomi.com >
2020-11-30 15:14:04 +08:00
chao.an
90dc86655c
style/Makefile: remove unnecessary trailing whitespace
...
N/A
Signed-off-by: chao.an <anchao@xiaomi.com >
2020-11-30 11:20:05 +08:00