On Thu, Jun 11, 2020 at 06:03:17PM +0800, we...@ucloud.cn wrote:
[...]
> diff --git a/net/core/flow_offload.c b/net/core/flow_offload.c
> index 0cfc35e..40eaf64 100644
> --- a/net/core/flow_offload.c
> +++ b/net/core/flow_offload.c
> @@ -372,14 +372,13 @@ int flow_indr_dev_register(flow_indr_block_bind_cb_t 
> *cb, void *cb_priv)
>  }
>  EXPORT_SYMBOL(flow_indr_dev_register);
>  
> -static void __flow_block_indr_cleanup(flow_setup_cb_t *setup_cb, void 
> *cb_priv,
> +static void __flow_block_indr_cleanup(void (*release)(void *cb_priv),
>                                     struct list_head *cleanup_list)
>  {
>       struct flow_block_cb *this, *next;
>  
>       list_for_each_entry_safe(this, next, &flow_block_indr_list, indr.list) {
> -             if (this->cb == setup_cb &&
> -                 this->cb_priv == cb_priv) {
> +             if (this->release == release) {

Are you sure this is correct?

This will remove _all_ existing representors in this driver.

This will not work if only one representor is gone?

Please, describe what scenario you are trying to fix.

Thank you.

Reply via email to