]> Git Repo - linux.git/blob - drivers/hid/bpf/entrypoints/entrypoints.bpf.c
net: bgmac: Fix return value check for fixed_phy_register()
[linux.git] / drivers / hid / bpf / entrypoints / entrypoints.bpf.c
1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (c) 2022 Benjamin Tissoires */
3
4 #include ".output/vmlinux.h"
5 #include <bpf/bpf_helpers.h>
6 #include <bpf/bpf_tracing.h>
7
8 #define HID_BPF_MAX_PROGS 1024
9
10 struct {
11         __uint(type, BPF_MAP_TYPE_PROG_ARRAY);
12         __uint(max_entries, HID_BPF_MAX_PROGS);
13         __uint(key_size, sizeof(__u32));
14         __uint(value_size, sizeof(__u32));
15 } hid_jmp_table SEC(".maps");
16
17 SEC("fmod_ret/__hid_bpf_tail_call")
18 int BPF_PROG(hid_tail_call, struct hid_bpf_ctx *hctx)
19 {
20         bpf_tail_call(ctx, &hid_jmp_table, hctx->index);
21
22         return 0;
23 }
24
25 char LICENSE[] SEC("license") = "GPL";
This page took 0.033788 seconds and 4 git commands to generate.