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
F172335922: D59453.id185942.diff
Thu, Sep 17, 7:47 PM
F172315213: D59453.id185952.diff
Thu, Sep 17, 4:35 PM
Unknown Object (File)
Wed, Sep 16, 12:43 AM
Unknown Object (File)
Tue, Sep 15, 11:02 AM
Unknown Object (File)
Tue, Sep 15, 5:46 AM
Unknown Object (File)
Mon, Sep 14, 7:19 PM
Unknown Object (File)
Mon, Sep 14, 2:43 AM
Unknown Object (File)
Sun, Sep 13, 5:37 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