mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-27 21:55:10 +07:00
cf5eafbfa5
rely on uAPI headers in the current kernel tree, rather than requiring the correct version installed on the test system. While at it, group all sections in a single binary and test the 'section' parameter. Reported-by: Lucas Bates <lucasb@mojatatu.com> Signed-off-by: Davide Caratti <dcaratti@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
24 lines
622 B
C
24 lines
622 B
C
/* SPDX-License-Identifier: GPL-2.0
|
|
* Copyright (c) 2018 Davide Caratti, Red Hat inc.
|
|
*
|
|
* This program is free software; you can redistribute it and/or
|
|
* modify it under the terms of version 2 of the GNU General Public
|
|
* License as published by the Free Software Foundation.
|
|
*/
|
|
|
|
#include <linux/bpf.h>
|
|
#include <linux/pkt_cls.h>
|
|
|
|
__attribute__((section("action-ok"),used)) int action_ok(struct __sk_buff *s)
|
|
{
|
|
return TC_ACT_OK;
|
|
}
|
|
|
|
__attribute__((section("action-ko"),used)) int action_ko(struct __sk_buff *s)
|
|
{
|
|
s->data = 0x0;
|
|
return TC_ACT_OK;
|
|
}
|
|
|
|
char _license[] __attribute__((section("license"),used)) = "GPL";
|