Commit Graph

3003 Commits

Author SHA1 Message Date
wangchen ee10c61bf9 socket: support SO_RCVBUF and SO_SNDBUF in psock_socketlevel_option
Signed-off-by: wangchen <wangchen41@xiaomi.com>
2026-04-21 01:35:46 +08:00
wenquan1 ca0ae45122 net/pkt: support option SO_TIMESTAMPING and MSG_ERRQUEUE
Signed-off-by: wenquan1 <wenquan1@xiaomi.com>
2026-04-21 01:35:35 +08:00
dongjiuzhu1 bdd4f35a68 net: add per cpu support under bmp mode
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2026-04-21 01:33:57 +08:00
yintao 28e217be91 nuttx/net: add psock_mmap operation
Signed-off-by: yintao <yintao@xiaomi.com>
2026-04-21 01:32:51 +08:00
gaohedong 0e5080a456 net/usrsock: add SOCK_NONBLOCK for usrsock fd
add SOCK_NONBLOCK for usrsock fd

Signed-off-by: gaohedong <gaohedong@xiaomi.com>
2026-04-21 01:32:38 +08:00
tengshuangshuang ab041a75a2 coverity:fix dereference before null check
Signed-off-by: tengshuangshuang <tengshuangshuang@xiaomi.com>
2026-04-21 01:32:10 +08:00
wenquan1 41c2d41359 net/socket: set _SF_CONNECTING flag when socket connect
Signed-off-by: wenquan1 <wenquan1@xiaomi.com>
2026-04-21 01:31:38 +08:00
zhanghongyu fff919075e net/socket: replace net_lock with conn_lock
dup2 and setsockopt can use the lock in conn to protect resources,
accept
the lock in accept is originally used to protect the connection status.
however, only the send, recv, netpoll, and connect processes will
check this flag. only when the interface returns will the corresponding
conn structure be exposed to the caller, and then the above operations
can be performed. Therefore, this net_lock is not necessary.

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2026-04-21 01:30:45 +08:00
zhanghongyu d28b393fda net_sockif.c: add rmutex init to SOCK_CTRL
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2026-04-21 01:29:51 +08:00
wangjian66 c48d987333 net/udp: Support zero-length UDP datagrams
Signed-off-by: wangjian <wangjian66@xiaomi.com>
2026-04-21 01:29:34 +08:00
zhanghongyu 181448312e net_sockif.c: add ip level s|getsockopt support in SOCK_CTRL
some services need to configure iptables without enable TCP/UDP/ICMP/ICMPV6

Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2026-04-21 01:28:16 +08:00
zhangshuai39 18d850c59f net/socket: Fixed network card name does not end with \0 when binding the device issue
Signed-off-by: zhangshuai39 <zhangshuai39@xiaomi.com>
2026-04-21 01:28:15 +08:00
gaohedong 204850b18a net/ioctl: add a socket interface for ioctl
Add a socket family for ioctl.

Signed-off-by: gaohedong <gaohedong@xiaomi.com>
2026-04-21 01:25:41 +08:00
dongjiuzhu1 225b4b6239 fs/file: unify prefix about file_xxx api, like file_open, file_ioctl
old:
fs_getfilep, fs_putfilep, fs_reffilep
new:
file_get, file_put, file_ref

Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2026-04-21 01:24:55 +08:00
zhanghongyu 34b7787e2d net/packet: add PACKET_<ADD|DROP>_MEMBERSHIP support
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2026-04-21 01:23:50 +08:00
zhanghongyu e0869a86b7 net/pkt: add nonblock mode and send buffered support
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2026-04-21 01:23:23 +08:00
Yongrong Wang 0968748fcf net/vsock: add vsock framework
1. Vsock framework, support G2H and H2G transport register;
2. Only support STREAM and not support SOCK_SEQPACKET/MSG_PEEK;

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
Signed-off-by: Yongrong Wang <wangyongrong@xiaomi.com>
2026-04-21 01:22:43 +08:00
gaohedong 08fec6965f net/ethernet: add timestamp for socket packet
add timestamp for socket packet

Signed-off-by: gaohedong <gaohedong@xiaomi.com>
2026-04-21 01:20:48 +08:00
zhanghongyu 1f4650340a getsockopt: move the options check to the upper layer
Signed-off-by: zhanghongyu <zhanghongyu@xiaomi.com>
2026-04-21 01:20:25 +08:00
guoshichao 0da6e3863b net: make the sendmsg param type consistent with posix specification
To ensure consistency, in all places where the "sendmsg" function is used
either directly or indirectly, the type of the "struct msghdr *msg" parameter
needs to be modified to "const struct msghdr *msg".

Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2026-04-21 01:19:18 +08:00
Zhe Weng 21adb5aaea net: Split msg_iovlen check in recvmsg into each protocol
To prepare for supporting multiple iov in each protocol.

