This has been broken at some point. Just fix it by copying the can frame and
the cmsg data into IOB, and fix devif_poll to copy out the full data.
The can drivers expect to find the timeout timestamp in the end of the frame.
Signed-off-by: Jukka Laitinen <jukkax@ssrc.tii.ae>
reason:
We can utilize percpu storage to hold information about the
current running task. If we intend to implement this feature, we would
need to define two macros that help us manage this percpu information
effectively.
up_this_task: This macro is designed to read the contents of the percpu
register to retrieve information about the current
running task.This allows us to quickly access
task-specific data without having to disable interrupts,
access global variables and obtain the current cpu index.
up_update_task: This macro is responsible for updating the contents of
the percpu register.It is typically called during
initialization or when a context switch occurs to ensure
that the percpu register reflects the information of the
newly running task.
Configuring NuttX and compile:
$ ./tools/configure.sh -l qemu-armv8a:nsh_smp
$ make
Running with qemu
$ qemu-system-aarch64 -cpu cortex-a53 -smp 4 -nographic \
-machine virt,virtualization=on,gic-version=3 \
-net none -chardev stdio,id=con,mux=on -serial chardev:con \
-mon chardev=con,mode=readline -kernel ./nuttx
Signed-off-by: hujun5 <hujun5@xiaomi.com>
According to RFC793, Section 3.4, Page 33. In the SYN_SENT state, if receive a ACK without the SYN, we should reset the connection and retransmit the SYN.
Signed-off-by: liqinhui <liqinhui@xiaomi.com>
1.Simplify the message process in rpmsg_socket_send_single
2.Add more lock protection in rpmsg socket
3.Fix the style issue
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
Referring to Linux,if there is only a loopback network device and the destination address does not belong to the loopback address, then the loopback network devices is not selected
Signed-off-by: wangchen <wangchen41@xiaomi.com>
The argument addr is a pointer to a sockaddr structure.
This structure is filled in with the address of the peer socket,
as known to the communications layer.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
Some app with same code runs on different cores in AMP mode,
need the physical core on which the function is called.
Signed-off-by: hujun5 <hujun5@xiaomi.com>
Signed-off-by: fangxinyong <fangxinyong@xiaomi.com>
Summary:
Implementation in accept4 is special, the requested newsock is saved as filep->priv. This will cause sock_file_close to use fs_heap_free filep->priv during close. When fs_heap is configured, the released memory will not be on fs_heap, causing a crash.
Signed-off-by: chenrun1 <chenrun1@xiaomi.com>
If arp search fails once, subsequent searches for the ip will directly
return failure, and sends an asynchronous arp request to try to update
arp table in the future. In this way, the psock_sendmsg interface will
not block for a long time each time because arp cannot be obtained.
This scenario is triggered when a udp socket frequently attempts to
access an ip address that does not exist on the LAN.
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
Summary:
The conn->keeptimer units is decisecond,but its unit is treated as
half-second in the tcp_timer & tcp_get_timeout function.
Therefore conn>keeptimer needs to be divided by 5(DSEC_PER_HSEC)
to match half-second units.
Signed-off-by: zhangshuai39 <zhangshuai39@xiaomi.com>
detail: Add g_ prefix to can_dlc_to_len and len_to_can_dlc to
follow NuttX coding style conventions for global symbols,
improving code readability and maintainability.
Signed-off-by: zhaohaiyang1 <zhaohaiyang1@xiaomi.com>
Revert "Parallelize depend file generation"
This reverts commit d5b6ec450f.
parallel depend ddc does not significantly speed up compilation,
intermediately generated .ddc files can cause problems if compilation is interrupted unexpectedly
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
Most tools used for compliance and SBOM generation use SPDX identifiers
This change brings us a step closer to an easy SBOM generation.
Signed-off-by: Alin Jerpelea <alin.jerpelea@sony.com>
According to rfc1112, section 7.2:
"An ICMP error message (Destination Unreachable, Time Exceeded, Parameter Problem, Source Quench, or Redirect) is
never generated in response to a datagram destined to an IP host group."
Signed-off-by: zhangshuai39 <zhangshuai39@xiaomi.com>
We can see them in ifconfig:
ap> ifconfig
wlan0 Link encap:Ethernet HWaddr 42:64:7f:b3:12:03 at UP mtu 1500
inet addr:10.0.1.2 DRaddr:10.0.1.1 Mask:255.255.255.0
inet6 DRaddr: ::
RX: Received Fragment Errors Bytes
00000b9b 00000000 00000000 21daf5
IPv4 IPv6 ARP Dropped
00000a33 00000137 00000031 00000000
TX: Queued Sent Errors Timeouts Bytes
00000ac4 00000ac4 00000000 00000000 1a2103
Total Errors: 00000000
Signed-off-by: meijian <meijian@xiaomi.com>
SO_SNDBUF takes effect only after the connection in STREAM mode
is successful
support full life cycle modification of SO_RCVBUF
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>