Repository navigation
cherry-pick: this week's dev work (#460, #461, lwIP pool) and older dev PRs missing on main - #462
Merged
Merged
Conversation
fix(tutorials): keep the websocket chat handler receiving until the client closes (cherry picked from commit 857c3e4)
ci(queue): require Redis and NATS integration coverage (cherry picked from commit 8378b78)
bench(web-frameworks): pin CWIST_WORKERS=4 in the-benchmarker config (cherry picked from commit 268fa99)
… (#206) Partial pick: the sqlite canary in tests/wasip2_smoke.c, the second /hello probe in wasip2-smoke that catches a request-path stack overflow, and the stack note in docs/api/wasi.md. main already links wasip2 with WASIP2_STACK_BYTES and carries example/wasip2-kv. (cherry picked from commit 15ce8d3)
Partial pick: the "Browser runtime gate" section in docs/api/wasm-component.md and the tests/browser/node_modules ignore; the component-browser-test target and workflow step are already on main. (cherry picked from commit abb5987)
(cherry picked from commit 9493749)
Measured on hardware with held-open parallel sockets: 4 simultaneous connections are served, a 5th completes the TCP handshake but gets no HTTP response (adapter max_conns), and no slots leak after overload. Document the knobs to raise the cap (cfg.max_conns, MEMP_NUM_TCP_PCB, pbuf pools, heap). (cherry picked from commit b8f3532)
…watchdog Swept max_conns on hardware with held-open parallel sockets: - 4 (stock) through 32: clean even with tight SYN+GET bursts. - 64: 64/64 with paced connects; a tight 64-way burst strands some connections (their data frames never arrive) until the 30 s idle timeout. - 96, 128: fully served. - 192 (max_conns=192, MEMP_NUM_TCP_PCB=200): highest fully validated configuration, 192/192 simultaneous requests answered. - 256: ~196 answered, then resets - per-connection RX/TX buffers exhaust the newlib heap; this is a RAM ceiling, not a protocol one. Documented the full table, the paced-vs-burst behavior, the TIME_WAIT headroom needed between successive batches, and the knobs to go further. Also harden the rev-A RMII watchdog found flaky during this sweep: one toggle did not always recover the receiver, and the old >2-CRC-error gate could stay disarmed after a counter reset. Now retry up to 40 times, 500 ms apart, while the MAC reports CRC errors but no good unicast frame, and drop the periodic debug stats output from the example. (cherry picked from commit 7e79252)
Replace the per-connection heap buffers with one static pool allocated at listen time: max_conns slots of conn + rx_buffer_bytes + tx_buffer_bytes (both default 2048, new cwist_lwip_config fields). Accept/close only move slots between the free list and the active list, so there is no per-connection or per-response heap traffic after listen. Responses larger than the TX buffer now keep their response object alive and stream through the fixed buffer in chunks as the peer acknowledges (plaintext and TLS paths), instead of growing a per-connection buffer to the full response size. Requests that do not fit the pooled RX buffer are refused with 431/413. Verified: - host test_lwip_adapter and test_lwip_tls all pass (20 KB response, pipelining, framing errors, connection cap, TLS records); - baremetal smoke and size gate pass on all four firmware; - STM32F769I-DISCO: 256/256 and 288/288 simultaneous connections served (512 B rx / 256 B tx slots), up from ~196 before; 320 slots fail cleanly at boot when the pool does not fit the heap. Documented the pool model in docs/embedded/stm32.md (EN+KO) and the new measurements in example/stm32f769/README.md. (cherry picked from commit 1906963)
The empty-compare test picked from #66 now calls it; dev's list no longer carries the entry either.
main's WASM_SRCS still carries src/core/mem/gc.c, which dev moved to WASIP2_EXTRA_SRCS only. BAREMETAL_SRCS takes both lists, so gc.c appeared twice: harmless for the archive, but the single-file bundle from #460's baremetal-dist defined everything in gc.c twice and the Cortex-M7 CI job failed in baremetal-dist-check.
Contributor
|
This PR targets A maintainer needs to recreate this PR's commits against |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Brings to main everything merged into dev that main still lacks. This covers dev's last week and an audit of every PR ever merged into dev from other branches. Commits are in dev order and use
git cherry-pick -x, or a partial pick that names its source commit.This week on dev
0222a586afeat(port): complete the bare-metal STM32 epic (#447) #460 feat(port): complete the bare-metal STM32 epic (epic: bare-metal STM32 (Cortex-M) port via the dispatch_memory core + lwIP #447)9361cea43example(port): STM32F769I-DISCO wire inspector on real Ethernet (#447) #461 example(port): STM32F769I-DISCO wire inspector on real Ethernet (epic: bare-metal STM32 (Cortex-M) port via the dispatch_memory core + lwIP #447)b8f3532d9docs(example): document measured STM32F769I-DISCO connection limits7e792528aexample(stm32f769): measure the real connection ceiling, harden RMII watchdog190696300feat(lwip): static connection pool and streamed responsesThe last three were committed to dev directly, not through a PR. The rest of dev's week (#452–#457) is already on main through #454 and #458. #459 is already present by content.
Older dev PRs that never reached main: whole picks
docs/durable-queue-gate.md. The workflow was already on main; the doc was not.example/json-builder,sstring,html,simple-server,httpCWIST_WORKERS=4in the-benchmarker configOlder dev PRs: partial picks. Only the part that is missing on main and still present on dev is taken. The rest of each PR is already on main in its own form, and each commit message says which part was taken.
seq_auth.calready cleansessession_idthroughSEQ_AUTH_CLEANSE.INT_MAXsubstr tests. Thesstring.cfixes are already on main.tests/wasip2_smoke.c, the second/helloprobe inwasip2-smoke(it catches a request-path stack overflow), and the stack note indocs/api/wasi.md.WASIP2_STACK_BYTESandexample/wasip2-kvare already on main.make tutorials-check. The target and the ASan step are already on main.docs/api/wasm-component.mdand thetests/browser/node_modules/ignore.docs/api/wasm-component.md.test_gc_job_handoffignore entry. The code fixes in fix: restore main-only v3.9 fixes that never reached dev #350 came from main in the first place.Follow-up commits:
scripts/ci/api-untested-baseline.txtdropscwist_sstring_compare_sstring, which fix(sstring): prevent overflow in substr and normalize empty string compare #66's test now calls. dev's list does not carry it either.Makefile:BAREMETAL_SRCSlistssrc/core/mem/gc.conce. On main it sits in bothWASM_SRCSandWASIP2_EXTRA_SRCS, while dev has it only in the latter. The single-file bundle from feat(port): complete the bare-metal STM32 epic (#447) #460'sbaremetal-disttherefore definedgc.ctwice, which failedbaremetal-dist-checkon the first CI run.How missing changes were found
gh pr list --base dev --state merged).Not picked, with reasons
bindings/rust/cwist/tests/server.rs. The two branches deliberately differ here. dev's commit "test(rust): adjust deferred response server tests to conform to main contract" (a429d4ba2) and main's later history keep main's variant.http3.c/http3_client.cparts of docs(src): add missing Doxygen function comments #312 and fix(http): check sstring and header-add results on the right error channel #251: HTTP/3 close-error and WebTransport client API, plus their baseline entries. main deliberately ships server-only WebTransport on its own lsquic pin (2b30189, nolsquic_wt.h), as recorded in cherry-pick: embedded build work (#428, #435-#440, #442-#444) to main #445.docs/ko/*pages from feat(port): complete the bare-metal STM32 epic (#447) #460, example(port): STM32F769I-DISCO wire inspector on real Ethernet (#447) #461 and190696300(Korean translations): main carries onlydocs/ko/runtime-config.mdanddocs/ko/versioning.md, as in cherry-pick: embedded build work (#428, #435-#440, #442-#444) to main #445.src/net/redis/cwist_redis.cpart of docs(src): add missing Doxygen function comments #312: Doxygen comments only. The surrounding functions are laid out differently on main.scripts/ci/malloc-baseline.txthunks in fix(orm): prevent null dereference on dialect and reject empty update payloads #75, fix(db_crypt): short-circuit EVP cipher operations and cleanse stack keys #76, fix(graphql): validate selection set presence and unterminated string arguments #78, fix(ci): fix -Warray-compare in test_middleware_jwt and sync malloc-baseline line numbers #81, fix(http_client): cap response body at CWIST_HTTP_MAX_BODY_SIZE to prevent OOM #141, http_client: cap response header count at 200 to prevent OOM DoS #147, perf(http): one C1M reactor loop per CPU the worker actually owns #154: stale line-number references.Conflict resolution
docs/api/v4.0-api-baseline.txt. Regenerated withmake api-baselinefrom main's headers. It adds onlycwist_http_response_header_add, the same entry feat(port): complete the bare-metal STM32 epic (#447) #460 added on dev.190696300:docs/ko/*. Kept off main, per the rule above.Submodule gitlinks are unchanged. main keeps its own lsquic pin (
2b30189).How it was verified
On the picked tree, with main's submodule pins:
check_test_wiring,check_api_baseline(incl. the v4 guarantee),check_env_knobs,check_api_test_coverage,check_inline_exports,malloc_lint.sh,scripts/ciunit tests: OKscripts/ci/cppcheck.shwith cppcheck 2.13: no findingsmake -j16 allandmake -k test: all targets pass, exit 0 (lsquic built fresh at2b30189).make baremetal-dist-checkandmake baremetal-size-gate: the bundles build and cross-compile; hello, hello-rtc, hello-lwip and hello-tls PASS under qemu-arm, all within budget.make wasip2-smoke: PASS, including the second/helloprobe picked from fix(wasip2): link stack size + edge-KV persistence example (issue #201) #206.