1 /* SPDX-License-Identifier: GPL-2.0 */
3 #include <sys/socket.h>
4 #include <bpf/bpf_helpers.h>
6 int get_set_sk_priority(void *ctx
)
10 /* Verify that context allows calling bpf_getsockopt and
11 * bpf_setsockopt by reading and writing back socket
15 if (bpf_getsockopt(ctx
, SOL_SOCKET
, SO_PRIORITY
, &prio
, sizeof(prio
)))
17 if (bpf_setsockopt(ctx
, SOL_SOCKET
, SO_PRIORITY
, &prio
, sizeof(prio
)))