xref: /kernel/linux/linux-6.6/tools/testing/selftests/tc-testing/action.c (revision 62306a36)
  • Home
  • History
  • Annotate Annotate
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
  • only in /kernel/linux/linux-6.6/tools/testing/selftests/tc-testing/
162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0
262306a36Sopenharmony_ci * Copyright (c) 2018 Davide Caratti, Red Hat inc.
362306a36Sopenharmony_ci *
462306a36Sopenharmony_ci * This program is free software; you can redistribute it and/or
562306a36Sopenharmony_ci * modify it under the terms of version 2 of the GNU General Public
662306a36Sopenharmony_ci * License as published by the Free Software Foundation.
762306a36Sopenharmony_ci */
862306a36Sopenharmony_ci
962306a36Sopenharmony_ci#include <linux/bpf.h>
1062306a36Sopenharmony_ci#include <linux/pkt_cls.h>
1162306a36Sopenharmony_ci
1262306a36Sopenharmony_ci__attribute__((section("action-ok"),used)) int action_ok(struct __sk_buff *s)
1362306a36Sopenharmony_ci{
1462306a36Sopenharmony_ci	return TC_ACT_OK;
1562306a36Sopenharmony_ci}
1662306a36Sopenharmony_ci
1762306a36Sopenharmony_ci__attribute__((section("action-ko"),used)) int action_ko(struct __sk_buff *s)
1862306a36Sopenharmony_ci{
1962306a36Sopenharmony_ci	s->data = 0x0;
2062306a36Sopenharmony_ci	return TC_ACT_OK;
2162306a36Sopenharmony_ci}
2262306a36Sopenharmony_ci
2362306a36Sopenharmony_cichar _license[] __attribute__((section("license"),used)) = "GPL";
24

Indexes created Thu Nov 07 10:32:03 CST 2024