Commit Graph

39344 Commits

Author SHA1 Message Date
chao.an 8411ef1873 libs/libc: correct the getrandom(2) prototype
Reference here:
https://man7.org/linux/man-pages/man2/getrandom.2.html
https://www.freebsd.org/cgi/man.cgi?query=getrandom&sektion=2&manpath=freebsd-release-ports

Change-Id: I9813a46ad80db1436524a1fc44be40e4bf17105c
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-08 11:28:31 +08:00
chao.an 098efd4949 sim/libusb: add fluoride libusb dependance
Change-Id: I4a99f65c2af67c64adb2f501a02a467b88ab9588
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-07 15:03:22 +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 8a7703b2be libs/libc/getrandom(2): add ORed bit mask definition
Change-Id: I1a805420f3ace0b844452dc126d04534680e96f2
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-07 14:44:38 +08:00
chao.an 511d65392a libs/libc: correct the getrandom(2) prototype
Reference here:
https://man7.org/linux/man-pages/man2/getrandom.2.html

Change-Id: I25b913c4b6533b3888cb2b9c62bb71505a0815c9
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-07 14:44:25 +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 2a931c1448 clock/time: add CLOCK_BOOTTIME definition
Change-Id: I1adc0445dcdd8284d11aec44bd67b447b2b0490f
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-07 10:02:46 +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
ligd 7572406048 tools/mkdeps.c: increase MAX_BUFFER to 8192
Change-Id: I0221194a647ff5083c951d682289793430e4268a
Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-12-03 20:45:37 +08:00
paopao 98984a59f3 [test] enable vela fs test
N/A

Change-Id: Ifea113dadfee3c37ee9329febf69f9d6932f1802
Signed-off-by: paopao <v-cuixiaoling@xiaomi.com>
2020-12-03 14:10:40 +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
malan 4802a011d6 mirtos_test/defconfig: add the configs about sensor
N/A

Change-Id: I693740b86190a41d8094b029c6ade4e286e8a6c2
Signed-off-by: malan <malan3@xiaomi.com>
2020-12-02 08:52:22 +08:00
liuhaitao 0624eb5710 configure.c: add custom board path build support
N/A

Change-Id: I5b50137e7253ac1dd89bf866053e91e4b8443804
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-12-01 20:50:35 +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
Xiang Xiao 49077f0c53 libc: Change OK/ERROR macro to enum
to avoid the conflict with 3rd party c++ library(e.g. protobuf):
https://github.com/protocolbuffers/protobuf/blob/fdc35840b95f56c3aef44a3fc6ae5991f21620a5/src/google/protobuf/stubs/status.h#L47

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Change-Id: Ie8bb9008a8375c729f8b947c9f10baa80104d157
2020-12-01 16:47:47 +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
dongjiuzhu 93b3c7a34d unistd/getopt: remove count of arguments
N/A

For commands without "-" arguments, ex:"ls", we should always let
optind = 1 after getopt is called in order to get what follows
correctly.

Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
Change-Id: Iac3cfbadd27fb96e47070c4e3198229306299b6b
2020-12-01 11:20:54 +08:00
dongjiuzhu 4a0f96fd4f pthread_mutexattr_getprotocol: modify prototype
MIRTOS-116

modify the return value according to posix standard
Change-Id: I6e32a8f7a5cac85fe7a395a8115710fdff61d985
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-12-01 10:44:16 +08:00
dongjiuzhu 0027842652 mm/circbuf: fix the problem of dividing by zero.
N/A

Change-Id: I78a5cae0f782bc2c09848ebda9589dc53809e089
Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-12-01 09:49:55 +08:00
nietingting 2e05e2c27a [sim] enable uorb and sensor_test component on sim
N/A

Change-Id: I1b0570b05251d1d97dbeb85f52641341e58b3780
Signed-off-by: nietingting <nietingting@xiaomi.com>
2020-11-30 17:49:03 +08:00
Huang Qi 099c051473 drivers/audio: Make audio_null play at real speed
N/A
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
Change-Id: I69a52ee2b03836006f613c4dc41837b6123ad2d5
2020-11-30 17:31:21 +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
Matias N 2860069883 build system: add missing --obj-path to MKDEP 2020-11-30 11:20:15 +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
Matias N b38cda5eeb Config.mk: fix CATFILE macro to work when file list is empty (Linux)
Signed-off-by: chao.an <anchao@xiaomi.com>
Change-Id: I0d21aff60cc4e84ec5a85259cc7fc05c550d0926
2020-11-28 15:16:45 +08:00
chao.an cb1ab6df02 net/inet: fix nxstyle warnings
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-27 11:57:14 +08:00
Xiang Xiao 463457b001 Fix nxstyle warning
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-11-27 11:48:16 +08:00
Xiang Xiao b1d85d4978 libc/machine/arch: Support armv8-m relocation
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-11-27 11:48:16 +08:00
Xiang Xiao b44b05c9b6 libs/libc/machine/arm: Rename armv8 to armv8-m
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-11-27 11:48:16 +08:00
Xiang Xiao d7014061b2 libc/machine/arm: Use the correct arch Kconfig for variant check
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-11-27 11:48:16 +08:00
Xiang Xiao b4887dfab1 libs/libc/machine: Remove ARCH_CORTEXM33 dependence from LIBM_ARCH_xxx
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2020-11-27 11:48:16 +08:00
chao.an f4a530edd2 net/tcp: fix nxstyle warnings
Change-Id: Id885fefc80caa12806c73778e632c8b0c5888be0
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-27 11:07:28 +08:00
chao.an 3e21a06676 net/tcp: fallback to unthrottle pool to avoid deadlock
Add a fallback mechanism to ensure that there are still available
iobs for an free connection, Guarantees all connections will have
a minimum threshold iob to keep the connection not be hanged.