Signed-off-by: Zhe Weng <wengzhe@xiaomi.com>
2026-04-21 01:17:56 +08:00
Peter van der Perk 746a85d059 net: fix inet #14634 regression
Define wasn't imported by netconfig.h move definitions
2026-04-21 01:13:33 +08:00
Peter van der Perk df10e6f0d1 net: inet.h match inet_sockif.c definition
Fixes psock_socket: ERROR: socket address family unsupported: 2
When using the minimal CONFIG_NET configuration typically used for
SocketCAN

Update net/inet/inet.h

Co-authored-by: Xiang Xiao <xiaoxiang781216@gmail.com>

Update net/inet/inet.h

Co-authored-by: Xiang Xiao <xiaoxiang781216@gmail.com>
2026-04-21 01:13:33 +08:00
openvela-robot 77f0bea7f5 Merge branch 'master' into vela
apache/nuttx commit id: eb27ebba8adfe29644a7b890f86e6f16941921dc

Signed-off-by: ligd <liguiding1@xiaomi.com>
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-21 01:12:27 +08:00
openvela-robot 87c6ff19cf mm: Fix some typos
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2026-04-21 01:12:20 +08:00
openvela-robot b2f5ba0753 syslog: convert \n to \r\n in syslog framework layer
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2026-04-21 01:12:15 +08:00
openvela-robot 24c239f8f5 arm/cmake: fix cmake compile error
1. The -c parameter should not be added during the link phase, otherwise the link will fail.
2. If it is the clang compiler, its toolchain library should use --print-file-name to find it, otherwise an error will occur

Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2026-04-21 01:12:09 +08:00
ouyangxiangzhen f06a244c21 userspace: Exclude nuttx/arch.h
This patch fixed userspace headers conflict. Architecture-related definition and API should not be exposed to users.

Signed-off-by: ouyangxiangzhen <ouyangxiangzhen@xiaomi.com>
2026-04-21 01:12:03 +08:00
wangchen 8038c89115 socketpair.c:Replace kmm with fs heap
due to https://github.com/apache/nuttx/pull/13722/commits, In the socketpair.c,fs_heap interface replaces kmm interface

Signed-off-by: wangchen <wangchen41@xiaomi.com>
2026-04-21 01:12:03 +08:00
openvela-robot 44ed68d400 fs/rpmsgfs: return real err value when open failed
Signed-off-by: dongjiuzhu1 <dongjiuzhu1@xiaomi.com>
2026-04-21 01:12:00 +08:00
openvela-robot 85912ed402 syslog/channel: rename syslog_channel() to syslog_channel_register()
Change syslog API naming more reasonable:

1. rename syslog_channel() to syslog_channel_register()
2. rename syslog_channel_remove() to syslog_channel_unregister()

Signed-off-by: chao an <anchao@lixiang.com>
2026-04-21 01:11:54 +08:00
openvela-robot 0fdd165dfa Fix disable msi when msi capability not exist issue
Signed-off-by: yezhonghui <yezhonghui@xiaomi.com>
2026-04-21 01:11:48 +08:00
openvela-robot 61f4f9411d openamp: sync with community
Comminity has upgrade the openamp to the last commit (near 2024.05 Release),
sync back to vela.

Only modify the makefile and upgrade the patch, should be no impact in any
features.

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-04-21 01:11:43 +08:00
openvela-robot 4ea93dbabf add a flag of lin internal sleep/wakeup state
Signed-off-by: wangxiaoxin <wangxiaoxin@xiaomi.com>
2026-04-21 01:11:35 +08:00
openvela-robot 5081b31bd0 cmake(sync):sync CMakeLists.txt conflict of libc with github
Signed-off-by: xuxin19 <xuxin19@xiaomi.com>
2026-04-21 01:11:30 +08:00
openvela-robot 39fce4b20d arch/x86_64: Resolving NUC Boot Failure Issue
The segment of the Xen PVH boot protocol was not specified during linking and was placed before .loader.text, causing the boot to fail

Signed-off-by: liwenxiang1 <liwenxiang1@xiaomi.com>
2026-04-21 01:11:24 +08:00
openvela-robot d2e613094f arm64/makefile: No longer using hwasan pile insertion
Signed-off-by: wangmingrong1 <wangmingrong1@xiaomi.com>
2026-04-21 01:11:19 +08:00
openvela-robot a3dd40b0d9 mm: call sched_note within mm lock
Signed-off-by: xuxingliang <xuxingliang@xiaomi.com>
2026-04-21 01:11:12 +08:00
openvela-robot 8b787c52e2 sched: sync minor differences in community code
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
2026-04-21 01:11:07 +08:00
openvela-robot bf0c4ea69a libc/modlib: Make modlib selectable from defconfig
since bootloader may call modlib functions directly
to load elf firmware without binfmt, dlfcn or module.

