summaryrefslogtreecommitdiff
path: root/proto/perf/perf.c
diff options
context:
space:
mode:
authorMaria Matejka <mq@ucw.cz>2022-09-27 12:46:22 +0200
committerMaria Matejka <mq@ucw.cz>2022-09-27 12:46:22 +0200
commit9be7aa9b450f22cec9c97143d0cb7650f4fd7cc9 (patch)
treee0e05c016695293d404e4ca99f2505094de66955 /proto/perf/perf.c
parent32a67c93ebf29309286dca5195f026eeda3f78a2 (diff)
parent4364ee9b6f3764c971ab111bf7dc87477fd7272c (diff)
Merge commit '4364ee' into tmp-bad-learn
Diffstat (limited to 'proto/perf/perf.c')
-rw-r--r--proto/perf/perf.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/proto/perf/perf.c b/proto/perf/perf.c
index 8a883dd7..67ad2ada 100644
--- a/proto/perf/perf.c
+++ b/proto/perf/perf.c
@@ -85,7 +85,7 @@ random_net_ip4(void)
}
struct perf_random_routes {
- struct rta *a;
+ ea_list *a;
net_addr net;
};
@@ -142,10 +142,10 @@ perf_loop(void *data)
*((net_addr_ip4 *) &(p->data[i].net)) = random_net_ip4();
if (!p->attrs_per_rte || !(i % p->attrs_per_rte)) {
- struct rta a0 = {};
+ ea_list *ea = NULL;
- ea_set_attr_u32(&a0.eattrs, &ea_gen_preference, 0, p->p.main_channel->preference);
- ea_set_attr_u32(&a0.eattrs, &ea_gen_source, 0, RTS_PERF);
+ ea_set_attr_u32(&ea, &ea_gen_preference, 0, p->p.main_channel->preference);
+ ea_set_attr_u32(&ea, &ea_gen_source, 0, RTS_PERF);
struct nexthop_adata nhad = {
.nh.iface = p->ifa->iface,
@@ -153,10 +153,10 @@ perf_loop(void *data)
.nh.weight = 1,
};
- ea_set_attr_data(&a0.eattrs, &ea_gen_nexthop, 0,
+ ea_set_attr_data(&ea, &ea_gen_nexthop, 0,
&nhad.ad.data, sizeof nhad - sizeof nhad.ad);
- p->data[i].a = rta_lookup(&a0);
+ p->data[i].a = rta_lookup(ea);
}
else
p->data[i].a = rta_clone(p->data[i-1].a);