When comparing 32-bit signed integers we need either to use a 64-bit variable, or check the two cases that can happen. Else we risk incorrect sorting results.
Details
Details
- Reviewers
gallatin gnn - Group Reviewers
transport - Commits
- rS295506: Use a pair of ifs when comparing the 32-bit flowid integers so that
Diff Detail
Diff Detail
- Repository
- rS FreeBSD src repository - subversion
- Lint
Lint Skipped - Unit
Tests Skipped
Event Timeline
sys/netinet/tcp_lro.c | ||
---|---|---|
352 | This seems like an overly complicated way to say "return 1" and "return -1". Perhaps you could simplify it, and eliminate the gotos ? |
sys/netinet/tcp_lro.c | ||
---|---|---|
352 | It produces the least assembly code vs ret = 1 ... ret = -1. Another alternative is to mask away the 31st bit of the flowid. |
Comment Actions
We are programming in C and not assembler. Please make the requested change to a typically C idiom.