BTW, this patch also remove the duplicated selecttion

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
2026-04-21 01:11:02 +08:00
openvela-robot d194b91929 Revert "math32.h: remove typeof depends"
This reverts commit 4e9f8176a08aa25c7173bc4c748e721b0841ddac.

Reason for revert:
This patch are using to fix the following build warning when build with greenhills compiler:
    CC:  syslog/vsyslog.c "pthread/pthread_create.c", line 443: warning #1931-D: operand of sizeof is
              not a type, variable, or dereferenced pointer expression
              ptcb->cmn.timeslice = MSEC2TICK(CONFIG_RR_INTERVAL);
                                    ^

    CC:  dirent/lib_closedir.c "sched/sched_profil.c", line 81: warning #1931-D: operand of sizeof is not a
              type, variable, or dereferenced pointer expression
        wd_start(&prof->timer, PROFTICK, profil_timer_handler, arg);
                               ^

    "sched/sched_profil.c", line 142: warning #1931-D: operand of sizeof is not a
              type, variable, or dereferenced pointer expression
        wd_start(&prof->timer, PROFTICK, profil_timer_handler, (wdparm_t)prof);
                               ^

    CC:  common/arm_modifyreg8.c "sched/sched_setscheduler.c", line 165: warning #1931-D: operand of sizeof is
              not a type, variable, or dereferenced pointer expression
                tcb->timeslice  = MSEC2TICK(CONFIG_RR_INTERVAL);
                                  ^

    CC:  misc/lib_utsname.c "sched/sched_unlock.c", line 275: warning #1931-D: operand of sizeof is not a
              type, variable, or dereferenced pointer expression
                rtcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL);
                                  ^

    "sched/sched_roundrobin.c", line 119: warning #1931-D: operand of sizeof is
              not a type, variable, or dereferenced pointer expression
                tcb->timeslice = MSEC2TICK(CONFIG_RR_INTERVAL);
                                 ^

we need to keep the modification
2026-04-21 01:10:57 +08:00
openvela-robot ac82d776ab usb: Fix issue with the calculation descriptor length error
Signed-off-by: yangsong8 <yangsong8@xiaomi.com>
2026-04-21 01:10:47 +08:00
openvela-robot 0662b2ac02 rpmsgdev/blk: sync with communitfy, minor nxstyle fix
Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-04-21 01:10:42 +08:00
openvela-robot 97534cf708 add lin status changes the format of the reported frame and add the macros that lin needs
Signed-off-by: wangxiaoxin <wangxiaoxin@xiaomi.com>
2026-04-21 01:10:37 +08:00
openvela-robot 492cec3ec5 nuttx/sim: Fix MacOs build error with argument unused during compilation: '-no-pie'
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2026-04-21 01:10:31 +08:00
openvela-robot 1f0a222301 sim/m64:Fix ld error with .rodata can not be used when making a PIE object.
/usr/bin/ld: nuttx.rel: relocation R_X86_64_32S against `.rodata' can not be used when making a PIE object; recompile with -fPIE
/usr/bin/ld: failed to set dynamic section sizes: bad value

Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2026-04-21 01:10:25 +08:00
openvela-robot 80196e894b nuttx: Change the judgment of GCCVER version to greater equal.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2026-04-21 01:10:19 +08:00
openvela-robot 6c85ce6822 vsprintf:fix bug when print int64 0x8000000000000000
stdio/lib_libvsprintf.c:1018:17: runtime error: negation of -9223372036854775808 cannot be
represented in type 'long long int'; cast to an unsigned type to negate this value to itself
    #0 0x3326a86 in vsprintf_internal stdio/lib_libvsprintf.c:1018
    #1 0x332926b in lib_vsprintf stdio/lib_libvsprintf.c:1363
    #2 0x3777978 in vfprintf stdio/lib_vfprintf.c:52
    #3 0x671b3a0 in printf stdio/lib_printf.c:44
    #4 0x37abc0c in hello_main /data/project/code/vela-pt/apps/examples/hello/hello_main.c:38
    #5 0x33201d3 in nxtask_startup sched/task_startup.c:70
    #6 0x3208ecb in nxtask_start task/task_start.c:134
    #7 0x3357a49 in pre_start sim/sim_initialstate.c:52

Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
2026-04-21 01:10:13 +08:00
openvela-robot 78d736af82 arm/toolchain.defs: sync the whole-archive config with community
Signed-off-by: guoshichao <guoshichao@xiaomi.com>
2026-04-21 01:10:07 +08:00
openvela-robot 47daa79e0b nuttx/x86_64:Add _sinit and _einit initialization.
Signed-off-by: cuiziwei <cuiziwei@xiaomi.com>
2026-04-21 01:10:02 +08:00