summaryrefslogtreecommitdiff
path: root/proto/perf
diff options
context:
space:
mode:
Diffstat (limited to 'proto/perf')
-rw-r--r--proto/perf/Makefile1
-rw-r--r--proto/perf/perf.c10
2 files changed, 9 insertions, 2 deletions
diff --git a/proto/perf/Makefile b/proto/perf/Makefile
index 7877fb19..42051f43 100644
--- a/proto/perf/Makefile
+++ b/proto/perf/Makefile
@@ -2,5 +2,6 @@ src := perf.c
obj := $(src-o-files)
$(all-daemon)
$(cf-local)
+$(call proto-build,perf_build)
tests_objs := $(tests_objs) $(src-o-files)
diff --git a/proto/perf/perf.c b/proto/perf/perf.c
index ba401a8a..5d228045 100644
--- a/proto/perf/perf.c
+++ b/proto/perf/perf.c
@@ -143,10 +143,10 @@ perf_loop(void *data)
if (!p->attrs_per_rte || !(i % p->attrs_per_rte)) {
struct rta a0 = {
- .src = p->p.main_source,
.source = RTS_PERF,
.scope = SCOPE_UNIVERSE,
.dest = RTD_UNICAST,
+ .pref = p->p.main_channel->preference,
.nh.iface = p->ifa->iface,
.nh.gw = gw,
.nh.weight = 1,
@@ -161,7 +161,7 @@ perf_loop(void *data)
clock_gettime(CLOCK_MONOTONIC, &ts_generated);
for (uint i=0; i<N; i++) {
- rte *e = rte_get_temp(p->data[i].a);
+ rte *e = rte_get_temp(p->data[i].a, p->p.main_source);
e->pflags = 0;
rte_update(P, &(p->data[i].net), e);
@@ -315,3 +315,9 @@ struct protocol proto_perf = {
.reconfigure = perf_reconfigure,
.copy_config = perf_copy_config,
};
+
+void
+perf_build(void)
+{
+ proto_build(&proto_perf);
+}