提交 644e334e 编写于 作者: P Pablo Neira Ayuso

netfilter: nf_tables: performance set policy skips size description in selection

Use the complexity and space notations if policy is performance, this
results in placing the bitmap set representation over the hashtable for
key <= 16 for better performance as we discussed during the last NFWS in
Faro, Portugal.
Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
上级 0984d427
...@@ -2549,14 +2549,9 @@ nft_select_set_ops(const struct nft_ctx *ctx, ...@@ -2549,14 +2549,9 @@ nft_select_set_ops(const struct nft_ctx *ctx,
case NFT_SET_POL_PERFORMANCE: case NFT_SET_POL_PERFORMANCE:
if (est.lookup < best.lookup) if (est.lookup < best.lookup)
break; break;
if (est.lookup == best.lookup) { if (est.lookup == best.lookup &&
if (!desc->size) { est.space < best.space)
if (est.space < best.space) break;
break;
} else if (est.size < best.size) {
break;
}
}
continue; continue;
case NFT_SET_POL_MEMORY: case NFT_SET_POL_MEMORY:
if (!desc->size) { if (!desc->size) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册