Page MenuHomeFreeBSD

tcp: use sparse initializer for host cache metrics
ClosedPublic

Authored by glebius on Sat, Sep 5, 5:45 PM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Sep 27, 3:25 AM
Unknown Object (File)
Sat, Sep 26, 5:57 AM
Unknown Object (File)
Fri, Sep 25, 9:14 AM
Unknown Object (File)
Fri, Sep 25, 9:10 AM
Unknown Object (File)
Thu, Sep 24, 4:25 AM
Unknown Object (File)
Sun, Sep 20, 10:24 AM
Unknown Object (File)
Sat, Sep 19, 2:20 PM
Unknown Object (File)
Sat, Sep 19, 7:00 AM

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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