cachepc-linux

Fork of AMDESE/linux with modifications for CachePC side-channel attack
git clone https://git.sinitax.com/sinitax/cachepc-linux
Log | Files | Refs | README | LICENSE | sfeed.txt

test_xdp_with_cpumap_frags_helpers.c (501B)


      1// SPDX-License-Identifier: GPL-2.0
      2
      3#include <linux/bpf.h>
      4#include <bpf/bpf_helpers.h>
      5
      6#define IFINDEX_LO	1
      7
      8struct {
      9	__uint(type, BPF_MAP_TYPE_CPUMAP);
     10	__uint(key_size, sizeof(__u32));
     11	__uint(value_size, sizeof(struct bpf_cpumap_val));
     12	__uint(max_entries, 4);
     13} cpu_map SEC(".maps");
     14
     15SEC("xdp/cpumap")
     16int xdp_dummy_cm(struct xdp_md *ctx)
     17{
     18	return XDP_PASS;
     19}
     20
     21SEC("xdp.frags/cpumap")
     22int xdp_dummy_cm_frags(struct xdp_md *ctx)
     23{
     24	return XDP_PASS;
     25}
     26
     27char _license[] SEC("license") = "GPL";