diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2019-09-17 02:51:11 +0200 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2019-09-18 19:35:10 +0200 |
commit | 8685be73e039dcb1b754e1fe21be96f60867219a (patch) | |
tree | 2f2bbd346162ed7672faefd0543211eec4c2ebd1 /lib/northbound.h | |
parent | lib: introduce new 'pre_validate' northbound callback (diff) | |
download | frr-8685be73e039dcb1b754e1fe21be96f60867219a.tar.xz frr-8685be73e039dcb1b754e1fe21be96f60867219a.zip |
Revert "lib: introduce a read-write lock for northbound configurations"
Adding a lock to protect the global running configuration doesn't
help much since the FRR daemons are not prepared to process
configuration changes in a pthread that is not the main one (a
whole lot of new protections would be necessary to prevent race
conditions).
This means the lock added by commit 83981138 only adds more
complexity for no benefit. Remove it now to simplify the code.
All northbound clients, including the gRPC one, should either run
in the main pthread or use synchronization primitives to process
configuration transactions in the main pthread.
This reverts commit 83981138fe8c1e0a40b8dede74eca65449dda5de.
Diffstat (limited to 'lib/northbound.h')
-rw-r--r-- | lib/northbound.h | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/lib/northbound.h b/lib/northbound.h index 502fbb9d6..50bddd157 100644 --- a/lib/northbound.h +++ b/lib/northbound.h @@ -449,19 +449,8 @@ enum nb_client { /* Northbound configuration. */ struct nb_config { - /* Configuration data. */ struct lyd_node *dnode; - - /* Configuration version. */ uint32_t version; - - /* - * Lock protecting this structure. The use of this lock is always - * necessary when reading or modifying the global running configuration. - * For candidate configurations, use of this lock is optional depending - * on the threading scheme of the northbound plugin. - */ - pthread_rwlock_t lock; }; /* Northbound configuration callback. */ |