diff options
author | Leon Romanovsky <leonro@nvidia.com> | 2021-09-14 15:58:28 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2021-09-15 16:12:55 +0100 |
commit | e9310aed8e6a5003abb2aa6b9229d2fb9ceb9e85 (patch) | |
tree | 080c567524fefabb1e3b2754d2fedf82ca0c5ec9 /net/core/devlink.c | |
parent | dc50b930be89b82acc21bdefd24df863e47d5cf1 (diff) | |
download | linux-e9310aed8e6a5003abb2aa6b9229d2fb9ceb9e85.tar.gz linux-e9310aed8e6a5003abb2aa6b9229d2fb9ceb9e85.tar.bz2 linux-e9310aed8e6a5003abb2aa6b9229d2fb9ceb9e85.zip |
net/mlx5: Publish and unpublish all devlink parameters at once
The devlink parameters were published in two steps despite being static
and known in advance.
First step was to use devlink_params_publish() which iterated over all
known up to that point parameters and sent notification messages.
In second step, the call was devlink_param_publish() that looped over
same parameters list and sent notification for new parameters.
In order to simplify the API, move devlink_params_publish() to be called
when all parameters were already added and save the need to iterate over
parameters list again.
As a side effect, this change fixes the error unwind flow in which
parameters were not marked as unpublished.
Fixes: 82e6c96f04e1 ("net/mlx5: Register to devlink ingress VLAN filter trap")
Signed-off-by: Leon Romanovsky <leonro@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core/devlink.c')
0 files changed, 0 insertions, 0 deletions