Re: [PATCH nf-next v3 3/4] netfilter: nf_tables_offload: add nft_offload_netdev_iterate function

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Sep 05, 2019 at 12:00:18PM +0800, wenxu@xxxxxxxxx wrote:
[...]
> +static void nft_indr_block_cb(struct net_device *dev,
> +			      flow_indr_block_bind_cb_t *cb, void *cb_priv,
> +			      enum flow_block_command cmd)
> +{
> +	struct net *net = dev_net(dev);
> +	struct nft_chain *chain;
> +
> +	mutex_lock(&net->nft.commit_mutex);
> +	chain = nft_offload_netdev_iterate(dev);

Ah, right, not an interator. Probably __nft_offload_get_basechain(dev) ?

The initial __nft_... suggests the reader that the mutex is required.

> +	if (chain) {
> +		struct nft_base_chain *basechain;
> +
> +		basechain = nft_base_chain(chain);
> +		nft_indr_block_ing_cmd(dev, basechain, cb, cb_priv, cmd);
> +	}
>  	mutex_unlock(&net->nft.commit_mutex);
>  }
>  
> -- 
> 1.8.3.1
> 



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux