On Fri 23 Aug 2019 at 01:15, Jakub Kicinski <jakub.kicin...@netronome.com> wrote: > On Thu, 22 Aug 2019 15:43:44 +0300, Vlad Buslov wrote: >> @@ -2987,19 +3007,26 @@ int tc_setup_cb_call(struct tcf_block *block, enum >> tc_setup_type type, >> int ok_count = 0; >> int err; >> >> + down_read(&block->cb_lock); >> /* Make sure all netdevs sharing this block are offload-capable. */ >> - if (block->nooffloaddevcnt && err_stop) >> - return -EOPNOTSUPP; >> + if (block->nooffloaddevcnt && err_stop) { >> + ok_count = -EOPNOTSUPP; >> + goto errout; >> + } >> >> list_for_each_entry(block_cb, &block->flow_block.cb_list, list) { >> err = block_cb->cb(type, type_data, block_cb->cb_priv); >> if (err) { >> - if (err_stop) >> - return err; >> + if (err_stop) { >> + ok_count = err; >> + goto errout; >> + } >> } else { >> ok_count++; >> } >> } >> +errout: > > Please name the labels with the first action they perform. Here: > > err_unlock:
Thanks for reviewing. Will fix in V2. > >> + up_read(&block->cb_lock); >> return ok_count;