mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 05:34:13 +08: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
@ -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,9 +13,9 @@
|
||||
|
||||
#define nft_objref_priv(expr) *((struct nft_object **)nft_expr_priv(expr))
|
||||
|
||||
static void nft_objref_eval(const struct nft_expr *expr,
|
||||
struct nft_regs *regs,
|
||||
const struct nft_pktinfo *pkt)
|
||||
void nft_objref_eval(const struct nft_expr *expr,
|
||||
struct nft_regs *regs,
|
||||
const struct nft_pktinfo *pkt)
|
||||
{
|
||||
struct nft_object *obj = nft_objref_priv(expr);
|
||||
|
||||
@ -100,9 +100,9 @@ struct nft_objref_map {
|
||||
struct nft_set_binding binding;
|
||||
};
|
||||
|
||||
static void nft_objref_map_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)
|
||||
{
|
||||
struct nft_objref_map *priv = nft_expr_priv(expr);
|
||||
const struct nft_set *set = priv->set;
|
||||
|
Loading…
Reference in New Issue
Block a user