WIP FPC-III support
[linux/fpc-iii.git] / tools / testing / selftests / tc-testing / action.c
blobc32b99b80e19e8b19192684475146805c607d6f9
1 /* SPDX-License-Identifier: GPL-2.0
2 * Copyright (c) 2018 Davide Caratti, Red Hat inc.
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of version 2 of the GNU General Public
6 * License as published by the Free Software Foundation.
7 */
9 #include <linux/bpf.h>
10 #include <linux/pkt_cls.h>
12 __attribute__((section("action-ok"),used)) int action_ok(struct __sk_buff *s)
14 return TC_ACT_OK;
17 __attribute__((section("action-ko"),used)) int action_ko(struct __sk_buff *s)
19 s->data = 0x0;
20 return TC_ACT_OK;
23 char _license[] __attribute__((section("license"),used)) = "GPL";