Commit Graph

48223 Commits

Author SHA1 Message Date
helei8
4b4004b874 drivers/mmcsd: Add MMC_IOC_CMD ioctl
Signed-off-by: helei8 <helei8@xiaomi.com>
2023-01-30 14:09:23 -03:00
Zhe Weng
ff68d9ac04 net/tun: Change TUN/TAP to use IOB
TUN/TAP is not working after IOB offload, try to fix.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-01-31 00:39:15 +08:00
Zhe Weng
be89bcc044 mm/iob: Support negative offset when copyin/out.
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-01-31 00:39:15 +08:00
chao an
0f35ad29a8 arm/unwinder: set default unwinder type to arm exidx/extab
Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-31 00:38:42 +08:00
Zhe Weng
af0a35f9ae net/slip: Change SLIP to use IOB
Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2023-01-30 23:42:01 +08:00
wangxuedong
ba016eb5eb libc/stdio: fix rounding errors for fractional values less than 1
Signed-off-by: wangxuedong <wangxuedong@xiaomi.com>
2023-01-30 23:39:56 +08:00
chao an
fa63da22ae libs/netdb: add sanity check to avoid null pointer reference
Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-30 23:37:29 +08:00
anjiahao
6f2f62f4ce watchdog:fix Kconfig typo
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-01-30 15:49:50 +01:00
Ville Juven
0bebb94923 icicle/configs: Update some configs
- Remove the annoying color terminal for nsh target
- Add SHMFS for nsh and pnsh
- Increase stack user and kernel sizes for kernel mode
2023-01-30 21:57:25 +08:00
yinshengkai
2466c07aa3 libc/stream: fix syslogstream_addstring length error
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2023-01-30 14:27:04 +01:00
Jiuzhu Dong
17f410e647 arch/sim: add toolchain library libm
Signed-off-by: Jiuzhu Dong <dongjiuzhu1@xiaomi.com>
2023-01-30 20:32:14 +08:00
Fotis Panagiotopoulos
2fe8f37001 Fixed non-UTF characters. 2023-01-30 20:08:03 +08:00
chao an
ac77492dd1 sim/rpserver/rpproxy: remove colon from syslog prefix
Before:
[server: ] show_tasks:    PID   PRI    STACKBASE STACKSIZE   COMMAND
[server: ] dump_task:      0      0   0xfff8e088     69600   Idle Task

After:
[server] show_tasks:    PID   PRI    STACKBASE STACKSIZE   COMMAND
[server] dump_task:      0      0   0xff870c58     69600   Idle Task

Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-30 20:07:04 +08:00
chao an
2ffe564fa2 fs/procfs: sort level0 process id
Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-30 14:57:43 +08:00
Masayuki Ishikawa
2ae8a9600f boards: imxrt1060-evk: Fix iperf performance for netnsh
Summary:
- Before: iperf -s 94Mbps, iperf -c 0Mbps
- After : iperf -s 94Mbps, iperf -c 93Mbps

Impact:
- Should be none

Testing:
- Tested with iperf and telnet

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-01-30 13:25:15 +08:00
Masayuki Ishikawa
7af531f677 boards: sabre-6quad: Add netnsh_wb
Summary:
- This commits adds netnsh_wb which enables write buffers.

Impact:
- None

Testing:
- Tested with iperf (-s 205Mbps, -c 176Mbps) on QEMU-7.1

Signed-off-by: Masayuki Ishikawa <Masayuki.Ishikawa@jp.sony.com>
2023-01-30 13:25:15 +08:00
Xuxingliang
7c9b362705 sensors/ioctl: add common cmd for accelerators
Signed-off-by: Xuxingliang <xuxingliang@xiaomi.com>
2023-01-30 12:03:26 +08:00
wangbowen6
81d37d0320 mm_memalign: avoid two adjacent free nodes situation.
Original code assumes the previous node in physical must be
ALLOCED, but other thread may free the previous node between
mm_malloc() and mm_lock(), and the original code didn't condsider
this, which will cause two adjacent free nodes situation and this
should not be happened.

This commit will merge the previous node and node if the previous
node is free to avoid the situation discribed above.

Signed-off-by: wangbowen6 <wangbowen6@xiaomi.com>
2023-01-30 11:47:06 +08:00
anjiahao
3cfd8a350b sys/queue.h: remove CONFIG_ALLOW_MIT_COMPONENTS
Signed-off-by: anjiahao <anjiahao@xiaomi.com>
2023-01-30 11:26:04 +08:00
梁超众
b33474cb11 free TCP rx buffer immediately in tcp_close
Issue:
TCP rx buffer is freed after 4-way handshake with current design.
3 socket's rx buffer might be consumed during ffmpeg switch music procedure,
and this might cause IOB exhausted.

