mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
netfilter: nf_tables: add optimized data comparison for small values
Add an optimized version of nft_data_cmp() that only handles values of to 4 bytes length. This patch includes original Patrick McHardy's patch entitled (nf_tables: inline nft_cmp_fast_eval() into main evaluation loop). Signed-off-by: Patrick McHardy <[email protected]> Signed-off-by: Pablo Neira Ayuso <[email protected]>
This commit is contained in:
parent
ef1f7df917
commit
cb7dbfd039
3 changed files with 118 additions and 24 deletions
|
|
@ -7,6 +7,14 @@ extern void nf_tables_core_module_exit(void);
|
|||
extern int nft_immediate_module_init(void);
|
||||
extern void nft_immediate_module_exit(void);
|
||||
|
||||
struct nft_cmp_fast_expr {
|
||||
u32 data;
|
||||
enum nft_registers sreg:8;
|
||||
u8 len;
|
||||
};
|
||||
|
||||
extern const struct nft_expr_ops nft_cmp_fast_ops;
|
||||
|
||||
extern int nft_cmp_module_init(void);
|
||||
extern void nft_cmp_module_exit(void);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue