Commit Graph

39307 Commits

Author SHA1 Message Date
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
Matias N c91939b5c0 Documentation: improve debugging section 2020-11-24 22:02:49 +01:00
Alin Jerpelea 9f6a43d0b0 libs: audio: libsamplerate: drop local patches
The needed patches were accepted upstream and now there is no need to
carry local patches.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2020-11-24 10:54:57 -08:00
dongjiuzhu 148afd9548 driver/sensors: support custom type of sensor.
For examples, the custom sensor could define:
struct custem_event_s
{
  uint64_t timestamp;
  int16_t adc[8];
};
struct sensor_lowerhalf_s g_lower =
{
 .buffer_size = 1024,
};
sensor_custom_register(lower, "/dev/sensor/custom0", sizeof(struct custem_event_s));

Signed-off-by: dongjiuzhu <dongjiuzhu1@xiaomi.com>
2020-11-24 13:23:15 -03:00
liuhaitao 86dbc17a43 configure.sh: support custom board build with absolute path
N/A

Change-Id: I01bcb0b79db9e245484540c714036c64234b3656
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-11-24 21:04:11 +08:00
liuhaitao 78acbead3b build.sh: make custom build path relative to top dir instead
N/A

Top dir is the parent directory of nuttx, if called build.sh from top
dir, we should also update the custom build path. And here convert to
absolute path.

Change-Id: Id6d2325b41ee792dbf9d4bb52654d6108c2bc67a
Signed-off-by: liuhaitao <liuhaitao@xiaomi.com>
2020-11-24 19:53:42 +08:00
chao.an c08ac2e35d net/icmp: add sanity check to avoid wild data length
MIRTOS-267

net device buffer overflow if the icmp packet is too large

Change-Id: If0e6c039b99e064a122672d64eb057347ae3c053
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-24 15:45:51 +08:00
Nathan Hartman 4ce935f711 stm32/stm32_can.c: Fix nxstyle errors
arch/arm/src/stm32/stm32_can.c:

    * Fix nxstyle errors.
2020-11-23 20:09:57 +01:00
Juha Niskanen ed7380d863 arch/arm/src/stm32/stm32_serial.c: for flowcontrol use common idiom for enabling/disabling RX interrupts
stm32f7, stm32h7, stm32l4 and stm32f0l0g0 do it this way and there is no
reason for classic stm32 to differ. Also manipulation of priv->ie was not
atomic with respect to interrupts.

Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-11-23 10:59:19 -08:00
YAMAMOTO Takashi ee1c914277 net/tcp/tcp_input.c: Fix syslog formats 2020-11-23 05:00:10 -08:00
YAMAMOTO Takashi bfff9e5691 net/igmp/igmp_poll.c: Fix syslog formats
The following nxstyle errors are known.
They are a part of the copyright notice.

net/igmp/igmp_poll.c:22:82: error: Long line found
net/igmp/igmp_poll.c:29:82: error: Long line found
2020-11-23 05:00:10 -08:00
YAMAMOTO Takashi 79d2a4b82b net/igmp/igmp_mcastmac.c: Fix syslog formats
The following nxstyle errors are known.
They are a part of the copyright notice.

net/igmp/igmp_mcastmac.c:22:82: error: Long line found
net/igmp/igmp_mcastmac.c:29:82: error: Long line found
2020-11-23 05:00:10 -08:00
YAMAMOTO Takashi a403e6eec2 net/igmp/igmp_join.c: Fix a syslog format 2020-11-23 05:00:10 -08:00
YAMAMOTO Takashi ffe29f9025 net/igmp/igmp_join.c: Appease nxstyle
The following nxstyle errors are intentionally left
because they are a part of the copyright notice.

