2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-23 14:57:06 +00:00
Commit Graph

7 Commits

Author SHA1 Message Date
Thomas Graf
cab5044987 lib: Move compiler.h to <openvswitch/compiler.h>
The following macros are renamed to avoid conflicts with other headers:
 * WARN_UNUSED_RESULT to OVS_WARN_UNUSED_RESULT
 * PRINTF_FORMAT to OVS_PRINTF_FORMAT
 * NO_RETURN to OVS_NO_RETURN

Signed-off-by: Thomas Graf <tgraf@noironetworks.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2014-12-15 14:14:47 +01:00
Ben Pfaff
ff92993540 smap: New function smap_add_nocopy().
An upcoming commit will add a caller that needs to format both the key and
the value.  That isn't cleanly possible with the current interface.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Gurucharan Shetty <gshetty@nicira.com>
2014-07-17 10:30:33 -07:00
Ben Pfaff
57c8677b51 system-stats: Use "smap" instead of "shash".
"smap" is now the appropriate data structure for a string-to-string map.

Also changes ovsdb_datum_from_shash() into ovsdb_datum_from_smap() since
system-stats related code was the only client.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-07-18 10:51:02 -07:00
Ben Pfaff
51c82a49d5 smap: New function smap_steal().
An upcoming commit will add a caller.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-07-18 10:30:50 -07:00
Ben Pfaff
cccc135692 smap: New functions smap_from_json(), smap_to_json().
These will acquire a caller in an upcoming commit.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-07-18 10:30:50 -07:00
Ethan Jackson
4512aaa792 lib: Minor const tweak in smap library.
The source argument of smap_clone() isn't modified, and thus can be
declared const.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-06-19 12:55:25 -07:00
Ethan Jackson
79f1cbe9f8 lib: New data structure - smap.
A smap is a string to string hash map.  It has a cleaner interface
than shash's which were traditionally used for the same purpose.
This patch implements the data structure, and changes netdev and
its providers to use it.

Signed-off-by: Ethan Jackson <ethan@nicira.com>
2012-06-14 15:09:31 -07:00