Back to home page

OSCL-LXR

 
 

    


0001 // SPDX-License-Identifier: GPL-2.0-only
0002 
0003 #include <linux/bpf.h>
0004 #include <bpf/bpf_helpers.h>
0005 
0006 volatile const char bpf_metadata_a[] SEC(".rodata") = "bar";
0007 volatile const int bpf_metadata_b SEC(".rodata") = 2;
0008 
0009 SEC("cgroup_skb/egress")
0010 int prog(struct xdp_md *ctx)
0011 {
0012     return bpf_metadata_b ? 1 : 0;
0013 }
0014 
0015 char _license[] SEC("license") = "GPL";