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
F171333545: D59453.id185952.diff
Thu, Sep 10, 12:05 PM
F171317936: D59453.id185942.diff
Thu, Sep 10, 9:13 AM
F171313231: D59453.diff
Thu, Sep 10, 8:22 AM
F171308098: D59453.diff
Thu, Sep 10, 7:35 AM
F171241346: D59453.diff
Wed, Sep 9, 6:59 PM
F171231358: D59453.diff
Wed, Sep 9, 4:57 PM
F171226083: D59453.id185942.diff
Wed, Sep 9, 3:56 PM
F171223192: D59453.id185942.diff
Wed, Sep 9, 3:30 PM

Details

Reviewers
rscheff
tuexen
Group Reviewers
transport

Diff Detail

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

Event Timeline

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

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
2519

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
2519

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