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)
Sat, Oct 3, 9:19 PM
Unknown Object (File)
Sat, Oct 3, 7:27 PM
Unknown Object (File)
Sat, Oct 3, 3:11 AM
Unknown Object (File)
Fri, Oct 2, 2:51 PM
Unknown Object (File)
Thu, Oct 1, 9:31 PM
Unknown Object (File)
Thu, Oct 1, 1:22 PM
Unknown Object (File)
Sun, Sep 27, 3:25 AM
Unknown Object (File)
Sat, Sep 26, 5:57 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