1 // SPDX-License-Identifier: GPL-2.0
2 // Copyright (c) 2019 Facebook
4 #include <bpf/bpf_helpers.h>
5 #define ATTR __attribute__((noinline))
6 #include "test_jhash.h"
9 int balancer_ingress(struct __sk_buff *ctx)
11 void *data_end = (void *)(long)ctx->data_end;
12 void *data = (void *)(long)ctx->data;
18 /* pragma unroll doesn't work on large loops */
22 if (ptr + nh_off > data_end) \
24 ctx->tc_index = jhash(ptr, nh_off, ctx->cb[0] + i++); \
26 #define C30 C;C;C;C;C;C;C;C;C;C;C;C;C;C;C;C;C;C;C;C;C;C;C;C;C;C;C;C;C;C;
27 C30;C30;C30; /* 90 calls */
30 char _license[] SEC("license") = "GPL";