Solution:
free TCP rx buffer immediately in tcp_close to make sure IOB won't be
exhausted.

Signed-off-by: 梁超众 <liangchaozhong@xiaomi.com>
Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-30 11:25:36 +08:00
chao an
98e1f9c36d net/tcp: reuse common api to replace some ip select code
Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-30 11:25:10 +08:00
rajvinder kaur
2b30f17607 stm32h7: socket CAN error handling. 2023-01-30 11:22:49 +08:00
Oleksandr Oryshchenko
0842a291e0 [Drivers] Add smart_loop_register_driver call to drivers_initialize 2023-01-30 11:09:40 +08:00
Oleksandr Oryshchenko
28f92e8238 [MTD/SmartFS] Extract register_driver call to own function 2023-01-30 11:09:40 +08:00
Xiang Xiao
631a8da1e2 sched: Map SCHED_OTHER to SCHED_FIFO or SCHED_RR
this behaviour is explicitly specified here:
https://pubs.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_08.html
and map SCHED_NORMAL to SCHED_OTHER like Linux:
https://man7.org/linux/man-pages/man7/sched.7.html

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2023-01-30 03:01:03 +02:00
chao an
2ad0a02182 sched/pthread: set default pthread name to parent's name
Align ps behavior with linux:

linux:

  $ ps -e -T | grep hello
  3758130 3758130 pts/10   00:00:00 hello
  3758130 3758131 pts/10   00:00:00 hello

nuttx:

  nsh> ps
    PID GROUP PRI POLICY   TYPE    NPX STATE    EVENT     SIGMASK   STACK COMMAND
  ...
      4     4 100 FIFO     Task    --- Waiting  Signal    00000000 067504 hello
      5     4 100 FIFO     pthread --- Waiting  Signal    00000000 067536 hello 0x561cef0dfc53 0x1

Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-30 02:59:17 +02:00
pengyiqiang
0443889124 sim_framebuffer: fix fb_pollnotify not called
Signed-off-by: pengyiqiang <pengyiqiang@xiaomi.com>
2023-01-29 17:34:36 -03:00
ligd
9e39600c83 arch: fix sim_x11events calls but sim_x11initialize() hasn't ready
Signed-off-by: ligd <liguiding1@xiaomi.com>
2023-01-29 17:34:36 -03:00
dongjiuzhu1
e02a5a70eb fs/partiton: add sanity check
mmcsd_spi don't support ioctl
when blocksize is zero, will cause crash.

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-01-29 17:30:51 -03:00
dongjiuzhu1
224f53fe02 lib/math32.h: support LOG2_CEIL/LOG2_FLOOR function at compile time
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-01-29 17:29:19 -03:00
chao an
82520c0006 arm/itm_syslog: remove invaild select config
1. CONFIG_SYSLOG has been removed by Nutt on below commit:

| commit c5ac473bc0
| Author: Gregory Nutt <gnutt@nuttx.org>
| Date:   Tue Jun 21 07:58:42 2016 -0600
|
|     SYSLOG: Remove an obsolete, unused configuration item from Kconfig file

2. Fix comile warning

| armv7-m/arm_itm_syslog.c: In function 'itm_syslog_initialize':
| armv7-m/arm_itm_syslog.c:183:18: warning: passing argument 1 of 'syslog_channel' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
|   183 |   syslog_channel(&g_itm_channel);
|       |                  ^~~~~~~~~~~~~~
| In file included from armv7-m/arm_itm_syslog.c:29:
| nuttx/syslog/syslog.h:155:49: note: expected 'struct syslog_channel_s *' but argument is of type 'const struct syslog_channel_s *'
|   155 | int syslog_channel(FAR struct syslog_channel_s *channel);
|       |

Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-29 19:54:55 +08:00
zhangyuan21
e6d2f0623a backtrace: use CURRENT_REGS when in interrupt context
Signed-off-by: zhangyuan21 <zhangyuan21@xiaomi.com>
2023-01-29 02:48:00 -08:00
liangchaozhong
ade9d39478 make iperf works on SIM platform
Solution:
1. enable iperf on SIM projects
2. enlarge IOB's settings

Signed-off-by: liangchaozhong <liangchaozhong@xiaomi.com>
Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-29 16:20:02 +08:00
genghuihui
63387a4a50 feature:add audio AUDIOIOC_SETPARAMTER ioctl command
add AUDIOIOC_SETPARAMTER iotcl command in include/nuttx/audio/audio.h

Signed-off-by: genghuihui <genghuihui@xiaomi.com>
2023-01-29 14:40:40 +08:00
qinwei1
b989e4f3a6 arch:arm64: add support for nuttx arm64 Toolchain Selection
Summary:
1. to enable Toolchain select Kconfig option, making something depend on
   the opton to be configured with menuconfig

