Page MenuHomeFreeBSD

tcp: use sparse initializer for host cache metrics
AcceptedPublic

Authored by glebius on Sat, Sep 5, 5:45 PM.
Tags
None
Referenced Files
F170761024: D59453.diff
Sun, Sep 6, 11:37 AM
F170747928: D59453.id185952.diff
Sun, Sep 6, 9:41 AM
F170687277: D59453.id185942.diff
Sun, Sep 6, 12:58 AM
F170684480: D59453.id185952.diff
Sun, Sep 6, 12:38 AM
F170683055: D59453.diff
Sun, Sep 6, 12:28 AM
Unknown Object (File)
Sat, Sep 5, 6:08 PM
Unknown Object (File)
Sat, Sep 5, 5:56 PM

Details

Reviewers
rscheff
tuexen
Group Reviewers
transport

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 76583
Build 73466: arc lint + arc unit

Event Timeline

tuexen added inline comments.
sys/netinet/tcp_subr.c
2518

This is declaring a variable in the middle of the block. Why don't you perform this initialization at the beginning of the if block (where the declaration was) and only update hc_ssthresh here to ssthresh?

sys/netinet/tcp_subr.c
2518

This will make the compiler first write a zero to hc_ssthresh, then a new value. I can actually go without a variable at all, make entire declaration an argument to tcp_hc_update().

sys/netinet/tcp_subr.c
2518

Then I would prefer going without a variable...

  • No local variable at all.
This revision is now accepted and ready to land.Sat, Sep 5, 7:43 PM