__u32 choose_local_fallback_tries;
/* choose attempts before giving up */
__u32 choose_total_tries;
- /* attempt chooseleaf inner descent once; on failure retry outer descent */
+ /* attempt chooseleaf inner descent once for firstn mode; on
+ * reject retry outer descent. Note that this does *not*
+ * apply to a collision: in that case we will retry as we used
+ * to. */
__u32 chooseleaf_descend_once;
};
const __u32 *weight, int weight_max,
int x, int numrep, int type,
int *out, int outpos,
+ unsigned int attempts,
+ unsigned int recurse_attempts,
int recurse_to_leaf,
int descend_once, int *out2)
{
weight, weight_max,
x, outpos+1, 0,
out2, outpos,
+ recurse_attempts, 0,
0,
map->chooseleaf_descend_once,
NULL) <= outpos)
flocal <= in->size + map->choose_local_fallback_tries)
/* exhaustive bucket search */
retry_bucket = 1;
- else if (ftotal <= map->choose_total_tries)
+ else if (ftotal <= attempts)
/* then retry descent */
retry_descent = 1;
else
__u32 step;
int i, j;
int numrep;
- int choose_leaf_tries = 1;
+ int choose_tries = map->choose_total_tries;
+ int choose_leaf_tries = 0;
const int descend_once = 0;
if ((__u32)ruleno >= map->max_rules) {
x, numrep,
curstep->arg2,
o+osize, j,
+ choose_tries,
+ choose_leaf_tries ? choose_leaf_tries : choose_tries,
recurse_to_leaf,
descend_once, c+osize);
} else {
x, numrep, numrep,
curstep->arg2,
o+osize, j,
- map->choose_total_tries,
- choose_leaf_tries,
+ choose_tries,
+ choose_leaf_tries ? choose_leaf_tries : 1,
recurse_to_leaf,
c+osize,
0);