Repository navigation
feat(kconfig): move build-time tunables into per-component Kconfig fragments #540
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
hhvrc
wants to merge
6
commits into
develop
Choose a base branch
from
feat/kconfig-tunables
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
bcc8088
feat(kconfig): move build-time tunables into per-component Kconfig fr…
hhvrc ef05c47
fix(kconfig): address review findings on the tunables
hhvrc 0e7351e
Merge branch 'develop' into feat/kconfig-tunables
hhvrc b835639
fix(serial): enforce the line length limit even when buffer capacity …
coderabbitai[bot] 6c2d628
feat(kconfig): make the portal AP address and venue info URL configur…
hhvrc d6d0a17
style(common): clang-format the IPv4Utils host test
hhvrc File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| --- | ||
| kind: changed | ||
| --- | ||
| Move build-time settings into Kconfig | ||
|
|
||
| ## Release Note | ||
| Build-time settings can now be changed in menuconfig | ||
|
|
||
| - Task stacks and priorities, timeouts, retry intervals, queue and buffer sizes are now set in `menuconfig` under OpenShock, each next to the component that uses it | ||
| - The default API and firmware CDN domains, hostname, SoftAP SSID prefix, captive portal IP address and venue info URL are set there too | ||
| - The log level can be overridden in `menuconfig`; by default it still follows the build mode | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,82 @@ | ||
| # Sourced into the OpenShock menu by main/Kconfig.projbuild | ||
|
|
||
| menu "Captive portal" | ||
|
|
||
| config OPENSHOCK_PORTAL_AP_IP | ||
| string "SoftAP IPv4 address" | ||
| default "4.3.2.1" | ||
| help | ||
| The fixed address the portal's SoftAP, DHCP server, DNS responder and captive | ||
| portal API serve from, on a /24 network. Must be a dotted-decimal IPv4 address | ||
| (checked at compile time). | ||
|
|
||
| config OPENSHOCK_PORTAL_MAX_CLIENTS | ||
| int "Clients (SoftAP stations and websockets)" | ||
| range 1 8 | ||
| default 4 | ||
| help | ||
| The SoftAP's station limit and the number of websocket clients the portal | ||
| serves. Must stay below the HTTP server's socket count. | ||
|
|
||
| config OPENSHOCK_PORTAL_HTTPD_MAX_SOCKETS | ||
| int "HTTP server sockets" | ||
| range 2 10 | ||
| default 8 | ||
| help | ||
| Browsers open several connections per page load; with only 4 the LRU purge | ||
| evicted the websocket (server push, so it looks idle). Also sizes the broadcast | ||
| fd list. httpd needs 3 lwIP sockets besides these, and the DNS server, the | ||
| gateway connection and an outbound HTTP request need one each (checked against | ||
| LWIP_MAX_SOCKETS). | ||
|
|
||
| config OPENSHOCK_PORTAL_HTTPD_STACK_SIZE | ||
| int "HTTP server task stack (bytes)" | ||
| range 4096 32768 | ||
| default 8192 | ||
|
|
||
| config OPENSHOCK_PORTAL_HTTPD_TIMEOUT_S | ||
| int "HTTP socket send/receive timeout (s)" | ||
| range 1 60 | ||
| default 5 | ||
|
|
||
| config OPENSHOCK_PORTAL_MAX_MESSAGE_SIZE | ||
| int "Largest local websocket message (bytes)" | ||
| range 1024 32768 | ||
| default 4096 | ||
|
|
||
| config OPENSHOCK_PORTAL_WS_MAX_QUEUED_SENDS | ||
| int "Queued websocket sends" | ||
| range 4 256 | ||
| default 32 | ||
| help | ||
| Outgoing websocket messages waiting for httpd. Bounds the memory a burst of | ||
| broadcasts can hold while no client drains them; past it, new ones are dropped. | ||
|
|
||
| config OPENSHOCK_PORTAL_STARTUP_GRACE_S | ||
| int "Startup grace period (s)" | ||
| range 0 600 | ||
| default 30 | ||
| help | ||
| On a fully configured hub, how long after boot the portal waits for the gateway | ||
| connection before it opens. It stays closed if the hub connects in time. | ||
|
|
||
| config OPENSHOCK_PORTAL_AUTO_CLOSE_S | ||
| int "Auto-close delay (s)" | ||
| range 10 3600 | ||
| default 300 | ||
| help | ||
| Once the hub is online and no client is connected, the portal closes after this long. | ||
|
|
||
| config OPENSHOCK_PORTAL_MANAGER_TASK_STACK_SIZE | ||
| int "Portal manager task stack (bytes)" | ||
| range 4096 16384 | ||
| default 6144 | ||
|
|
||
| config OPENSHOCK_PORTAL_ACCOUNT_LINK_TASK_STACK_SIZE | ||
| int "Account link task stack (bytes)" | ||
| range 4096 16384 | ||
| default 8192 | ||
| help | ||
| Runs the HTTPS request that exchanges a link code for a token. | ||
|
|
||
| endmenu |
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.