search for: __sk_buff

Displaying 3 results from an estimated 3 matches for "__sk_buff".

2023 Oct 15
0
[RFC PATCH v2 1/7] bpf: Introduce BPF_PROG_TYPE_VNET_HASH
...bpf_prog_type { > BPF_PROG_TYPE_SK_LOOKUP, > BPF_PROG_TYPE_SYSCALL, /* a program that can execute syscalls */ > BPF_PROG_TYPE_NETFILTER, > + BPF_PROG_TYPE_VNET_HASH, Sorry, we do not add new stable program types anymore. > @@ -6111,6 +6112,10 @@ struct __sk_buff { > __u8 tstamp_type; > __u32 :24; /* Padding, future use. */ > __u64 hwtstamp; > + > + __u32 vnet_hash_value; > + __u16 vnet_hash_report; > + __u16 vnet_rss_queue; > }; we also do not add anything to uapi __sk_buff....
2018 Sep 25
2
bpf compilation using clang
...(__u32)((uint64_t) (((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...
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