+ /* If we've set up most of the flows we've seen, then we're wasting time
+ * handling most packets one at a time, so in this case instead set up most
+ * flows directly and use the remaining flows as a sample set to adjust our
+ * criteria later.
+ *
+ * The definition of "most" is conservative, but the sample size is tuned
+ * based on a few experiments with TCP_CRR mode in netperf. */
+ if (g->n_setups >= g->n_flows - g->n_flows / 16
+ && g->n_flows >= 64
+ && hash & 0x3f) {
+ g->n_shortcuts++;
+ return true;
+ }
+