Change-Id: I59bed98d135ccd1f16264b9ccacdd1b0d91261de
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-27 11:07:12 +08:00
chao.an c64ed0cc03 igmp: bypass MULTICAST_LOOP/TTL options
Signed-off-by: chao.an <anchao@xiaomi.com>
Change-Id: I4c8064283327b04ece2037419e2693e8ae3abaab
2020-11-27 10:46:26 +08:00
chao.an 19ba85c492 net/tcp: implement the fast retransmit
RFC2001: TCP Slow Start, Congestion Avoidance, Fast Retransmit,
         and Fast Recovery Algorithms

...

3.  Fast Retransmit
  Modifications to the congestion avoidance algorithm were proposed in
  1990 [3].  Before describing the change, realize that TCP may
  generate an immediate acknowledgment (a duplicate ACK) when an out-
  of-order segment is received (Section 4.2.2.21 of [1], with a note
  that one reason for doing so was for the experimental fast-
  retransmit algorithm).  This duplicate ACK should not be delayed.
  The purpose of this duplicate ACK is to let the other end know that a
  segment was received out of order, and to tell it what sequence
  number is expected.

  Since TCP does not know whether a duplicate ACK is caused by a lost
  segment or just a reordering of segments, it waits for a small number
  of duplicate ACKs to be received.  It is assumed that if there is
  just a reordering of the segments, there will be only one or two
  duplicate ACKs before the reordered segment is processed, which will
  then generate a new ACK.  If three or more duplicate ACKs are
  received in a row, it is a strong indication that a segment has been
  lost.  TCP then performs a retransmission of what appears to be the
  missing segment, without waiting for a retransmission timer to
  expire.

Change-Id: Ie2cbcecab507c3d831f74390a6a85e0c5c8e0652
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-26 20:49:38 +08:00
chao.an 07d5538ed5 net/tcp: correct the available iobs count if throttle is enabled
The number of available iobs is already sub in iob_navail(true) on line 114

net/tcp/tcp_recvwindow.c:
...
 73 uint16_t tcp_get_recvwindow(FAR struct net_driver_s *dev)
...
114   niob_avail    = iob_navail(true);

Change-Id: I230927904d8db08ed8d95d7fa18c5c5fce08aa5e
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-26 20:04:01 +08:00
liuhaitao 9218f09d38 Restore getopt in nuttx mainline instead
N/A

Do not use the special getopt patch and use getopt for nuttx
mainline instead.

Change-Id: I388944cd0a0cfaa64e251ad5565fd8eb8c4e609a
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-11-25 20:13:05 +08:00
liuhaitao c24f178af7 Merge remote-tracking branch 'mirtos/master' into dev
Change-Id: I85394b24ce27d20ecbb130b85d844ab540507031
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-11-25 14:44:27 +08:00
ligd 09778c38b1 rptun: fix rptun rpmsg_unregister_callback fault
N/A

Change-Id: I6447e2ec71a4020533336f35e2aa97a860742e63
Signed-off-by: ligd <liguiding1@xiaomi.com>
2020-11-24 21:52:29 -08:00
Nathan Hartman 4e460cd440 arch/stm32: Fix nxstyle errors
arch/arm/src/stm32/stm32_oneshot.c:
arch/arm/src/stm32/stm32_oneshot.h:
arch/arm/src/stm32/stm32_oneshot_lowerhalf.c:
arch/arm/src/stm32/stm32_dbgmcu.h:

    * Fix nxstyle errors.

arch/arm/src/stm32/stm32_lsi.c:

    * Fix nxstyle errors.
    * Also a minor grammar fix in a comment: add "in" to "setting the
      LSION bit in the RCC CSR register."
2020-11-24 18:12:47 -08:00
Masayuki Ishikawa 324d3a89ed Revert "arch: cxd56xx: Fix the pause handler for SMP"
This reverts commit 55c00ad3d9.
2020-11-25 00:02:37 +01:00
Masayuki Ishikawa 16436a7fb6 Revert "arch: armv7-a: Fix the pause handler for SMP"
This reverts commit 1978dcc9a9.
2020-11-25 00:02:37 +01:00
Masayuki Ishikawa 3ba840aa27 Revert "arch: lc823450: Fix the pause handler for SMP"
This reverts commit 42dea9edf9.
2020-11-25 00:02:37 +01:00
Masayuki Ishikawa 37dad5dd04 Revert "arch: k210: Fix the pause handler for SMP"
This reverts commit a500bd0238.
2020-11-25 00:02:37 +01:00
Masayuki Ishikawa b237748f50 Revert "arch: xtensa: Fix the pause handler for SMP"
This reverts commit 1914aac05f.
2020-11-25 00:02:37 +01:00
Masayuki Ishikawa 6b767c6856 Revert "Update TODO regarding SMP"
This reverts commit 96c29e75b7.
2020-11-25 00:02:37 +01:00