Commit Graph

17 Commits

Author SHA1 Message Date
Petro Karashchenko 51a2db6ffc Kconfig: improve uniformity
Signed-off-by: Petro Karashchenko <petro.karashchenko@gmail.com>
2021-12-14 07:32:48 -06:00
Alexander Lunev 1e25602678 net/can,icmp,icmpv6,tcp,tcp_timer,udp: device should poll only those connections that are bound to the device.
tcp_timer: eliminated false decrements of conn->timer in case of multiple network adapters.
The false timer decrements sometimes provoked TCP spurious retransmissions due to premature timeouts.
2021-10-11 23:09:00 -07:00
Alexander Lunev 36fbedcbfc net/devif/devif_callback.c: corrected the connection event list to work as FIFO instead of LIFO.
In case of enabled packet forwarding mode, packets were forwarded in a reverse order
because of LIFO behavior of the connection event list.
The issue exposed only during high network traffic. Thus the event list started to grow
that resulted in changing the order of packets inside of groups of several packets
like the following: 3, 2, 1, 6, 5, 4, 8, 7 etc.

Remarks concerning the connection event list implementation:
* Now the queue (list) is FIFO as it should be.
* The list is singly linked.
* The list has a head pointer (inside of outer net_driver_s structure),
  and a tail pointer is added into outer net_driver_s structure.
* The list item is devif_callback_s structure.
  It still has two pointers to two different list chains (*nxtconn and *nxtdev).
* As before the first argument (*dev) of the list functions can be NULL,
  while the other argument (*list) is effective (not NULL).
* An extra (*tail) argument is added to devif_callback_alloc()
  and devif_conn_callback_free() functions.
* devif_callback_alloc() time complexity is O(1) (i.e. O(n) to fill the whole list).
* devif_callback_free() time complexity is O(n) (i.e. O(n^2) to empty the whole list).
* devif_conn_event() time complexity is O(n).
2021-09-18 21:01:39 -05:00
Gustavo Henrique Nihei 330eff36d7 sourcefiles: Fix relative path in file header 2021-03-09 23:18:28 +08:00
Peter Bee e223f60c09 net/socket: move si_send/recv into sendmsg/recvmsg
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-05 04:46:13 -08:00
Jiuzhu Dong 4d5a964f29 net: unify socket into file descriptor
Change-Id: I9bcd21564e6c97d3edbb38aed1748c114160ea36
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2021-03-03 19:01:41 -08:00
Alin Jerpelea 37d5c1b0d9 net: Author Gregory Nutt: update licenses to Apache
Gregory Nutt has submitted the SGA and we can migrate the licenses
 to Apache.

Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
2021-02-20 00:38:18 -08:00
Abdelatif Guettouche 6385408483 net/: Correct some comments.
Signed-off-by: Abdelatif Guettouche <abdelatif.guettouche@espressif.com>
2021-01-15 16:23:12 -05:00
Juha Niskanen de1ad1fdb3 net: fix typos, incorrect comments, nxstyle
Signed-off-by: Juha Niskanen <juha.niskanen@haltian.com>
2020-12-13 09:06:28 -06:00
John Bampton ba12c6c0cf Fix spelling 2020-12-12 19:18:08 +01: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
YAMAMOTO Takashi 26e1e4c74c net/can/can_getsockopt.c: Fix type mismatches 2020-11-16 08:29:00 -08:00
Peter van der Perk ba5fe5cee3 SocketCAN: Fixed dropping timestamped frames when running in CAN2.0B 2020-06-17 15:17:38 -07:00
Peter van der Perk 4eecf8561f FlexCAN interrupt fixes, old compiler fixes
SocketCAN old compiler fix
2020-06-16 15:35:43 -03:00
Ouss4 c8d83e0a88 net/can/can_setsockopt&can_getsockopt.c: Initialiaze ret variable to
eliminate any warning.
2020-06-15 12:20:32 -06:00
Ouss4 155903fc54 net/can/can.h: Add can_setsockopt and can_getsockopt prototypes. 2020-06-15 12:20:32 -06:00
Peter van der Perk 55d9e5f7af net: Add SocketCAN support 2020-06-15 08:07:19 -06:00