mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-29 13:53:33 +00:00
netfilter: nf_tables: avoid retpoline overhead for objref calls
objref expression is builtin, so avoid calls to it for RETOLINE=y builds. Signed-off-by: Florian Westphal <fw@strlen.de>
This commit is contained in:
parent
d8d7606278
commit
2032e907d8
3 changed files with 12 additions and 6 deletions
|
@ -164,4 +164,8 @@ void nft_payload_inner_eval(const struct nft_expr *expr, struct nft_regs *regs,
|
|||
const struct nft_pktinfo *pkt,
|
||||
struct nft_inner_tun_ctx *ctx);
|
||||
|
||||
void nft_objref_eval(const struct nft_expr *expr, struct nft_regs *regs,
|
||||
const struct nft_pktinfo *pkt);
|
||||
void nft_objref_map_eval(const struct nft_expr *expr, struct nft_regs *regs,
|
||||
const struct nft_pktinfo *pkt);
|
||||
#endif /* _NET_NF_TABLES_CORE_H */
|
||||
|
|
|
@ -234,6 +234,8 @@ static void expr_call_ops_eval(const struct nft_expr *expr,
|
|||
X(e, nft_dynset_eval);
|
||||
X(e, nft_rt_get_eval);
|
||||
X(e, nft_bitwise_eval);
|
||||
X(e, nft_objref_eval);
|
||||
X(e, nft_objref_map_eval);
|
||||
#undef X
|
||||
indirect_call:
|
||||
#endif /* CONFIG_RETPOLINE */
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
|
||||
#define nft_objref_priv(expr) *((struct nft_object **)nft_expr_priv(expr))
|
||||
|
||||
static void nft_objref_eval(const struct nft_expr *expr,
|
||||
void nft_objref_eval(const struct nft_expr *expr,
|
||||
struct nft_regs *regs,
|
||||
const struct nft_pktinfo *pkt)
|
||||
{
|
||||
|
@ -100,7 +100,7 @@ struct nft_objref_map {
|
|||
struct nft_set_binding binding;
|
||||
};
|
||||
|
||||
static void nft_objref_map_eval(const struct nft_expr *expr,
|
||||
void nft_objref_map_eval(const struct nft_expr *expr,
|
||||
struct nft_regs *regs,
|
||||
const struct nft_pktinfo *pkt)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue