diff --git a/boards/microchip/mec15xxevb_assy6853/mec15xxevb_assy6853.dts b/boards/microchip/mec15xxevb_assy6853/mec15xxevb_assy6853.dts index 11daa0efbe37..a70db14a3ebe 100644 --- a/boards/microchip/mec15xxevb_assy6853/mec15xxevb_assy6853.dts +++ b/boards/microchip/mec15xxevb_assy6853/mec15xxevb_assy6853.dts @@ -192,8 +192,8 @@ &spi0 { status = "okay"; - port_sel = <0>; - chip_select = <0>; + port-sel = <0>; + chip-select = <0>; lines = <1>; pinctrl-0 = < &shd_cs0_n_gpio055 &shd_clk_gpio056 diff --git a/boards/qemu/x86/qemu_x86_atom_nommu_defconfig b/boards/qemu/x86/qemu_x86_atom_nommu_defconfig index 119a6dd2c392..3215747a004d 100644 --- a/boards/qemu/x86/qemu_x86_atom_nommu_defconfig +++ b/boards/qemu/x86/qemu_x86_atom_nommu_defconfig @@ -10,6 +10,6 @@ CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=25000000 CONFIG_TEST_RANDOM_GENERATOR=y CONFIG_X86_MMU=n CONFIG_DEBUG_INFO=y -CONFIG_SCHED_DUMB=y -CONFIG_WAITQ_DUMB=y +CONFIG_SCHED_SIMPLE=y +CONFIG_WAITQ_SIMPLE=y CONFIG_X86_VERY_EARLY_CONSOLE=n diff --git a/doc/connectivity/networking/api/sockets.rst b/doc/connectivity/networking/api/sockets.rst index fa3a1bb761f4..7a56f74a2aa6 100644 --- a/doc/connectivity/networking/api/sockets.rst +++ b/doc/connectivity/networking/api/sockets.rst @@ -93,7 +93,7 @@ socket options. The following TLS credential types can be registered in the system: - ``TLS_CREDENTIAL_CA_CERTIFICATE`` -- ``TLS_CREDENTIAL_SERVER_CERTIFICATE`` +- ``TLS_CREDENTIAL_PUBLIC_CERTIFICATE`` - ``TLS_CREDENTIAL_PRIVATE_KEY`` - ``TLS_CREDENTIAL_PSK`` - ``TLS_CREDENTIAL_PSK_ID`` diff --git a/doc/connectivity/networking/api/wifi.rst b/doc/connectivity/networking/api/wifi.rst index a06fda8f8621..57d00934e95d 100644 --- a/doc/connectivity/networking/api/wifi.rst +++ b/doc/connectivity/networking/api/wifi.rst @@ -46,20 +46,20 @@ If you want to use your own certificates, you can replace the existing certifica .. code-block:: bash - $ export CERTS_DIR=samples/net/wifi/test_certs/rsa3k - $ cp client.pem $CERTS_DIR - $ cp client-key.pem $CERTS_DIR - $ cp ca.pem $CERTS_DIR - $ cp client2.pem $CERTS_DIR - $ cp client-key2.pem $CERTS_DIR - $ cp ca2.pem $CERTS_DIR + $ export WIFI_TEST_CERTS_DIR=samples/net/wifi/test_certs/rsa3k + $ cp client.pem $WIFI_TEST_CERTS_DIR + $ cp client-key.pem $WIFI_TEST_CERTS_DIR + $ cp ca.pem $WIFI_TEST_CERTS_DIR + $ cp client2.pem $WIFI_TEST_CERTS_DIR + $ cp client-key2.pem $WIFI_TEST_CERTS_DIR + $ cp ca2.pem $WIFI_TEST_CERTS_DIR $ west build -p -b samples/net/wifi -S wifi-enterprise -or alternatively copy ``rsa2k`` certificates by changing the ``CERTS_DIR`` environment variable. +or alternatively copy ``rsa2k`` certificates by changing the ``WIFI_TEST_CERTS_DIR`` environment variable. .. code-block:: bash - $ export CERTS_DIR=samples/net/wifi/test_certs/rsa2k + $ export WIFI_TEST_CERTS_DIR=samples/net/wifi/test_certs/rsa2k or you can set the :envvar:`WIFI_TEST_CERTS_DIR` environment variable to point to the directory containing your certificates. @@ -77,7 +77,7 @@ To facilitate installation of the certificates, a helper script is provided in t .. code-block:: bash - $ samples/net/wifi/test_certs/install_certs.sh samples/net/wifi/test_certs/rsa2k + $ samples/net/wifi/test_certs/install_certs.py -p samples/net/wifi/test_certs/rsa2k The script will install the certificates in the ``rsa2k`` directory to the TLS credentials store in the device over UART and using TLS credentials shell commands. diff --git a/doc/kernel/services/scheduling/index.rst b/doc/kernel/services/scheduling/index.rst index 87823ad40bf2..4c8b445b245f 100644 --- a/doc/kernel/services/scheduling/index.rst +++ b/doc/kernel/services/scheduling/index.rst @@ -59,7 +59,7 @@ The kernel can be built with one of several choices for the ready queue implementation, offering different choices between code size, constant factor runtime overhead and performance scaling when many threads are added. -* Simple linked-list ready queue (:kconfig:option:`CONFIG_SCHED_DUMB`) +* Simple linked-list ready queue (:kconfig:option:`CONFIG_SCHED_SIMPLE`) The scheduler ready queue will be implemented as a simple unordered list, with very fast constant time performance for single threads and very low code size. @@ -95,7 +95,7 @@ runtime overhead and performance scaling when many threads are added. list of threads. Typical applications with small numbers of runnable threads probably want the - DUMB scheduler. + simple scheduler. The wait_q abstraction used in IPC primitives to pend threads for later wakeup @@ -106,13 +106,13 @@ the same options. When selected, the wait_q will be implemented with a balanced tree. Choose this if you expect to have many threads waiting on individual primitives. - There is a ~2kb code size increase over :kconfig:option:`CONFIG_WAITQ_DUMB` (which may + There is a ~2kb code size increase over :kconfig:option:`CONFIG_WAITQ_SIMPLE` (which may be shared with :kconfig:option:`CONFIG_SCHED_SCALABLE`) if the red/black tree is not used elsewhere in the application, and pend/unpend operations on "small" queues will be somewhat slower (though this is not generally a performance path). -* Simple linked-list wait_q (:kconfig:option:`CONFIG_WAITQ_DUMB`) +* Simple linked-list wait_q (:kconfig:option:`CONFIG_WAITQ_SIMPLE`) When selected, the wait_q will be implemented with a doubly-linked list. Choose this if you expect to have only a few threads blocked on any single diff --git a/doc/kernel/services/smp/smp.rst b/doc/kernel/services/smp/smp.rst index 615676494f82..9a81609188ca 100644 --- a/doc/kernel/services/smp/smp.rst +++ b/doc/kernel/services/smp/smp.rst @@ -118,7 +118,7 @@ traversed in full. The kernel does not keep a per-CPU run queue. That means that the performance benefits from the :kconfig:option:`CONFIG_SCHED_SCALABLE` and :kconfig:option:`CONFIG_SCHED_MULTIQ` scheduler backends cannot be realized. CPU mask processing is -available only when :kconfig:option:`CONFIG_SCHED_DUMB` is the selected +available only when :kconfig:option:`CONFIG_SCHED_SIMPLE` is the selected backend. This requirement is enforced in the configuration layer. SMP Boot Process diff --git a/doc/releases/migration-guide-4.2.rst b/doc/releases/migration-guide-4.2.rst index fdcf721d453f..99a0ca65fbaa 100644 --- a/doc/releases/migration-guide-4.2.rst +++ b/doc/releases/migration-guide-4.2.rst @@ -60,6 +60,28 @@ Bluetooth Host Networking ********** +* The struct ``net_linkaddr_storage`` has been renamed to struct + :c:struct:`net_linkaddr` and the old struct ``net_linkaddr`` has been removed. + The struct :c:struct:`net_linkaddr` now contains space to store the link + address instead of having pointer that point to the link address. This avoids + possible dangling pointers when cloning struct :c:struct:`net_pkt`. This will + increase the size of struct :c:struct:`net_pkt` by 4 octets for IEEE 802.15.4, + but there is no size increase for other network technologies like Ethernet. + Note that any code that is using struct :c:struct:`net_linkaddr` directly, and + which has checks like ``if (lladdr->addr == NULL)``, will no longer work as expected + (because the addr is not a pointer) and must be changed to ``if (lladdr->len == 0)`` + if the code wants to check that the link address is not set. + +* TLS credential type ``TLS_CREDENTIAL_SERVER_CERTIFICATE`` was renamed to + more generic :c:enumerator:`TLS_CREDENTIAL_PUBLIC_CERTIFICATE` to better + reflect the purpose of this credential type. + +SPI +=== + +* Renamed the device tree property ``port_sel`` to ``port-sel``. +* Renamed the device tree property ``chip_select`` to ``chip-select``. + Other subsystems **************** diff --git a/doc/releases/release-notes-4.2.rst b/doc/releases/release-notes-4.2.rst index 2885a7bfeeaf..1ce44da41d91 100644 --- a/doc/releases/release-notes-4.2.rst +++ b/doc/releases/release-notes-4.2.rst @@ -52,6 +52,14 @@ Removed APIs and options ======================== Deprecated APIs and options + +* The scheduler Kconfig options CONFIG_SCHED_DUMB and CONFIG_WAITQ_DUMB were + renamed and deprecated. Use :kconfig:option:`CONFIG_SCHED_SIMPLE` and + :kconfig:option:`CONFIG_WAITQ_SIMPLE` instead. + +* TLS credential type ``TLS_CREDENTIAL_SERVER_CERTIFICATE`` was renamed and + deprecated, use :c:enumerator:`TLS_CREDENTIAL_PUBLIC_CERTIFICATE` instead. + =========================== New APIs and options diff --git a/drivers/wifi/eswifi/eswifi_socket_offload.c b/drivers/wifi/eswifi/eswifi_socket_offload.c index 212bef4380ac..5d37ae730427 100644 --- a/drivers/wifi/eswifi/eswifi_socket_offload.c +++ b/drivers/wifi/eswifi/eswifi_socket_offload.c @@ -191,7 +191,7 @@ static int map_credentials(int sd, const void *optval, socklen_t optlen) case TLS_CREDENTIAL_CA_CERTIFICATE: id = 0; break; - case TLS_CREDENTIAL_SERVER_CERTIFICATE: + case TLS_CREDENTIAL_PUBLIC_CERTIFICATE: id = 1; break; case TLS_CREDENTIAL_PRIVATE_KEY: diff --git a/drivers/wifi/simplelink/simplelink_sockets.c b/drivers/wifi/simplelink/simplelink_sockets.c index ff96fd91fe3c..29819ad45648 100644 --- a/drivers/wifi/simplelink/simplelink_sockets.c +++ b/drivers/wifi/simplelink/simplelink_sockets.c @@ -674,7 +674,7 @@ static int map_credentials(int sd, const void *optval, socklen_t optlen) case TLS_CREDENTIAL_CA_CERTIFICATE: opt = SL_SO_SECURE_FILES_CA_FILE_NAME; break; - case TLS_CREDENTIAL_SERVER_CERTIFICATE: + case TLS_CREDENTIAL_PUBLIC_CERTIFICATE: opt = SL_SO_SECURE_FILES_CERTIFICATE_FILE_NAME; break; case TLS_CREDENTIAL_PRIVATE_KEY: diff --git a/dts/arm/microchip/mec1501hsz.dtsi b/dts/arm/microchip/mec1501hsz.dtsi index e4b4d74cb311..af4342179335 100644 --- a/dts/arm/microchip/mec1501hsz.dtsi +++ b/dts/arm/microchip/mec1501hsz.dtsi @@ -471,7 +471,7 @@ rxdma = <11>; txdma = <10>; lines = <1>; - chip_select = <0>; + chip-select = <0>; dcsckon = <6>; dckcsoff = <4>; dldh = <6>; diff --git a/dts/bindings/spi/microchip,xec-qmspi.yaml b/dts/bindings/spi/microchip,xec-qmspi.yaml index 11a5577a0c6d..4be75d6bdd5d 100644 --- a/dts/bindings/spi/microchip,xec-qmspi.yaml +++ b/dts/bindings/spi/microchip,xec-qmspi.yaml @@ -11,7 +11,7 @@ properties: reg: required: true - port_sel: + port-sel: type: int required: true description: SPI Port 0 or 1. @@ -37,7 +37,7 @@ properties: required: true description: QMSPI lines 1, 2, or 4 - chip_select: + chip-select: type: int required: true description: Use QMSPI CS0# or CS1# diff --git a/include/zephyr/kernel_structs.h b/include/zephyr/kernel_structs.h index 56df49dcb23d..a712a8766848 100644 --- a/include/zephyr/kernel_structs.h +++ b/include/zephyr/kernel_structs.h @@ -133,7 +133,7 @@ struct _ready_q { struct k_thread *cache; #endif -#if defined(CONFIG_SCHED_DUMB) +#if defined(CONFIG_SCHED_SIMPLE) sys_dlist_t runq; #elif defined(CONFIG_SCHED_SCALABLE) struct _priq_rb runq; diff --git a/include/zephyr/net/tls_credentials.h b/include/zephyr/net/tls_credentials.h index 2804df061018..1002eee7e64b 100644 --- a/include/zephyr/net/tls_credentials.h +++ b/include/zephyr/net/tls_credentials.h @@ -36,11 +36,15 @@ enum tls_credential_type { */ TLS_CREDENTIAL_CA_CERTIFICATE, - /** A public server certificate. Use this to register your own server + /** A public client or server certificate. Use this to register your own * certificate. Should be registered together with a corresponding * private key. Used with certificate-based ciphersuites. */ - TLS_CREDENTIAL_SERVER_CERTIFICATE, + TLS_CREDENTIAL_PUBLIC_CERTIFICATE, + + /** @deprecated Use TLS_CREDENTIAL_PUBLIC_CERTIFICATE instead. + */ + TLS_CREDENTIAL_SERVER_CERTIFICATE = TLS_CREDENTIAL_PUBLIC_CERTIFICATE, /** Private key. Should be registered together with a corresponding * public certificate. Used with certificate-based ciphersuites. @@ -64,7 +68,7 @@ enum tls_credential_type { * in the system. * * @note Some TLS credentials come in pairs: - * - TLS_CREDENTIAL_SERVER_CERTIFICATE with TLS_CREDENTIAL_PRIVATE_KEY, + * - TLS_CREDENTIAL_PUBLIC_CERTIFICATE with TLS_CREDENTIAL_PRIVATE_KEY, * - TLS_CREDENTIAL_PSK with TLS_CREDENTIAL_PSK_ID. * Such pairs of credentials must be assigned the same secure tag to be * correctly handled in the system. diff --git a/kernel/Kconfig b/kernel/Kconfig index 0fbd3d92edc2..5f4d78e02f76 100644 --- a/kernel/Kconfig +++ b/kernel/Kconfig @@ -120,14 +120,14 @@ config SCHED_DEADLINE config SCHED_CPU_MASK bool "CPU mask affinity/pinning API" - depends on SCHED_DUMB + depends on SCHED_SIMPLE help When true, the application will have access to the k_thread_cpu_mask_*() APIs which control per-CPU affinity masks in SMP mode, allowing applications to pin threads to specific CPUs or disallow threads from running on given CPUs. Note that as currently implemented, this involves an inherent O(N) scaling in the number of - idle-but-runnable threads, and thus works only with the DUMB + idle-but-runnable threads, and thus works only with the simple scheduler (as SCALABLE and MULTIQ would see no benefit). Note that this setting does not technically depend on SMP and is @@ -296,16 +296,23 @@ endchoice # DYNAMIC_THREAD_PREFER endif # DYNAMIC_THREADS +config SCHED_DUMB + bool "Simple linked-list ready queue" + select DEPRECATED + help + Deprecated in favour of SCHED_SIMPLE. + choice SCHED_ALGORITHM prompt "Scheduler priority queue algorithm" - default SCHED_DUMB + default SCHED_SIMPLE if SCHED_DUMB + default SCHED_SIMPLE help The kernel can be built with several choices for the ready queue implementation, offering different choices between code size, constant factor runtime overhead and performance scaling when many threads are added. -config SCHED_DUMB +config SCHED_SIMPLE bool "Simple linked-list ready queue" help When selected, the scheduler ready queue will be implemented @@ -338,20 +345,27 @@ config SCHED_MULTIQ as the classic/textbook array of lists, one per priority. This corresponds to the scheduler algorithm used in Zephyr versions prior to 1.12. It incurs only a tiny code size - overhead vs. the "dumb" scheduler and runs in O(1) time + overhead vs. the "simple" scheduler and runs in O(1) time in almost all circumstances with very low constant factor. But it requires a fairly large RAM budget to store those list heads, and the limited features make it incompatible with features like deadline scheduling that need to sort threads more finely, and SMP affinity which need to traverse the list of threads. Typical applications with small numbers of runnable - threads probably want the DUMB scheduler. + threads probably want the simple scheduler. endchoice # SCHED_ALGORITHM +config WAITQ_DUMB + bool "Simple linked-list wait_q" + select DEPRECATED + help + Deprecated in favour of WAITQ_SIMPLE. + choice WAITQ_ALGORITHM prompt "Wait queue priority algorithm" - default WAITQ_DUMB + default WAITQ_SIMPLE if WAITQ_DUMB + default WAITQ_SIMPLE help The wait_q abstraction used in IPC primitives to pend threads for later wakeup shares the same backend data @@ -364,13 +378,13 @@ config WAITQ_SCALABLE When selected, the wait_q will be implemented with a balanced tree. Choose this if you expect to have many threads waiting on individual primitives. There is a ~2kb - code size increase over WAITQ_DUMB (which may be shared with + code size increase over WAITQ_SIMPLE (which may be shared with SCHED_SCALABLE) if the rbtree is not used elsewhere in the application, and pend/unpend operations on "small" queues will be somewhat slower (though this is not generally a performance path). -config WAITQ_DUMB +config WAITQ_SIMPLE bool "Simple linked-list wait_q" help When selected, the wait_q will be implemented with a diff --git a/kernel/include/priority_q.h b/kernel/include/priority_q.h index 259d689dda75..304effc07527 100644 --- a/kernel/include/priority_q.h +++ b/kernel/include/priority_q.h @@ -13,15 +13,15 @@ bool z_priq_rb_lessthan(struct rbnode *a, struct rbnode *b); /* Dumb Scheduling */ -#if defined(CONFIG_SCHED_DUMB) -#define _priq_run_init z_priq_dumb_init -#define _priq_run_add z_priq_dumb_add -#define _priq_run_remove z_priq_dumb_remove -#define _priq_run_yield z_priq_dumb_yield +#if defined(CONFIG_SCHED_SIMPLE) +#define _priq_run_init z_priq_simple_init +#define _priq_run_add z_priq_simple_add +#define _priq_run_remove z_priq_simple_remove +#define _priq_run_yield z_priq_simple_yield # if defined(CONFIG_SCHED_CPU_MASK) -# define _priq_run_best z_priq_dumb_mask_best +# define _priq_run_best z_priq_simple_mask_best # else -# define _priq_run_best z_priq_dumb_best +# define _priq_run_best z_priq_simple_best # endif /* CONFIG_SCHED_CPU_MASK */ /* Scalable Scheduling */ #elif defined(CONFIG_SCHED_SCALABLE) @@ -45,10 +45,10 @@ bool z_priq_rb_lessthan(struct rbnode *a, struct rbnode *b); #define _priq_wait_remove z_priq_rb_remove #define _priq_wait_best z_priq_rb_best /* Dumb Wait Queue */ -#elif defined(CONFIG_WAITQ_DUMB) -#define _priq_wait_add z_priq_dumb_add -#define _priq_wait_remove z_priq_dumb_remove -#define _priq_wait_best z_priq_dumb_best +#elif defined(CONFIG_WAITQ_SIMPLE) +#define _priq_wait_add z_priq_simple_add +#define _priq_wait_remove z_priq_simple_remove +#define _priq_wait_best z_priq_simple_best #endif #if defined(CONFIG_64BIT) @@ -59,7 +59,7 @@ bool z_priq_rb_lessthan(struct rbnode *a, struct rbnode *b); #define TRAILING_ZEROS u32_count_trailing_zeros #endif /* CONFIG_64BIT */ -static ALWAYS_INLINE void z_priq_dumb_init(sys_dlist_t *pq) +static ALWAYS_INLINE void z_priq_simple_init(sys_dlist_t *pq) { sys_dlist_init(pq); } @@ -105,7 +105,7 @@ static ALWAYS_INLINE int32_t z_sched_prio_cmp(struct k_thread *thread_1, struct return 0; } -static ALWAYS_INLINE void z_priq_dumb_add(sys_dlist_t *pq, struct k_thread *thread) +static ALWAYS_INLINE void z_priq_simple_add(sys_dlist_t *pq, struct k_thread *thread) { struct k_thread *t; @@ -119,14 +119,14 @@ static ALWAYS_INLINE void z_priq_dumb_add(sys_dlist_t *pq, struct k_thread *thre sys_dlist_append(pq, &thread->base.qnode_dlist); } -static ALWAYS_INLINE void z_priq_dumb_remove(sys_dlist_t *pq, struct k_thread *thread) +static ALWAYS_INLINE void z_priq_simple_remove(sys_dlist_t *pq, struct k_thread *thread) { ARG_UNUSED(pq); sys_dlist_remove(&thread->base.qnode_dlist); } -static ALWAYS_INLINE void z_priq_dumb_yield(sys_dlist_t *pq) +static ALWAYS_INLINE void z_priq_simple_yield(sys_dlist_t *pq) { #ifndef CONFIG_SMP sys_dnode_t *n; @@ -157,7 +157,7 @@ static ALWAYS_INLINE void z_priq_dumb_yield(sys_dlist_t *pq) #endif } -static ALWAYS_INLINE struct k_thread *z_priq_dumb_best(sys_dlist_t *pq) +static ALWAYS_INLINE struct k_thread *z_priq_simple_best(sys_dlist_t *pq) { struct k_thread *thread = NULL; sys_dnode_t *n = sys_dlist_peek_head(pq); @@ -169,7 +169,7 @@ static ALWAYS_INLINE struct k_thread *z_priq_dumb_best(sys_dlist_t *pq) } #ifdef CONFIG_SCHED_CPU_MASK -static ALWAYS_INLINE struct k_thread *z_priq_dumb_mask_best(sys_dlist_t *pq) +static ALWAYS_INLINE struct k_thread *z_priq_simple_mask_best(sys_dlist_t *pq) { /* With masks enabled we need to be prepared to walk the list * looking for one we can run diff --git a/modules/thrift/src/thrift/transport/TSSLSocket.cpp b/modules/thrift/src/thrift/transport/TSSLSocket.cpp index 3ac178ede3be..f23c6b4f96dc 100644 --- a/modules/thrift/src/thrift/transport/TSSLSocket.cpp +++ b/modules/thrift/src/thrift/transport/TSSLSocket.cpp @@ -450,7 +450,7 @@ void TSSLSocketFactory::loadCertificateFromBuffer(const char *aCertificate, cons if (strcmp(format, "PEM") == 0) { const int status = tls_credential_add(Thrift_TLS_SERVER_CERT_TAG, - TLS_CREDENTIAL_SERVER_CERTIFICATE, + TLS_CREDENTIAL_PUBLIC_CERTIFICATE, aCertificate, strlen(aCertificate) + 1); if (status != 0) { diff --git a/samples/basic/minimal/mt.conf b/samples/basic/minimal/mt.conf index d9cea5303659..ea573a9d5018 100644 --- a/samples/basic/minimal/mt.conf +++ b/samples/basic/minimal/mt.conf @@ -3,6 +3,5 @@ CONFIG_NUM_COOP_PRIORITIES=16 CONFIG_NUM_METAIRQ_PRIORITIES=0 CONFIG_ERRNO=n -CONFIG_SCHED_DUMB=y -CONFIG_WAITQ_DUMB=y - +CONFIG_SCHED_SIMPLE=y +CONFIG_WAITQ_SIMPLE=y diff --git a/samples/drivers/espi/boards/mec1501modular_assy6885.overlay b/samples/drivers/espi/boards/mec1501modular_assy6885.overlay index b89552680567..a9be14317483 100644 --- a/samples/drivers/espi/boards/mec1501modular_assy6885.overlay +++ b/samples/drivers/espi/boards/mec1501modular_assy6885.overlay @@ -16,8 +16,8 @@ &spi0 { status = "okay"; - port_sel = <0>; - chip_select = <0>; + port-sel = <0>; + chip-select = <0>; lines = <4>; pinctrl-0 = < &shd_cs0_n_gpio055 &shd_clk_gpio056 diff --git a/samples/drivers/espi/boards/mec15xxevb_assy6853.overlay b/samples/drivers/espi/boards/mec15xxevb_assy6853.overlay index 2fc8aeaede7a..a68e6ffda611 100644 --- a/samples/drivers/espi/boards/mec15xxevb_assy6853.overlay +++ b/samples/drivers/espi/boards/mec15xxevb_assy6853.overlay @@ -20,7 +20,7 @@ &spi0 { status = "okay"; - port_sel = <0>; - chip_select = <0>; + port-sel = <0>; + chip-select = <0>; lines = <4>; }; diff --git a/samples/net/prometheus/src/main.c b/samples/net/prometheus/src/main.c index 5497da2e0780..7f0f152a27f2 100644 --- a/samples/net/prometheus/src/main.c +++ b/samples/net/prometheus/src/main.c @@ -120,7 +120,7 @@ static void setup_tls(void) } #endif /* defined(CONFIG_NET_SAMPLE_CERTS_WITH_SC) */ - err = tls_credential_add(HTTP_SERVER_CERTIFICATE_TAG, TLS_CREDENTIAL_SERVER_CERTIFICATE, + err = tls_credential_add(HTTP_SERVER_CERTIFICATE_TAG, TLS_CREDENTIAL_PUBLIC_CERTIFICATE, server_certificate, sizeof(server_certificate)); if (err < 0) { LOG_ERR("Failed to register public certificate: %d", err); diff --git a/samples/net/sockets/dumb_http_server_mt/src/main.c b/samples/net/sockets/dumb_http_server_mt/src/main.c index 06f9f0c6e716..ed19fa968332 100644 --- a/samples/net/sockets/dumb_http_server_mt/src/main.c +++ b/samples/net/sockets/dumb_http_server_mt/src/main.c @@ -413,7 +413,7 @@ int main(void) { #if defined(CONFIG_NET_SOCKETS_SOCKOPT_TLS) int err = tls_credential_add(SERVER_CERTIFICATE_TAG, - TLS_CREDENTIAL_SERVER_CERTIFICATE, + TLS_CREDENTIAL_PUBLIC_CERTIFICATE, server_certificate, sizeof(server_certificate)); if (err < 0) { diff --git a/samples/net/sockets/echo_server/src/echo-server.c b/samples/net/sockets/echo_server/src/echo-server.c index d7a80da85646..fd6bd4f6acf0 100644 --- a/samples/net/sockets/echo_server/src/echo-server.c +++ b/samples/net/sockets/echo_server/src/echo-server.c @@ -153,7 +153,7 @@ static void init_app(void) #endif /* defined(CONFIG_NET_SAMPLE_CERTS_WITH_SC) */ err = tls_credential_add(SERVER_CERTIFICATE_TAG, - TLS_CREDENTIAL_SERVER_CERTIFICATE, + TLS_CREDENTIAL_PUBLIC_CERTIFICATE, server_certificate, sizeof(server_certificate)); if (err < 0) { diff --git a/samples/net/sockets/http_server/src/main.c b/samples/net/sockets/http_server/src/main.c index 5bd27c144383..4cfe06ff97cc 100644 --- a/samples/net/sockets/http_server/src/main.c +++ b/samples/net/sockets/http_server/src/main.c @@ -312,7 +312,7 @@ static void setup_tls(void) int err; err = tls_credential_add(HTTP_SERVER_CERTIFICATE_TAG, - TLS_CREDENTIAL_SERVER_CERTIFICATE, + TLS_CREDENTIAL_PUBLIC_CERTIFICATE, server_certificate, sizeof(server_certificate)); if (err < 0) { diff --git a/samples/net/wifi/test_certs/install_certs.py b/samples/net/wifi/test_certs/install_certs.py new file mode 100755 index 000000000000..41e8b1e8839d --- /dev/null +++ b/samples/net/wifi/test_certs/install_certs.py @@ -0,0 +1,130 @@ +#!/usr/bin/env python3 +# Copyright (c) 2025, Nordic Semiconductor ASA +# SPDX-License-Identifier: Apache-2.0 + +import argparse +import os +import signal +import subprocess +import sys +from importlib.metadata import PackageNotFoundError, version + +from packaging.version import parse as parse_version + + +def signal_handler(sig, frame): + print('\nScript terminated by user') + sys.exit(0) + + +def check_requirements(): + try: + installed_version = version('nrfcloud-utils') + min_required_version = "1.0.4" + if parse_version(installed_version) < parse_version(min_required_version): + print( + f"\033[31mError: device_credentials_installer >= {min_required_version} required. " + f"Installed: {installed_version}.\033[0m" + ) + print("Update: pip3 install --upgrade nrfcloud-utils") + sys.exit(1) + except PackageNotFoundError: + print("\033[31mError: device_credentials_installer could not be found.\033[0m") + print("Please install it using: pip3 install nrfcloud-utils") + sys.exit(1) + + +def main(): + signal.signal(signal.SIGINT, signal_handler) + parser = argparse.ArgumentParser(description='Install Wi-Fi certificates', allow_abbrev=False) + parser.add_argument('--path', required=True, help='Path to certificate files') + parser.add_argument( + '--serial-device', default='/dev/ttyACM1', help='Serial port device (default: /dev/ttyACM1)' + ) + parser.add_argument( + '--operation-mode', + choices=['AP', 'STA'], + default='STA', + help='Operation mode: AP or STA (default: STA)', + ) + args = parser.parse_args() + + cert_path = args.path + cert_path = args.path + port = args.serial_device + mode = args.operation_mode + if not os.path.isdir(cert_path): + print(f"\033[31mError: Directory {cert_path} does not exist.\033[0m") + sys.exit(1) + + print( + "\033[33mWarning: Please make sure that the UART is not being used by another " + "application.\033[0m" + ) + input("Press Enter to continue or Ctrl+C to exit...") + + check_requirements() + + # TLS credential types + TLS_CREDENTIAL_CA_CERTIFICATE = 0 + TLS_CREDENTIAL_PUBLIC_CERTIFICATE = 1 + TLS_CREDENTIAL_PRIVATE_KEY = 2 + + WIFI_CERT_SEC_TAG_BASE = 0x1020001 + WIFI_CERT_SEC_TAG_MAP = { + "ca.pem": (TLS_CREDENTIAL_CA_CERTIFICATE, WIFI_CERT_SEC_TAG_BASE), + "client-key.pem": (TLS_CREDENTIAL_PRIVATE_KEY, WIFI_CERT_SEC_TAG_BASE + 1), + "server-key.pem": (TLS_CREDENTIAL_PRIVATE_KEY, WIFI_CERT_SEC_TAG_BASE + 2), + "client.pem": (TLS_CREDENTIAL_PUBLIC_CERTIFICATE, WIFI_CERT_SEC_TAG_BASE + 3), + "server.pem": (TLS_CREDENTIAL_PUBLIC_CERTIFICATE, WIFI_CERT_SEC_TAG_BASE + 4), + "ca2.pem": (TLS_CREDENTIAL_CA_CERTIFICATE, WIFI_CERT_SEC_TAG_BASE + 5), + "client-key2.pem": (TLS_CREDENTIAL_PRIVATE_KEY, WIFI_CERT_SEC_TAG_BASE + 6), + "client2.pem": (TLS_CREDENTIAL_PUBLIC_CERTIFICATE, WIFI_CERT_SEC_TAG_BASE + 7), + } + + cert_files = ( + ["ca.pem", "server-key.pem", "server.pem"] + if mode == "AP" + else ["ca.pem", "client-key.pem", "client.pem", "ca2.pem", "client-key2.pem", "client2.pem"] + ) + + total_certs = len(cert_files) + for idx, cert in enumerate(cert_files, 1): + print(f"Processing certificate {idx} of {total_certs}: {cert}") + + cert_file_path = os.path.join(cert_path, cert) + if not os.path.isfile(cert_file_path): + print( + f"\033[31mWarning: Certificate file {cert_file_path} does not exist. " + f"Skipping...\033[0m" + ) + continue + + cert_type, sec_tag = WIFI_CERT_SEC_TAG_MAP[cert] + try: + subprocess.run( + [ + "device_credentials_installer", + "--local-cert-file", + cert_file_path, + "--cmd-type", + "tls_cred_shell", + "--delete", + "--port", + port, + "-S", + str(sec_tag), + "--cert-type", + str(cert_type), + ], + check=True, + ) + print(f"Successfully installed {cert}.") + except subprocess.CalledProcessError: + print(f"\033[31mFailed to install {cert}.\033[0m") + + print("Certificate installation process completed.") + + +if __name__ == "__main__": + main() diff --git a/samples/net/wifi/test_certs/install_certs.sh b/samples/net/wifi/test_certs/install_certs.sh deleted file mode 100755 index 4a6940dc5227..000000000000 --- a/samples/net/wifi/test_certs/install_certs.sh +++ /dev/null @@ -1,135 +0,0 @@ -#!/usr/bin/env bash -# Copyright (c) 2025, Nordic Semiconductor ASA -# SPDX-License-Identifier: Apache-2.0 -# -# This script installs Wi-Fi certificates to a device using the `device_credentials_installer` tool. -# -# shellcheck disable=SC2086,SC2154 -# Usage: -# ./install_certs.sh [port] [mode] -# -# Arguments: -# Path to the directory containing the certificate files. -# [port] (Optional) Serial port to use for communication with the device. Default is -# /dev/ttyACM1. -# [mode] (Optional) Mode of operation: AP or STA. Default is STA. -# -# Dependencies: -# - `device_credentials_installer` tool must be installed. You can install it using: -# pip3 install nrfcloud-utils -# -# Certificate Files: -# The script expects the following certificate files in the specified directory: -# - ca.pem: CA certificate for Wi-Fi Enterprise mode (Phase 1) -# - client-key.pem: Client private key for Wi-Fi Enterprise mode (Phase 1) -# - server-key.pem: Server private key for Wi-Fi Enterprise mode, for used in AP mode. -# - client.pem: Client certificate for Wi-Fi Enterprise mode (Phase 1) -# - server.pem: Server certificate for Wi-Fi Enterprise mode, for used in AP mode. -# - ca2.pem: CA certificate for Wi-Fi Enterprise mode (Phase 2) -# - client-key2.pem: Client private key for Wi-Fi Enterprise mode (Phase 2) -# - client2.pem: Client certificate for Wi-Fi Enterprise mode (Phase 2) -# -# Each certificate file is associated with a specific security tag (sec_tag) which is used during -# installation. -# -# The script performs the following steps: -# 1. Checks if the required arguments are provided. -# 2. Validates the existence of the certificate directory. -# 3. Checks if the `device_credentials_installer` tool is available. -# 4. Iterates over the expected certificate files and installs them to the device if they exist. -# 5. Logs the success or failure of each certificate installation. -# -# Note: -# - If a certificate file is missing, the script will skip its installation and log a warning. -# - The script will terminate on the first encountered error (set -e). -set -e - -if [ -z "$1" ]; then - echo -e "\033[31mError: Usage: $0 [port] [mode]\033[0m" - exit 1 -fi - -CERT_PATH=$1 -PORT=${2:-/dev/ttyACM1} # Default port is /dev/ttyACM1 if not provided -MODE=${3:-STA} # Default mode is STA if not provided - -if [ ! -d "$CERT_PATH" ]; then - echo -e "\033[31mError: Directory $CERT_PATH does not exist.\033[0m" - exit 1 -fi - -echo -e "\033[33mWarning: Please make sure that the UART is not being used by another" \ - " application.\033[0m" - -read -r -p "Press Enter to continue or Ctrl+C to exit..." - -if ! command -v device_credentials_installer &> /dev/null; then - echo -e "\033[31mError: device_credentials_installer could not be found.\033[0m" - echo "Please install it using: pip3 install nrfcloud-utils" - exit 1 -fi - -INSTALLED_VERSION=$(pip3 show nrfcloud-utils | grep Version | awk '{print $2}') -REQUIRED_VERSION="1.0.4" - -if [ "$(printf '%s\n' "$REQUIRED_VERSION" "$INSTALLED_VERSION" | sort -V | head -n1)" != \ -"$REQUIRED_VERSION" ]; then - echo -e "\033[31mError: device_credentials_installer >= $REQUIRED_VERSION required. Installed: \ -$INSTALLED_VERSION.\033[0m" - echo "Update: pip3 install --upgrade nrfcloud-utils" - exit 1 -fi - -# From zephyr/subsys/net/lib/tls_credentials/tls_credentials_shell.c -TLS_CREDENTIAL_CA_CERTIFICATE=0 # CA -TLS_CREDENTIAL_PUBLIC_CERTIFICATE=1 # SERV -TLS_CREDENTIAL_PRIVATE_KEY=2 # PK - - -WIFI_CERT_SEC_TAG_BASE=0x1020001 -declare -A WIFI_CERT_SEC_TAG_MAP=( - ["ca.pem"]="{\"$TLS_CREDENTIAL_CA_CERTIFICATE\" $((WIFI_CERT_SEC_TAG_BASE))}" - ["client-key.pem"]="{\"$TLS_CREDENTIAL_PRIVATE_KEY\" $((WIFI_CERT_SEC_TAG_BASE + 1))}" - ["server-key.pem"]="{\"$TLS_CREDENTIAL_PRIVATE_KEY\" $((WIFI_CERT_SEC_TAG_BASE + 2))}" - ["client.pem"]="{\"$TLS_CREDENTIAL_PUBLIC_CERTIFICATE\" $((WIFI_CERT_SEC_TAG_BASE + 3))}" - ["server.pem"]="{\"$TLS_CREDENTIAL_PUBLIC_CERTIFICATE\" $((WIFI_CERT_SEC_TAG_BASE + 4))}" - ["ca2.pem"]="{\"$TLS_CREDENTIAL_CA_CERTIFICATE\" $((WIFI_CERT_SEC_TAG_BASE + 5))}" - ["client-key2.pem"]="{\"$TLS_CREDENTIAL_PRIVATE_KEY\" $((WIFI_CERT_SEC_TAG_BASE + 6))}" - ["client2.pem"]="{\"$TLS_CREDENTIAL_PUBLIC_CERTIFICATE\" $((WIFI_CERT_SEC_TAG_BASE + 7))}" -) - -# Select certificates based on mode -if [ "$MODE" == "AP" ]; then - CERT_FILES=("ca.pem" "server-key.pem" "server.pem") -else - CERT_FILES=("ca.pem" "client-key.pem" "client.pem" "ca2.pem" "client-key2.pem" "client2.pem") -fi - -total_certs=${#CERT_FILES[@]} -processed_certs=0 - -for cert in "${CERT_FILES[@]}"; do - processed_certs=$((processed_certs + 1)) - echo "Processing certificate $processed_certs of $total_certs: $cert" - - if [ ! -f "$CERT_PATH/$cert" ]; then - echo -e "\033[31mWarning: Certificate file $CERT_PATH/$cert does not exist. Skipping...\033[0m" - continue - fi - - cert_info=${WIFI_CERT_SEC_TAG_MAP[$cert]} - cert_type=$(echo "$cert_info" | awk -F'[{} ]' '{print $2}' | tr -d '"') - cert_type_int=$((10#$cert_type)) - sec_tag=$(echo "$cert_info" | awk -F'[{} ]' '{print $3}' | tr -d '"') - sec_tag_int=$((10#$sec_tag)) - if device_credentials_installer --local-cert-file "$CERT_PATH/$cert" \ - --cmd-type tls_cred_shell --delete \ - --port $PORT -S $sec_tag_int --cert-type $cert_type_int; then - echo "Successfully installed $cert." - else - echo -e "\033[31mFailed to install $cert.\033[0m" - fi -done - - -echo "Certificate installation process completed." diff --git a/samples/subsys/mgmt/updatehub/src/main.c b/samples/subsys/mgmt/updatehub/src/main.c index b8b1406ba0c9..73d64a1a6947 100644 --- a/samples/subsys/mgmt/updatehub/src/main.c +++ b/samples/subsys/mgmt/updatehub/src/main.c @@ -89,7 +89,7 @@ int main(void) #if defined(CONFIG_UPDATEHUB_DTLS) if (tls_credential_add(CA_CERTIFICATE_TAG, - TLS_CREDENTIAL_SERVER_CERTIFICATE, + TLS_CREDENTIAL_PUBLIC_CERTIFICATE, server_certificate, sizeof(server_certificate)) < 0) { LOG_ERR("Failed to register server certificate"); diff --git a/soc/espressif/esp32/Kconfig.defconfig b/soc/espressif/esp32/Kconfig.defconfig index c2217013826c..8c43bcf57175 100644 --- a/soc/espressif/esp32/Kconfig.defconfig +++ b/soc/espressif/esp32/Kconfig.defconfig @@ -18,7 +18,7 @@ config SCHED_IPI_SUPPORTED default y config SCHED_CPU_MASK - default y if SCHED_DUMB + default y if SCHED_SIMPLE config MP_MAX_NUM_CPUS default 2 diff --git a/subsys/net/l2/wifi/Kconfig b/subsys/net/l2/wifi/Kconfig index cd6540aa831b..a2e029a592be 100644 --- a/subsys/net/l2/wifi/Kconfig +++ b/subsys/net/l2/wifi/Kconfig @@ -138,6 +138,7 @@ config WIFI_SHELL_RUNTIME_CERTIFICATES Uses the TLS credentials subsystem to store and manage the certificates. if WIFI_SHELL_RUNTIME_CERTIFICATES + config HEAP_MEM_POOL_ADD_SIZE_WIFI_CERT int "Wi-Fi enterprise security certificates memory pool size" # STA - 6 certs and each assume 1500 bytes diff --git a/subsys/net/l2/wifi/wifi_shell.c b/subsys/net/l2/wifi/wifi_shell.c index 182eb85d0183..5847fe218e98 100644 --- a/subsys/net/l2/wifi/wifi_shell.c +++ b/subsys/net/l2/wifi/wifi_shell.c @@ -305,7 +305,7 @@ static void clear_enterprise_creds_params(struct wifi_enterprise_creds_params *p params->server_cert, params->server_key, params->ca_cert2, - params->client_cert2 + params->client_cert2, params->client_key2, }; diff --git a/subsys/net/lib/lwm2m/lwm2m_engine.c b/subsys/net/lib/lwm2m/lwm2m_engine.c index 70ca2f52f74d..26c0585b3ad1 100644 --- a/subsys/net/lib/lwm2m/lwm2m_engine.c +++ b/subsys/net/lib/lwm2m/lwm2m_engine.c @@ -922,7 +922,7 @@ static void delete_tls_credentials(sec_tag_t tag) { tls_credential_delete(tag, TLS_CREDENTIAL_PSK_ID); tls_credential_delete(tag, TLS_CREDENTIAL_PSK); - tls_credential_delete(tag, TLS_CREDENTIAL_SERVER_CERTIFICATE); + tls_credential_delete(tag, TLS_CREDENTIAL_PUBLIC_CERTIFICATE); tls_credential_delete(tag, TLS_CREDENTIAL_PRIVATE_KEY); tls_credential_delete(tag, TLS_CREDENTIAL_CA_CERTIFICATE); } @@ -1003,7 +1003,7 @@ static int lwm2m_load_x509_credentials(struct lwm2m_ctx *ctx) delete_tls_credentials(ctx->tls_tag); - ret = load_tls_type(ctx, 3, TLS_CREDENTIAL_SERVER_CERTIFICATE); + ret = load_tls_type(ctx, 3, TLS_CREDENTIAL_PUBLIC_CERTIFICATE); if (ret < 0) { return ret; } diff --git a/subsys/net/lib/sockets/sockets_tls.c b/subsys/net/lib/sockets/sockets_tls.c index b28f8aa8be93..5b29c3077e8f 100644 --- a/subsys/net/lib/sockets/sockets_tls.c +++ b/subsys/net/lib/sockets/sockets_tls.c @@ -1078,7 +1078,7 @@ static int tls_set_credential(struct tls_context *tls, case TLS_CREDENTIAL_CA_CERTIFICATE: return tls_add_ca_certificate(tls, cred); - case TLS_CREDENTIAL_SERVER_CERTIFICATE: + case TLS_CREDENTIAL_PUBLIC_CERTIFICATE: return tls_add_own_cert(tls, cred); case TLS_CREDENTIAL_PRIVATE_KEY: @@ -1133,7 +1133,7 @@ static int tls_mbedtls_set_credentials(struct tls_context *tls) if (cred->type == TLS_CREDENTIAL_CA_CERTIFICATE) { ca_cert_present = true; - } else if (cred->type == TLS_CREDENTIAL_SERVER_CERTIFICATE) { + } else if (cred->type == TLS_CREDENTIAL_PUBLIC_CERTIFICATE) { own_cert_present = true; } } diff --git a/subsys/net/lib/tls_credentials/Kconfig.shell b/subsys/net/lib/tls_credentials/Kconfig.shell index 9a28e887bf6c..79adf1187a98 100644 --- a/subsys/net/lib/tls_credentials/Kconfig.shell +++ b/subsys/net/lib/tls_credentials/Kconfig.shell @@ -33,6 +33,7 @@ config TLS_CREDENTIALS_SHELL_DIGEST_BUF_SIZE Also used to print error messages if digest generation fails. if TLS_CREDENTIALS_BACKEND_VOLATILE + config HEAP_MEM_POOL_ADD_SIZE_TLS_CRED_SHELL int "TLS credentials shell memory pool size" # default 4 certs and each assume 1500 bytes diff --git a/subsys/net/lib/tls_credentials/tls_credentials_shell.c b/subsys/net/lib/tls_credentials/tls_credentials_shell.c index 3195c7599627..3966af101867 100644 --- a/subsys/net/lib/tls_credentials/tls_credentials_shell.c +++ b/subsys/net/lib/tls_credentials/tls_credentials_shell.c @@ -40,12 +40,12 @@ static const struct cred_type_string type_strings[] = { {"CA_CERT", TLS_CREDENTIAL_CA_CERTIFICATE}, {"CA", TLS_CREDENTIAL_CA_CERTIFICATE}, - {"SERVER_CERT", TLS_CREDENTIAL_SERVER_CERTIFICATE}, - {"CLIENT_CERT", TLS_CREDENTIAL_SERVER_CERTIFICATE}, - {"SELF_CERT", TLS_CREDENTIAL_SERVER_CERTIFICATE}, - {"SELF", TLS_CREDENTIAL_SERVER_CERTIFICATE}, - {"CLIENT", TLS_CREDENTIAL_SERVER_CERTIFICATE}, - {"SERV", TLS_CREDENTIAL_SERVER_CERTIFICATE}, + {"SERVER_CERT", TLS_CREDENTIAL_PUBLIC_CERTIFICATE}, + {"CLIENT_CERT", TLS_CREDENTIAL_PUBLIC_CERTIFICATE}, + {"SELF_CERT", TLS_CREDENTIAL_PUBLIC_CERTIFICATE}, + {"SELF", TLS_CREDENTIAL_PUBLIC_CERTIFICATE}, + {"CLIENT", TLS_CREDENTIAL_PUBLIC_CERTIFICATE}, + {"SERV", TLS_CREDENTIAL_PUBLIC_CERTIFICATE}, {"PRIVATE_KEY", TLS_CREDENTIAL_PRIVATE_KEY}, {"PK", TLS_CREDENTIAL_PRIVATE_KEY}, diff --git a/tests/benchmarks/sched/prj.conf b/tests/benchmarks/sched/prj.conf index c7a5efd8f43b..521a1806ebf2 100644 --- a/tests/benchmarks/sched/prj.conf +++ b/tests/benchmarks/sched/prj.conf @@ -2,7 +2,7 @@ CONFIG_TEST=y CONFIG_NUM_PREEMPT_PRIORITIES=8 CONFIG_NUM_COOP_PRIORITIES=8 -# Switch these between DUMB/SCALABLE (and SCHED_MULTIQ) to measure +# Switch these between SIMPLE/SCALABLE (and SCHED_MULTIQ) to measure # different backends -CONFIG_SCHED_DUMB=y -CONFIG_WAITQ_DUMB=y +CONFIG_SCHED_SIMPLE=y +CONFIG_WAITQ_SIMPLE=y diff --git a/tests/benchmarks/sched/src/main.c b/tests/benchmarks/sched/src/main.c index e40b6a1afd09..19a5df866a0d 100644 --- a/tests/benchmarks/sched/src/main.c +++ b/tests/benchmarks/sched/src/main.c @@ -169,7 +169,7 @@ int main(void) } /* For reference, an unmodified HEAD on qemu_x86 with - * !USERSPACE and SCHED_DUMB and using -icount + * !USERSPACE and SCHED_SIMPLE and using -icount * shift=0,sleep=off,align=off, I get results of: * * unpend 132 ready 257 switch 278 pend 321 tot 988 (avg 900) diff --git a/tests/benchmarks/sched_queues/README.rst b/tests/benchmarks/sched_queues/README.rst index a4c13f6eafe0..8b816931bf0f 100644 --- a/tests/benchmarks/sched_queues/README.rst +++ b/tests/benchmarks/sched_queues/README.rst @@ -2,7 +2,7 @@ Scheduling Queue Measurements ############################# A Zephyr application developer may choose between three different scheduling -algorithms: dumb, scalable and multiq. These different algorithms have +algorithms: simple, scalable and multiq. These different algorithms have different performance characteristics that vary as the number of ready threads increases. This benchmark can be used to help determine which scheduling algorithm may best suit the developer's application. diff --git a/tests/benchmarks/sched_queues/src/main.c b/tests/benchmarks/sched_queues/src/main.c index c3ff9f3dd299..b71b65e7c337 100644 --- a/tests/benchmarks/sched_queues/src/main.c +++ b/tests/benchmarks/sched_queues/src/main.c @@ -239,7 +239,7 @@ int main(void) freq = timing_freq_get_mhz(); printk("Time Measurements for %s sched queues\n", - IS_ENABLED(CONFIG_SCHED_DUMB) ? "dumb" : + IS_ENABLED(CONFIG_SCHED_SIMPLE) ? "simple" : IS_ENABLED(CONFIG_SCHED_SCALABLE) ? "scalable" : "multiq"); printk("Timing results: Clock frequency: %u MHz\n", freq); diff --git a/tests/benchmarks/sched_queues/testcase.yaml b/tests/benchmarks/sched_queues/testcase.yaml index 4d8f691cb5db..a11d00443fe7 100644 --- a/tests/benchmarks/sched_queues/testcase.yaml +++ b/tests/benchmarks/sched_queues/testcase.yaml @@ -21,9 +21,9 @@ common: - CONFIG_BENCHMARK_RECORDING=y tests: - benchmark.sched_queues.dumb: + benchmark.sched_queues.simple: extra_configs: - - CONFIG_SCHED_DUMB=y + - CONFIG_SCHED_SIMPLE=y benchmark.sched_queues.scalable: extra_configs: diff --git a/tests/benchmarks/wait_queues/README.rst b/tests/benchmarks/wait_queues/README.rst index b10e505f37b2..b1eb4dfa35a1 100644 --- a/tests/benchmarks/wait_queues/README.rst +++ b/tests/benchmarks/wait_queues/README.rst @@ -2,7 +2,7 @@ Wait Queue Measurements ####################### A Zehpyr application developer may choose between two different wait queue -implementations: dumb and scalable. These two queue implementations perform +implementations: simple and scalable. These two queue implementations perform differently under different loads. This benchmark can be used to showcase how the performance of these two implementations vary under varying conditions. diff --git a/tests/benchmarks/wait_queues/src/main.c b/tests/benchmarks/wait_queues/src/main.c index e7146e81e814..759acc1789bf 100644 --- a/tests/benchmarks/wait_queues/src/main.c +++ b/tests/benchmarks/wait_queues/src/main.c @@ -228,7 +228,7 @@ int main(void) freq = timing_freq_get_mhz(); printk("Time Measurements for %s wait queues\n", - IS_ENABLED(CONFIG_WAITQ_DUMB) ? "dumb" : "scalable"); + IS_ENABLED(CONFIG_WAITQ_SIMPLE) ? "simple" : "scalable"); printk("Timing results: Clock frequency: %u MHz\n", freq); z_waitq_init(&wait_q); diff --git a/tests/benchmarks/wait_queues/testcase.yaml b/tests/benchmarks/wait_queues/testcase.yaml index 898cf1f475b2..cf7d091a4af3 100644 --- a/tests/benchmarks/wait_queues/testcase.yaml +++ b/tests/benchmarks/wait_queues/testcase.yaml @@ -20,9 +20,9 @@ common: - CONFIG_BENCHMARK_RECORDING=y tests: - benchmark.wait_queues.dumb: + benchmark.wait_queues.simple: extra_configs: - - CONFIG_WAITQ_DUMB=y + - CONFIG_WAITQ_SIMPLE=y benchmark.wait_queues.scalable: extra_configs: diff --git a/tests/boards/mec15xxevb_assy6853/qspi/boards/mec15xxevb_assy6853.overlay b/tests/boards/mec15xxevb_assy6853/qspi/boards/mec15xxevb_assy6853.overlay index 2fdb18486061..d85b70f4f7a8 100644 --- a/tests/boards/mec15xxevb_assy6853/qspi/boards/mec15xxevb_assy6853.overlay +++ b/tests/boards/mec15xxevb_assy6853/qspi/boards/mec15xxevb_assy6853.overlay @@ -6,8 +6,8 @@ &spi0 { status = "okay"; - port_sel = <0>; - chip_select = <0>; + port-sel = <0>; + chip-select = <0>; lines = <4>; pinctrl-0 = < &shd_cs0_n_gpio055 diff --git a/tests/kernel/sched/deadline/prj.conf b/tests/kernel/sched/deadline/prj.conf index dce7876cc10c..17af1be2489b 100644 --- a/tests/kernel/sched/deadline/prj.conf +++ b/tests/kernel/sched/deadline/prj.conf @@ -6,7 +6,7 @@ CONFIG_BT=n # Deadline is not compatible with MULTIQ, so we have to pick something # specific instead of using the board-level default. -CONFIG_SCHED_DUMB=y +CONFIG_SCHED_SIMPLE=y CONFIG_IRQ_OFFLOAD=y CONFIG_IRQ_OFFLOAD_NESTED=n diff --git a/tests/kernel/sched/schedule_api/prj_dumb.conf b/tests/kernel/sched/schedule_api/prj_simple.conf similarity index 87% rename from tests/kernel/sched/schedule_api/prj_dumb.conf rename to tests/kernel/sched/schedule_api/prj_simple.conf index 0b05486bffc9..9e3c6111604d 100644 --- a/tests/kernel/sched/schedule_api/prj_dumb.conf +++ b/tests/kernel/sched/schedule_api/prj_simple.conf @@ -1,7 +1,7 @@ CONFIG_ZTEST=y CONFIG_IRQ_OFFLOAD=y CONFIG_TEST_USERSPACE=y -CONFIG_SCHED_DUMB=y +CONFIG_SCHED_SIMPLE=y CONFIG_MAX_THREAD_BYTES=6 CONFIG_MP_MAX_NUM_CPUS=1 CONFIG_ZTEST_FATAL_HOOK=y diff --git a/tests/kernel/sched/schedule_api/testcase.yaml b/tests/kernel/sched/schedule_api/testcase.yaml index b5a7a2ae7c68..20542849f100 100644 --- a/tests/kernel/sched/schedule_api/testcase.yaml +++ b/tests/kernel/sched/schedule_api/testcase.yaml @@ -29,11 +29,11 @@ tests: extra_args: CONF_FILE=prj_multiq.conf extra_configs: - CONFIG_TIMESLICING=n - kernel.scheduler.dumb_timeslicing: - extra_args: CONF_FILE=prj_dumb.conf + kernel.scheduler.simple_timeslicing: + extra_args: CONF_FILE=prj_simple.conf extra_configs: - CONFIG_TIMESLICING=y - kernel.scheduler.dumb_no_timeslicing: - extra_args: CONF_FILE=prj_dumb.conf + kernel.scheduler.simple_no_timeslicing: + extra_args: CONF_FILE=prj_simple.conf extra_configs: - CONFIG_TIMESLICING=n diff --git a/tests/lib/p4workq/prj.conf b/tests/lib/p4workq/prj.conf index 3e0283ee4467..43f8cf322ded 100644 --- a/tests/lib/p4workq/prj.conf +++ b/tests/lib/p4workq/prj.conf @@ -4,4 +4,4 @@ CONFIG_SCHED_DEADLINE=y CONFIG_LOG_DEFAULT_LEVEL=1 # Test whiteboxes the wait_q and expects it to be a dlist CONFIG_WAITQ_SCALABLE=n -CONFIG_WAITQ_DUMB=y +CONFIG_WAITQ_SIMPLE=y diff --git a/tests/net/lib/http_server/tls/src/main.c b/tests/net/lib/http_server/tls/src/main.c index 1928e968b94c..87551817c71a 100644 --- a/tests/net/lib/http_server/tls/src/main.c +++ b/tests/net/lib/http_server/tls/src/main.c @@ -239,7 +239,7 @@ static void *setup(void) zassert_equal(ret, 0, "failed to add CA Certificate (%d)", ret); ret = tls_credential_add(SERVER_CERTIFICATE_TAG, - TLS_CREDENTIAL_SERVER_CERTIFICATE, + TLS_CREDENTIAL_PUBLIC_CERTIFICATE, server, sizeof(server)); zassert_equal(ret, 0, "failed to add Server Certificate (%d)", ret); @@ -249,7 +249,7 @@ static void *setup(void) zassert_equal(ret, 0, "failed to add Server Private Key (%d)", ret); ret = tls_credential_add(CLIENT_CERTIFICATE_TAG, - TLS_CREDENTIAL_SERVER_CERTIFICATE, + TLS_CREDENTIAL_PUBLIC_CERTIFICATE, client, sizeof(client)); zassert_equal(ret, 0, "failed to add Client Certificate (%d)", ret); diff --git a/tests/net/lib/lwm2m/lwm2m_engine/src/main.c b/tests/net/lib/lwm2m/lwm2m_engine/src/main.c index fc1f8dea2de7..98cf431c47d3 100644 --- a/tests/net/lib/lwm2m/lwm2m_engine/src/main.c +++ b/tests/net/lib/lwm2m/lwm2m_engine/src/main.c @@ -467,7 +467,7 @@ ZTEST(lwm2m_engine, test_security) zassert_equal(z_impl_zsock_setsockopt_fake.arg2_history[1], TLS_PEER_VERIFY); zassert_equal(z_impl_zsock_setsockopt_fake.arg2_history[2], TLS_CIPHERSUITE_LIST); zassert_true(tls_credential_add_fake.call_count == 3); - zassert_equal(tls_credential_add_fake.arg1_history[0], TLS_CREDENTIAL_SERVER_CERTIFICATE); + zassert_equal(tls_credential_add_fake.arg1_history[0], TLS_CREDENTIAL_PUBLIC_CERTIFICATE); zassert_equal(tls_credential_add_fake.arg1_history[1], TLS_CREDENTIAL_PRIVATE_KEY); zassert_equal(tls_credential_add_fake.arg1_history[2], TLS_CREDENTIAL_CA_CERTIFICATE); zassert_equal(lwm2m_engine_stop(&ctx), 0); diff --git a/tests/net/lib/tls_credentials/src/main.c b/tests/net/lib/tls_credentials/src/main.c index e45704d08ce6..d620aaa0909b 100644 --- a/tests/net/lib/tls_credentials/src/main.c +++ b/tests/net/lib/tls_credentials/src/main.c @@ -34,10 +34,10 @@ static void test_credential_add(void) /* Function should allow to add credentials of different types * with the same tag */ - ret = tls_credential_add(common_tag, TLS_CREDENTIAL_SERVER_CERTIFICATE, + ret = tls_credential_add(common_tag, TLS_CREDENTIAL_PUBLIC_CERTIFICATE, test_server_cert, sizeof(test_server_cert)); zassert_equal(ret, 0, "Failed to add credential %d %d", - common_tag, TLS_CREDENTIAL_SERVER_CERTIFICATE); + common_tag, TLS_CREDENTIAL_PUBLIC_CERTIFICATE); ret = tls_credential_add(common_tag, TLS_CREDENTIAL_PRIVATE_KEY, test_server_key, sizeof(test_server_key)); @@ -87,7 +87,7 @@ static void test_credential_get(void) /* Try to read with too small buffer */ credlen = sizeof(test_server_cert) - 1; - ret = tls_credential_get(common_tag, TLS_CREDENTIAL_SERVER_CERTIFICATE, + ret = tls_credential_get(common_tag, TLS_CREDENTIAL_PUBLIC_CERTIFICATE, cred, &credlen); zassert_equal(ret, -EFBIG, "Should have failed with EFBIG"); } @@ -121,7 +121,7 @@ static void test_credential_internal_iterate(void) cert = temp; } - zassert_equal(cert->type, TLS_CREDENTIAL_SERVER_CERTIFICATE, + zassert_equal(cert->type, TLS_CREDENTIAL_PUBLIC_CERTIFICATE, "Invalid type for cert"); zassert_equal(cert->tag, common_tag, "Invalid tag for cert"); zassert_equal(cert->len, sizeof(test_server_cert), diff --git a/tests/net/socket/tls_ext/src/main.c b/tests/net/socket/tls_ext/src/main.c index 41c8a985bd36..c85df170b4e8 100644 --- a/tests/net/socket/tls_ext/src/main.c +++ b/tests/net/socket/tls_ext/src/main.c @@ -447,7 +447,7 @@ static void *setup(void) zassert_equal(r, 0, "failed to add CA Certificate (%d)", r); r = tls_credential_add(SERVER_CERTIFICATE_TAG, - TLS_CREDENTIAL_SERVER_CERTIFICATE, + TLS_CREDENTIAL_PUBLIC_CERTIFICATE, server, sizeof(server)); zassert_equal(r, 0, "failed to add Server Certificate (%d)", r); @@ -457,7 +457,7 @@ static void *setup(void) zassert_equal(r, 0, "failed to add Server Private Key (%d)", r); r = tls_credential_add(CLIENT_CERTIFICATE_TAG, - TLS_CREDENTIAL_SERVER_CERTIFICATE, + TLS_CREDENTIAL_PUBLIC_CERTIFICATE, client, sizeof(client)); zassert_equal(r, 0, "failed to add Client Certificate (%d)", r); diff --git a/tests/net/wifi/configs/testcase.yaml b/tests/net/wifi/configs/testcase.yaml index a4f11c2b0491..e74f40ce4d53 100644 --- a/tests/net/wifi/configs/testcase.yaml +++ b/tests/net/wifi/configs/testcase.yaml @@ -56,3 +56,8 @@ tests: wifi.build.disable_advanced_feat: extra_configs: - CONFIG_WIFI_NM_WPA_SUPPLICANT_ADVANCED_FEATURES=y + wifi.build.enterprise_runtime: + extra_configs: + - CONFIG_WIFI_SHELL_RUNTIME_CERTIFICATES=y + extra_args: + - SNIPPET="wifi-enterprise"