Displaying 2 results from an estimated 2 matches for "virtio_net_hdr_rss".
2018 Sep 25
2
bpf compilation using clang
..._OFFSET, to distinguish
* packets that have gone through this rule (skb->cb[1] != 0) from others.
*/
#define PIN_GLOBAL_NS 2
#define KEY_IDX 0
#define BPF_MAP_ID_KEY 1
struct vlan_hdr {
__be16 h_vlan_TCI;
__be16 h_vlan_encapsulated_proto;
};
struct virtio_net_hdr_rss {
__u32 rss_hash_function;
__u32 hash_function_flags;
uint8_t rss_hash_key[40];
__u32 rss_indirection_table_length;
uint8_t rss_indirection_table[128];
};
struct bpf_elf_map __attribute__((section("maps"), used))
map_rss = {
.type = BPF_MAP_TYP...
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