anchao commented on code in PR #20686:
URL: https://github.com/apache/nuttx/pull/20686#discussion_r4285372874
##########
boards/sim/sim/sim/configs/bt/defconfig:
##########
@@ -0,0 +1,158 @@
+############################################################################
+# boards/sim/sim/sim/configs/bt/defconfig
+#
+# Copyright (c) ByteDance Ltd. and/or its affiliates.
Review Comment:
Respectfully, don't you think the Nimble integration itself is a good
example of why we should not follow that pattern?
The current Nimble port in nuttx-apps calls a significant number of NuttX
kernel APIs directly — APIs like k_thread_create, k_sem_*, k_fifo_*, various
work_queue functions, and other internal kernel primitives. This means:
1. It cannot run in protected or kernel build mode at all. As soon as you
enable CONFIG_BUILD_PROTECTED or CONFIG_BUILD_KERNEL, Nimble is dead in the
water because userspace code cannot legally call those kernel APIs. The new
stack, by contrast, has a
clear migration path: flat build first, then proper userspace isolation
via socket/VFS in phase 2.
2. It's locked to a stale, unmaintained version. Because Nimble in
nuttx-apps depends on specific kernel API signatures, any change to those
internal APIs risks breaking the Bluetooth stack. The result? The Nimble port
is pinned to a single upstream
commit and nobody dares update it. That's not sustainable.
3. It sets a bad precedent. If we accept that "userspace calling kernel
internals is fine," then every future BT contributor is effectively forced down
this broken path. We'd be institutionalizing a hack.
The new stack being proposed takes the opposite approach: it starts in the
kernel where it belongs architecturally (just like TCP/IP, CAN, and other
in-kernel network stacks), and then we add proper userspace access through the
socket layer — the same pattern every other NuttX network subsystem follows.
That's not treating Bluetooth "specially" — it's treating it consistently with
the rest of the OS.
If the concern is about keeping the transport/driver layer in the kernel
and moving the rest to userspace, that's exactly what phase 2 delivers. But
that work builds on a stable, working foundation — which is what this PR
provides.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]