sana2: one home for the device-name helpers (resident -152 B) - #111
Merged
Merged
Conversation
#109 added ami_sana2_default_tcp_ack_max in sana2_policy.c with its own lower-case compare and basename walk, next to the identical static ami_str_iequal/ami_sana2_basename and WiFiPi name test in sana2_device.c. Both now live once in sana2_policy.c (pure, still host-linkable) and both WiFiPi defaults (128 posted reads, 11680 ACK ceiling) share one test. bsdsocket.library (preset default): 365,468 -> 365,316 bytes, text 338,636 -> 338,488; pre-#109 main was 364,956. The 366,000 budget stays. Host tests sana2_device and config_routes pass. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
Follow-up to #109, per the resident-size-first rule.
#109 added
ami_sana2_default_tcp_ack_maxinsana2_policy.cwith its own case-folding compare and basename walk, duplicating the staticami_str_iequal/ami_sana2_basenameand the WiFiPi name test already insana2_device.c. They now live once insana2_policy.c(still pure and host-linkable), and both WiFiPi defaults (128 posted reads, 11,680 ACK ceiling) share one name test. No behaviour change.--preset defaultSo #109's resident cost goes from +496 to +348 bytes of text. The remaining 348 bytes are the feature itself (TCPACKMAX parsing, config advice, the per-interface branch). The 366,000 budget stays; its comment and the Unreleased changelog size are updated in the same commit.
Host tests
sana2_deviceandconfig_routespass locally.🤖 Generated with Claude Code