Remove USE_CONFIG_FLAG_CACHE, been enabled long time

This commit is contained in:
Olof hagsand 2024-01-12 11:24:24 +01:00
parent b258fc625c
commit 344f5ec39d
3 changed files with 0 additions and 16 deletions

View file

@ -127,12 +127,6 @@
*/ */
#undef LIST_PAGINATION_REMAINING #undef LIST_PAGINATION_REMAINING
/*! Use Ancestor config cache
*
* The cache uses two yang stmt flag bits. One to say it is active, the second its value
*/
#define USE_CONFIG_FLAG_CACHE
/*! If backend is restarted, cli and netconf client will retry (once) and reconnect /*! If backend is restarted, cli and netconf client will retry (once) and reconnect
* *
* Note, if client has locked or had edits in progress, these will be lost * Note, if client has locked or had edits in progress, these will be lost

View file

@ -61,10 +61,8 @@
#define YANG_FLAG_INDEX 0x08 /* This yang node under list is (extra) index. --> you can access #define YANG_FLAG_INDEX 0x08 /* This yang node under list is (extra) index. --> you can access
* list elements using this index with binary search */ * list elements using this index with binary search */
#endif #endif
#ifdef USE_CONFIG_FLAG_CACHE
#define YANG_FLAG_CONFIG_CACHE 0x10 /* Ancestor config cache is active */ #define YANG_FLAG_CONFIG_CACHE 0x10 /* Ancestor config cache is active */
#define YANG_FLAG_CONFIG_VALUE 0x20 /* Ancestor config cache value */ #define YANG_FLAG_CONFIG_VALUE 0x20 /* Ancestor config cache value */
#endif
#define YANG_FLAG_DISABLED 0x40 /* Disabled due to if-feature evaluate to false #define YANG_FLAG_DISABLED 0x40 /* Disabled due to if-feature evaluate to false
* Transformed to ANYDATA but some code may need to check * Transformed to ANYDATA but some code may need to check

View file

@ -3494,29 +3494,21 @@ yang_config_ancestor(yang_stmt *ys)
yp = ys; yp = ys;
do { do {
#ifdef USE_CONFIG_FLAG_CACHE
if (yang_flag_get(yp, YANG_FLAG_CONFIG_CACHE)) if (yang_flag_get(yp, YANG_FLAG_CONFIG_CACHE))
return yang_flag_get(yp, YANG_FLAG_CONFIG_VALUE)?1:0; return yang_flag_get(yp, YANG_FLAG_CONFIG_VALUE)?1:0;
#endif
if (yang_config(yp) == 0){ if (yang_config(yp) == 0){
#ifdef USE_CONFIG_FLAG_CACHE
yang_flag_set(yp, YANG_FLAG_CONFIG_CACHE); yang_flag_set(yp, YANG_FLAG_CONFIG_CACHE);
yang_flag_reset(yp, YANG_FLAG_CONFIG_VALUE); yang_flag_reset(yp, YANG_FLAG_CONFIG_VALUE);
#endif
return 0; return 0;
} }
if (yang_keyword_get(yp) == Y_INPUT || yang_keyword_get(yp) == Y_OUTPUT || yang_keyword_get(yp) == Y_NOTIFICATION){ if (yang_keyword_get(yp) == Y_INPUT || yang_keyword_get(yp) == Y_OUTPUT || yang_keyword_get(yp) == Y_NOTIFICATION){
#ifdef USE_CONFIG_FLAG_CACHE
yang_flag_set(yp, YANG_FLAG_CONFIG_CACHE); yang_flag_set(yp, YANG_FLAG_CONFIG_CACHE);
yang_flag_reset(yp, YANG_FLAG_CONFIG_VALUE); yang_flag_reset(yp, YANG_FLAG_CONFIG_VALUE);
#endif
return 0; return 0;
} }
} while((yp = yang_parent_get(yp)) != NULL); } while((yp = yang_parent_get(yp)) != NULL);
#ifdef USE_CONFIG_FLAG_CACHE
yang_flag_set(ys, YANG_FLAG_CONFIG_CACHE); yang_flag_set(ys, YANG_FLAG_CONFIG_CACHE);
yang_flag_set(ys, YANG_FLAG_CONFIG_VALUE); yang_flag_set(ys, YANG_FLAG_CONFIG_VALUE);
#endif
return 1; return 1;
} }