Displaying 2 results from an estimated 2 matches for "load_half".
Did you mean:
load_all
2018 Sep 25
2
bpf compilation using clang
...(((const __u32 *)rss_key)[j + 1])
>> (32 - i));
}
}
}
return hash;
}
static int __attribute__((always_inline))
rss_l3_l4(struct __sk_buff *skb)
{
__u64 proto = load_half(skb, 12);
__u64 nhoff = ETH_HLEN;
__u32 key_idx = 0xdeadbeef;
__u32 hash = 0;
struct virtio_net_hdr_rss * rss_conf;
struct rss_key *rsskey;
int j = 0;
__u8 *key = 0;
__u32 len = 0;
__u32 queue = 0;
__u32 q = 0;...
2018 Sep 13
4
bpf compilation using clang
Hi all,
I am trying to insert instructions into the bpf using the bpf syscall,
the instructions were generated using the following command line:
clang -I ~/Builds/bpf_rss/iproute2/include -Wall -target bpf -O2
-emit-llvm -c upstream/qemu/hw/net/rss_tap_bpf_program.c -o - | llc
-march=bpf -filetype=obj -o tap_bpf_program.o
and then were translated to bpf instructions using the BPFCparser tool