Skip to content

net/arp: Give the unit of the ARP entry ages as 10 seconds. - #21322

Merged
acassis merged 1 commit into
apache:masterfrom
casaroli:arp-maxage-units
Nov 1, 2026
Merged

acassis merged 1 commit into
apache:masterfrom
casaroli:arp-maxage-units

Conversation

@casaroli

@casaroli casaroli commented Nov 1, 2026

Copy link
Copy Markdown
Contributor

Summary

net/arp/arp_table.c converts both ARP ages with SEC2TICK(10 * value), so their unit is 10 seconds:

#define ARP_MAXAGE_TICK SEC2TICK(10 * CONFIG_NET_ARP_MAXAGE)
#define ARP_MAXAGE_UNREACHABLE_TICK SEC2TICK(10 * CONFIG_NET_ARP_MAXAGE_UNREACHABLE)

The help texts of CONFIG_NET_ARP_MAXAGE and CONFIG_NET_ARP_MAXAGE_UNREACHABLE said deciseconds, and the comment in include/nuttx/net/netconfig.h said tenths of seconds: 100 times too small. The example in the same texts (120 is 20 minutes) already used 10 seconds.

This PR corrects the three texts. The code does not change.

Impact

Text only: the Kconfig help and a header comment. A user who set a value from the old help text gets an age 100 times longer than intended; this PR does not change that value.

Testing

lm3s6965-ek:qemu-flat (with CONFIG_NET_ARP) configures with no Kconfig warnings, and the two options keep their defaults (120 and 1). tools/checkpatch.sh -c -u -m -g passes.

The code converts CONFIG_NET_ARP_MAXAGE and
CONFIG_NET_ARP_MAXAGE_UNREACHABLE with SEC2TICK(10 * value): the unit
is 10 seconds.  The help texts said deciseconds, and the comment in
netconfig.h said tenths of seconds, 100 times too small.  The example
in the same texts (120 is 20 minutes) already used 10 seconds.

Correct the texts.  The code does not change.

Assisted-by: Claude Code:claude-opus-5-5
Signed-off-by: Marco Casaroli <marco.casaroli@gmail.com>
@github-actions github-actions Bot added Area: Networking Effects networking subsystem Size: XS The size of the change in this PR is very small labels Nov 1, 2026
@github-actions

github-actions Bot commented Nov 1, 2026

Copy link
Copy Markdown

MemBrowse Memory Report · Explore what changed →

No memory changes detected for:


Catch memory regressions in CI with MemBrowse. Free for open source.

@casaroli
casaroli marked this pull request as draft November 1, 2026 11:28
@casaroli
casaroli marked this pull request as ready for review November 1, 2026 11:28
@acassis
acassis merged commit 8fef4b9 into apache:master Nov 1, 2026
82 of 90 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: Networking Effects networking subsystem Size: XS The size of the change in this PR is very small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants