Commit Graph

2061 Commits

Author SHA1 Message Date
chao.an dbd6e9be16 net/procfs: handle opendir("/proc/net/") correctly
Change-Id: I092bade082ba673b30257add4f869ac5bfa55ca6
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-03 05:56:35 -06:00
chao.an ad66ea51e5 net/igmp: fix nxstyle warning
Change-Id: I6bb84038e035b81ea66b128ebf109f4a392ee6ab
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-03 12:23:04 +01:00
chao.an ab78bae12f net/igmp: add sanity check to handle allocate fail
Change-Id: Ia3128c9c2b219345fb6ac2789ece7760c6aee663
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-12-03 12:23:04 +01:00
chao.an 316cdccf82 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-03 12:22:48 +01:00
chao.an 51efe468b9 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-03 12:22:48 +01:00
YAMAMOTO Takashi 7c46aface0 net/sixlowpan/sixlowpan_udpsend.c: Fix a syslog format 2020-12-02 02:53:47 -06:00
YAMAMOTO Takashi e4760ca93b net/sixlowpan/sixlowpan_tcpsend.c: Fix syslog formats 2020-12-02 02:53:47 -06:00
chao.an c2b0006dcd 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-12-01 11:36:10 -06:00
chao.an 234d3df19f 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-28 23:24:44 -06:00
chao.an 049c991d28 style/Kconfig: remove unnecessary trailing whitespace
N/A

Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-28 12:20:30 +01:00
chao.an c56785bd0d style/Makefile: remove unnecessary trailing whitespace
N/A

Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-28 12:20:30 +01:00
chao.an 4305718691 net/tcp: fix nxstyle warnings
Change-Id: Id885fefc80caa12806c73778e632c8b0c5888be0
Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-28 00:03:47 -06:00
chao.an bf21056001 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-28 00:03:47 -06:00
Juha Niskanen ebb5fb7480 net/neighbor/neighbor_ethernet_out.c: fix build error without ICMPv6
Patch fixes following build error when
CONFIG_NET_IPv6 && !CONFIG_NET_ICMPv6 && CONFIG_NET_ETHERNET:

  nuttx/staging/libnet.a(neighbor_ethernet_out.o): In function `neighbor_ethernet_out':
  nuttx/net/neighbor/neighbor_ethernet_out.c:188: undefined reference to `icmpv6_solicit'

IPv6 without ICMPv6 is not very useful, but at least this patch
allows neighbor_ethernet_out() to be used with a packet socket or
with multicast address (point-to-point IPv6 links) even in that case.

Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-11-27 10:27:45 -06:00
chao.an a97aefe10a net/icmp: add sanity check to avoid wild data length
net device buffer overflow if the icmp packet is too large

Signed-off-by: chao.an <anchao@xiaomi.com>
2020-11-27 06:45:16 -08:00
YAMAMOTO Takashi dbe389a6bd net/usrsock/usrsock_dev.c: Fix syslog formats 2020-11-27 05:18:57 -06:00
YAMAMOTO Takashi cc9b3a3ec5 net/tcp/tcp_appsend.c: Fix syslog formats
Note: tx_unacked is either uint16_t or uint32_t depending on the config.
2020-11-27 05:18:57 -06:00
YAMAMOTO Takashi cbdbb369c0 net/tcp/tcp_input.c: Fix syslog formats
Note: tx_unacked is either uint16_t or uint32_t depending on the config.
2020-11-27 05:18:57 -06:00
YAMAMOTO Takashi af6719965f net/tcp/tcp_appsend.c: Fix syslog formats 2020-11-25 05:11:26 -08:00
YAMAMOTO Takashi 390f766b36 net/tcp/tcp_appsend.c: Appease nxstyle 2020-11-25 05:11:26 -08:00
YAMAMOTO Takashi 40d4c03a8c net/tcp/tcp_input.c: Fix syslog formats 2020-11-25 05:11:26 -08:00
YAMAMOTO Takashi 17654f592e net/tcp/tcp_send_buffered.c: Fix syslog formats 2020-11-25 05:11:26 -08:00
YAMAMOTO Takashi ff6201fc0a net/udp/udp_sendto_buffered.c: Fix a syslog format 2020-11-24 22:31:33 -08:00
YAMAMOTO Takashi 634713cec4 net/tcp/tcp_sendfile.c: Fix syslog formats 2020-11-24 22:31:33 -08:00
YAMAMOTO Takashi 298299684e net/ieee802154/ieee802154_sendto.c: Fix a syslog format 2020-11-24 22:31:33 -08:00
YAMAMOTO Takashi 7b3cd145de net/ieee802154/ieee802154_sockif.c: Fix a syslog format 2020-11-24 22:31:33 -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 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 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 28fda4e5bb net/tcp/tcp_send_unbuffered.c: Fix syslog formats 2020-11-23 05:00:10 -08:00
Matias N d5b6ec450f Parallelize depend file generation 2020-11-22 09:02:59 -03:00
YAMAMOTO Takashi 8cb6790cef net/tcp/tcp_send_unbuffered.c: Fix a syslog format 2020-11-20 22:22:53 -08:00
YAMAMOTO Takashi 8a23f98233 net/tcp/tcp_wrbuffer_dump.c: Fix a syslog format 2020-11-20 22:22:53 -08:00
YAMAMOTO Takashi bf9b36cf92 net/local/local_sockif.c: Fix a syslog format error 2020-11-20 22:22:53 -08:00
YAMAMOTO Takashi 49055bc638 net/local/local_sendpacket.c: Fix a syslog format error 2020-11-20 22:22:53 -08:00
YAMAMOTO Takashi 6ddaa18ee8 net/local/local_recvfrom.c: Fix a syslog format error 2020-11-20 22:22:53 -08:00
YAMAMOTO Takashi ba1b6876b4 net/tcp/tcp_send_buffered.c: Fix a syslog format error 2020-11-20 22:22:53 -08:00
YAMAMOTO Takashi 3297c09d58 net/socket/send.c: Fix a syslog format error 2020-11-20 22:22:53 -08:00
YAMAMOTO Takashi c443809125 net/local/local_recvfrom.c: Appease nxstyle 2020-11-20 22:22:53 -08:00
GAEHWILER Reto cbd4e90781 net/tcp: Rectified keepalive fix
Simplification of previous fix. Also fixes the case when new data should
be sent while a keepalive is not yet acked.
2020-11-18 17:40:42 -03:00