Signed-off-by: qinwei1 <qinwei1@xiaomi.com>
2023-01-29 14:37:16 +08:00
zhanghongyu
e0c97ca742 dns: packed dns_header_s and dns_question_s
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-01-29 14:35:01 +08:00
zhanghongyu
4de0e626d0 Revert "netdb: fix access within misaligned address error"
This reverts commit 3f94828f6b.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-01-29 14:35:01 +08:00
zhanghongyu
4ea43f2df2 sim: init events field when send ack/dack
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-01-29 14:34:09 +08:00
chao an
cc7dc89c64 arch/sim: fix undefined reference to `usrsock_event_callback'
/usr/bin/ld: sim_hostusrsock.o: in function `host_usrsock_loop':
arch/sim/src/sim/posix/sim_hostusrsock.c:514: undefined reference to `usrsock_event_callback'

Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-29 14:33:37 +08:00
luojun1
861004725a Fix ICMPv6 RA parsing procedure
Signed-off-by: luojun1 <luojun1@xiaomi.com>
2023-01-29 14:32:59 +08:00
liangchaozhong
d8777fa77d invalid dns cache entry after ttl expires
Log ttl after receive dns query and invalid dns cache entry when ttl expires.

Signed-off-by: liangchaozhong <liangchaozhong@xiaomi.com>
2023-01-29 14:32:33 +08:00
dongjiuzhu1
cd3d3c272a net/route.h: add RTF_XX flags and rt_dev member
refs:
https://students.mimuw.edu.pl/SO/Linux/Kod/include/linux/route.h.html
https://nxmnpg.lemoda.net/9/rtentry

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2023-01-29 14:29:52 +08:00
zhanghongyu
3e4e416786 tcp/udp_connect: If the remote addr is ANY, change it to LOOPBACK
Behavior alignment to Linux

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-01-29 13:46:43 +08:00
chao an
85a8249821 Revert "socket:return -EAGAIN if timeout happends in psock_tcp_send"
This reverts commit fbe641a916.

This issue already fixed by below change:

| commit 715785245c
| Author: chao an <anchao@xiaomi.com>
| Date:   Mon Jan 16 12:37:44 2023 +0800
|
|     net/tcp: fix potential busy loop in tcp_send_buffered.c
|
|     if the wrbuffer does not have enough space to send the rest of
|     the data, then the send function will loop infinitely in nonblock
|     mode, add send timeout check to avoid this issue.
|
|     Signed-off-by: chao an <anchao@xiaomi.com>

Signed-off-by: chao an <anchao@xiaomi.com>
2023-01-29 13:46:01 +08:00
zhanghongyu
26286fd19e tcp: modify errno when connect raddr is ANY for ltp
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-01-29 13:45:49 +08:00
zhanghongyu
65e08b750c tcp_reset: check the conn is exist when tcp_reset
tcp_input:
If we didn't find an active connection that expected the packet,
If the SYN flag isn't set,
It is an old packet and we send a RST.
conn is NULL when this case

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-01-29 13:43:44 +08:00
梁超众
5012195bde support ipv4 ToS and ipv6 TrafficClass
Signed-off-by: 梁超众 <liangchaozhong@xiaomi.com>
2023-01-29 13:43:44 +08:00
梁超众
5e0af0ecfd add UDP compile option to avoid build error
The following build error happens when CONFIG_NET_IPv6 is enabled and CONFIG_NET_UDP is not enabled.

inet/ipv6_setsockopt.c:132:19: error: invalid use of undefined type 'struct udp_conn_s'
132 |               conn->flags |= _UDP_FLAG_PKTINFO;
|                   ^~
  inet/ipv6_setsockopt.c:132:30: error: '_UDP_FLAG_PKTINFO' undeclared (first use in this function)
    132 |               conn->flags |= _UDP_FLAG_PKTINFO;
        |                              ^~~~~~~~~~~~~~~~~
  inet/ipv6_setsockopt.c:132:30: note: each undeclared identifier is reported only once for each function it appears in
  inet/ipv6_setsockopt.c:136:19: error: invalid use of undefined type 'struct udp_conn_s'
    136 |               conn->flags &= ~_UDP_FLAG_PKTINFO;

Signed-off-by: 梁超众 <liangchaozhong@xiaomi.com>
2023-01-29 13:43:44 +08:00
Alan Carvalho de Assis
8564b49469 doc: Add USB RNDIS tutorial to documentation. 2023-01-29 10:09:13 +08:00
zhanghongyu
1857a4a3c8 udp: Ipv4/6 can be bound to the same port
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2023-01-28 23:28:33 +02:00