diff options
author | Renato Westphal <renato@opensourcerouting.org> | 2018-11-03 00:51:43 +0100 |
---|---|---|
committer | Renato Westphal <renato@opensourcerouting.org> | 2018-11-26 20:35:58 +0100 |
commit | 80243aef050c1f882a169b402ff5c50fed63b451 (patch) | |
tree | 13886bad2557f36b3e19a40fd7b5d105727faecb /lib/yang.h | |
parent | lib: use prefixconstptr instead of const prefixptr (diff) | |
download | frr-80243aef050c1f882a169b402ff5c50fed63b451.tar.xz frr-80243aef050c1f882a169b402ff5c50fed63b451.zip |
lib: don't fetch schema information when creating yang_data structures
Prefetching the schema node when creating yang_data structures is
expensive, and in most cases we don't need that information. In that case,
fetch the schema information only when necessary to improve performance
when fetching operational data.
Signed-off-by: Renato Westphal <renato@opensourcerouting.org>
Diffstat (limited to 'lib/yang.h')
-rw-r--r-- | lib/yang.h | 18 |
1 files changed, 2 insertions, 16 deletions
diff --git a/lib/yang.h b/lib/yang.h index b0348e320..ab605441a 100644 --- a/lib/yang.h +++ b/lib/yang.h @@ -69,12 +69,6 @@ struct yang_data { /* XPath identifier of the data element. */ char xpath[XPATH_MAXLEN]; - /* - * Schema information (necessary to interpret certain values like - * enums). - */ - const struct lys_node *snode; - /* Value encoded as a raw string. */ char *value; }; @@ -83,16 +77,8 @@ struct yang_list_keys { /* Number os keys (max: LIST_MAXKEYS). */ uint8_t num; - struct { - /* - * Schema information (necessary to interpret certain values - * like enums). - */ - struct lys_node *snode; - - /* Value encoded as a raw string. */ - char value[LIST_MAXKEYLEN]; - } key[LIST_MAXKEYS]; + /* Value encoded as a raw string. */ + char key[LIST_MAXKEYS][LIST_MAXKEYLEN]; }; enum yang_path_type { |