Lines Matching refs:chain

264 static int nft_flow_offload_cmd(const struct nft_chain *chain,
273 if (!nft_is_base_chain(chain))
276 basechain = nft_base_chain(chain);
284 static int nft_flow_offload_rule(const struct nft_chain *chain,
291 return nft_flow_offload_cmd(chain, rule, flow, command, &cls_flow);
294 int nft_flow_rule_stats(const struct nft_chain *chain,
301 err = nft_flow_offload_cmd(chain, rule, NULL, FLOW_CLS_STATS,
327 struct nft_chain *chain;
330 chain = &basechain->chain;
331 list_for_each_entry(rule, &chain->rules, list) {
383 static int nft_block_offload_cmd(struct nft_base_chain *chain,
391 nft_flow_block_offload_init(&bo, dev_net(dev), cmd, chain, &extack);
397 return nft_block_setup(chain, &bo, cmd);
490 static int nft_flow_offload_chain(struct nft_chain *chain, u8 *ppolicy,
496 if (!nft_is_base_chain(chain))
499 basechain = nft_base_chain(chain);
521 if (!(trans->ctx.chain->flags & NFT_CHAIN_HW_OFFLOAD) ||
525 err = nft_flow_offload_chain(trans->ctx.chain, NULL,
529 if (!(trans->ctx.chain->flags & NFT_CHAIN_HW_OFFLOAD))
532 err = nft_flow_offload_chain(trans->ctx.chain, NULL,
536 if (!(trans->ctx.chain->flags & NFT_CHAIN_HW_OFFLOAD))
539 err = nft_flow_offload_rule(trans->ctx.chain,
544 if (!(trans->ctx.chain->flags & NFT_CHAIN_HW_OFFLOAD))
547 err = nft_flow_offload_rule(trans->ctx.chain,
572 if (!(trans->ctx.chain->flags & NFT_CHAIN_HW_OFFLOAD) ||
577 err = nft_flow_offload_chain(trans->ctx.chain, &policy,
581 if (!(trans->ctx.chain->flags & NFT_CHAIN_HW_OFFLOAD))
585 err = nft_flow_offload_chain(trans->ctx.chain, &policy,
589 if (!(trans->ctx.chain->flags & NFT_CHAIN_HW_OFFLOAD))
597 err = nft_flow_offload_rule(trans->ctx.chain,
603 if (!(trans->ctx.chain->flags & NFT_CHAIN_HW_OFFLOAD))
606 err = nft_flow_offload_rule(trans->ctx.chain,
627 struct nft_chain *chain;
633 list_for_each_entry(chain, &table->chains, list) {
634 if (!nft_is_base_chain(chain) ||
635 !(chain->flags & NFT_CHAIN_HW_OFFLOAD))
639 basechain = nft_base_chain(chain);
650 return chain;
663 struct nft_chain *chain;
670 chain = __nft_offload_get_chain(nft_net, dev);
671 if (chain)
672 nft_flow_block_chain(nft_base_chain(chain), dev,