throughput_reader sizeof fix, buld_rust.sh fix

This commit is contained in:
janrovner
2023-10-10 07:54:45 +02:00
parent 5e2be51115
commit cdcb4cbfc9
2 changed files with 5 additions and 1 deletions

View File

@@ -60,6 +60,10 @@ for prog in $PROGS
do
pushd $prog > /dev/null
cargo build $BUILD_FLAGS
if [ $? -ne 0 ]; then
echo "Cargo build failed. Exiting with code 1."
exit 1
fi
popd > /dev/null
done

View File

@@ -359,7 +359,7 @@ int throughput_reader(struct bpf_iter__bpf_map_elem *ctx)
bpf_seq_write(seq, ip, sizeof(struct in6_addr));
for (__u32 i=0; i<NUM_CPUS; i++) {
struct host_counter * content = counter+(i*48);
struct host_counter * content = counter+(i*sizeof(struct host_counter));
bpf_seq_write(seq, content, sizeof(struct host_counter));
}