mirror of
https://github.com/Qortal/Brooklyn.git
synced 2025-01-31 15:22:18 +00:00
a94b3d14aa
Changes included (and more): 1. Dynamic RAM merge 2. Real-time page scan and allocation 3. Cache compression 4. Real-time IRQ checks 5. Dynamic I/O allocation for Java heap 6. Java page migration 7. Contiguous memory allocation 8. Idle pages tracking 9. Per CPU RAM usage tracking 10. ARM NEON scalar multiplication library 11. NEON/ARMv8 crypto extensions 12. NEON SHA, Blake, RIPEMD crypto extensions 13. Parallel NEON crypto engine for multi-algo based CPU stress reduction
31 lines
687 B
C
31 lines
687 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
#include <test_progs.h>
|
|
#include <network_helpers.h>
|
|
|
|
void test_skb_helpers(void)
|
|
{
|
|
struct __sk_buff skb = {
|
|
.wire_len = 100,
|
|
.gso_segs = 8,
|
|
.gso_size = 10,
|
|
};
|
|
LIBBPF_OPTS(bpf_test_run_opts, topts,
|
|
.data_in = &pkt_v4,
|
|
.data_size_in = sizeof(pkt_v4),
|
|
.ctx_in = &skb,
|
|
.ctx_size_in = sizeof(skb),
|
|
.ctx_out = &skb,
|
|
.ctx_size_out = sizeof(skb),
|
|
);
|
|
struct bpf_object *obj;
|
|
int err, prog_fd;
|
|
|
|
err = bpf_prog_test_load("./test_skb_helpers.o",
|
|
BPF_PROG_TYPE_SCHED_CLS, &obj, &prog_fd);
|
|
if (!ASSERT_OK(err, "load"))
|
|
return;
|
|
err = bpf_prog_test_run_opts(prog_fd, &topts);
|
|
ASSERT_OK(err, "test_run");
|
|
bpf_object__close(obj);
|
|
}
|