2015-12-04 14:47:52 +00:00
|
|
|
/**
|
2016-09-11 20:20:15 +00:00
|
|
|
* Author......: See docs/credits.txt
|
2015-12-04 14:47:52 +00:00
|
|
|
* License.....: MIT
|
|
|
|
*/
|
|
|
|
|
2019-03-22 14:16:25 +00:00
|
|
|
#ifdef KERNEL_STATIC
|
2022-02-07 08:57:08 +00:00
|
|
|
#include M2S(INCLUDE_PATH/inc_vendor.h)
|
|
|
|
#include M2S(INCLUDE_PATH/inc_types.h)
|
|
|
|
#include M2S(INCLUDE_PATH/inc_platform.cl)
|
|
|
|
#include M2S(INCLUDE_PATH/inc_common.cl)
|
|
|
|
#include M2S(INCLUDE_PATH/inc_rp.h)
|
|
|
|
#include M2S(INCLUDE_PATH/inc_rp.cl)
|
|
|
|
#include M2S(INCLUDE_PATH/inc_amp.h)
|
2019-03-22 14:16:25 +00:00
|
|
|
#endif
|
2015-12-04 14:47:52 +00:00
|
|
|
|
2022-02-04 18:54:00 +00:00
|
|
|
KERNEL_FQ void amp (KERN_ATTR_AMP)
|
2015-12-04 14:47:52 +00:00
|
|
|
{
|
2017-08-19 14:39:22 +00:00
|
|
|
const u64 gid = get_global_id (0);
|
2015-12-04 14:47:52 +00:00
|
|
|
|
|
|
|
if (gid >= gid_max) return;
|
|
|
|
|
2017-06-17 15:57:30 +00:00
|
|
|
if (rules_buf[0].cmds[0] == RULE_OP_MANGLE_NOOP && rules_buf[0].cmds[1] == 0) return;
|
2016-09-14 15:40:39 +00:00
|
|
|
|
2018-02-05 16:18:58 +00:00
|
|
|
pw_t pw = pws_amp[gid];
|
2017-08-11 14:21:19 +00:00
|
|
|
|
2017-08-12 11:28:31 +00:00
|
|
|
pw.pw_len = apply_rules (rules_buf[0].cmds, pw.i, pw.pw_len);
|
2016-09-14 15:40:39 +00:00
|
|
|
|
2018-02-05 16:18:58 +00:00
|
|
|
pws[gid] = pw;
|
2015-12-04 14:47:52 +00:00
|
|
|
}
|