diff options
author | Eelco Chaudron <echaudro@redhat.com> | 2023-01-27 12:16:36 +0100 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2023-01-30 21:12:31 +0100 |
commit | e1e5eac5b0167c65c802bd60ed37605b1e1c9c92 (patch) | |
tree | e51d758510887ea2c19ce92cee1eac55f3d0c88b /lib/netdev-linux.c | |
parent | 3f85b11d50bbac9b7e746a1a061dd361ab2fa00f (diff) | |
download | openvswitch-e1e5eac5b0167c65c802bd60ed37605b1e1c9c92.tar.gz |
tc: Add TCA_KIND flower to delete and get operation to avoid rtnl_lock().
A long long time ago, an effort was made to make tc flower
rtnl_lock() free. However, on the OVS part we forgot to add
the TCA_KIND "flower" attribute, which tell the kernel to skip
the lock. This patch corrects this by adding the attribute for
the delete and get operations.
The kernel code calls tcf_proto_is_unlocked() to determine the
rtnl_lock() is needed for the specific tc protocol. It does this
in the tc_new_tfilter(), tc_del_tfilter(), and in tc_get_tfilter().
If the name is not set, tcf_proto_is_unlocked() will always return
false. If set, the specific protocol is queried for unlocked support.
Fixes: f98e418fbdb6 ("tc: Add tc flower functions")
Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'lib/netdev-linux.c')
-rw-r--r-- | lib/netdev-linux.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index f6d7a1b97..65bdd51db 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -2735,7 +2735,7 @@ tc_del_matchall_policer(struct netdev *netdev) } id = tc_make_tcf_id(ifindex, block_id, prio, TC_INGRESS); - err = tc_del_filter(&id); + err = tc_del_filter(&id, "matchall"); if (err) { return err; } |