net/igmp/igmp_join.c:22:82: error: Long line found
net/igmp/igmp_join.c:29:82: error: Long line found
2020-11-23 05:00:10 -08:00
YAMAMOTO Takashi d6e87d7f40 net/igmp/igmp_input.c: Fix a syslog format 2020-11-23 05:00:10 -08:00
YAMAMOTO Takashi 70a964bdcb net/igmp/igmp_group.c: Fix syslog formats 2020-11-23 05:00:10 -08:00
YAMAMOTO Takashi ec8a46b2fa arch/arm/src/stm32h7/stm32_ethernet.c: Fix syslog formats 2020-11-23 05:00:10 -08:00
YAMAMOTO Takashi 5566d9ad03 libs/libc/netdb/lib_dnsquery.c: Fix a syslog format 2020-11-23 05:00:10 -08:00
YAMAMOTO Takashi 86c16667f8 drivers/net/loopback.c: Fix a syslog format 2020-11-23 05:00:10 -08:00
YAMAMOTO Takashi b7be6047bb net/sixlowpan/sixlowpan_send.c: Fix a syslog format 2020-11-23 05:00:10 -08:00
YAMAMOTO Takashi dcfe08d227 net/sixlowpan/sixlowpan_tcpsend.c: Fix syslog formats 2020-11-23 05:00:10 -08:00
YAMAMOTO Takashi d4b5684eba net/sixlowpan/sixlowpan_framelist.c: Fix syslog formats 2020-11-23 05:00:10 -08:00
YAMAMOTO Takashi d5a5b6979d net/sixlowpan/sixlowpan_framelist.c: Appease nxstyle 2020-11-23 05:00:10 -08:00
YAMAMOTO Takashi 5c5fc00fc4 drivers/net/telnet.c: Fix syslog formats 2020-11-23 05:00:10 -08:00
YAMAMOTO Takashi 05127a2a33 wireless/bluetooth/bt_ioctl.c: Fix a syslog format 2020-11-23 05:00:10 -08:00
YAMAMOTO Takashi e8ae56d9ea wireless/bluetooth/bt_att.c: Fix a syslog format 2020-11-23 05:00:10 -08:00
YAMAMOTO Takashi 46c52132c4 wireless/bluetooth/bt_buf.c: Fix syslog formats 2020-11-23 05:00:10 -08:00
YAMAMOTO Takashi 3ed096cc08 net/bluetooth/bluetooth_sendto.c: Fix a syslog format 2020-11-23 05:00:10 -08:00
YAMAMOTO Takashi d851cd9322 net/bluetooth/bluetooth_sockif.c: Fix syslog formats 2020-11-23 05:00:10 -08:00
YAMAMOTO Takashi 8e73a3ed4c drivers/rwbuffer.c: Fix syslog formats 2020-11-23 05:00:10 -08:00
YAMAMOTO Takashi 7f32cfa720 drivers/mtd/mtd_rwbuffer.c: Fix a syslog format 2020-11-23 05:00:10 -08:00
YAMAMOTO Takashi 5b25cf8e47 drivers/mtd/mtd_rwbuffer.c: Appease nxstyle 2020-11-23 05:00:10 -08:00
YAMAMOTO Takashi 28fda4e5bb net/tcp/tcp_send_unbuffered.c: Fix syslog formats 2020-11-23 05:00:10 -08:00
YAMAMOTO Takashi c1f8e270eb drivers/rc/dummy.c: Fix a syslog format 2020-11-23 05:00:10 -08:00
Brennan Ashton 3ebcd045b5 usb: Do not try to print verbose trace when disabled
Right now if usb tracing is enabled but verbose is disabled
a debug assert will be triggered when ever a verbose trace point
is hit.  Instead of trying to print the NULL message, just return
early.

Signed-off-by: Brennan Ashton <bashton@brennanashton.com>
2020-11-22 21:24:59 -08:00
Huang Qi f1968469a4 spi/qspi.h: Fix data type of buflen
N/A

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2020-11-23 11:33:39 +08:00
Huang Qi 0a2873a37f spi/qspi.h: Fix data type of buflen
Summary:
- This patch change the data type of buflen in qspi_meminfo_s
- from uint16_t to uint32_t to allow data size greater than 64KB.

Impact:
- QSPI & some flash like s25fl1 etc

Testing:
- Tested with rm69330 oled controller on custom board

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2020-11-22 19:02:11 -08:00
YAMAMOTO Takashi ce228e5de5 drivers/mtd/smart.c: Fix syslog formats 2020-11-22 19:01:05 -08:00