2
0
mirror of https://github.com/openvswitch/ovs synced 2025-08-28 12:58:00 +00:00

21 Commits

Author SHA1 Message Date
Ben Pfaff
29100ef2ba dynamic-string: Make ds_chomp() return true if it removed a character.
This will be used in an upcoming commit.

Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Jarno Rajahalme <jarno@ovn.org>
2016-02-19 00:02:16 -08:00
Andy Zhou
b614072b99 lib/dynamic-string: coding style fix
Remove tabs per coding style

Signed-off-by: Andy Zhou <azhou@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-09-01 15:16:24 -07:00
Jesse Gross
e7ae59f990 util: Library routines for printing and scanning large hex integers.
Geneve options are variable length and up to 124 bytes long, which means
that they can't be easily manipulated by the integer string functions
like we do for other fields. This adds a few helper routines to make
these operations easier.

Signed-off-by: Jesse Gross <jesse@nicira.com>
Acked-by: Andy Zhou <azhou@nicira.com>
2015-05-28 18:34:21 -07:00
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
Amit Bose
4052e3ff1a lib: Avoid using C++ keywords as variable names in header files.
Otherwise C++ programs can't #include the headers.

Signed-off-by: Amit Bose <bose@noironetworks.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2014-11-12 10:18:46 -08:00
Paul Ingram
2b31d8e713 vlog: Report timestamps in millisecond resolution in log messages.
To make debugging easier.

Signed-off-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Paul Ingram <pingram@nicira.com>
2013-09-13 09:11:46 -07:00
Ben Pfaff
bdda5aca7b ofp-parse: Do not exit() upon a parse error.
Until now, failure to parse a flow in the ofp-parse module has caused the
program to abort immediately with a fatal error.  This makes it hard to
use these functions from any long-lived program.  This commit fixes the
problem.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-07-08 10:15:00 -07:00
Ben Pfaff
3e78870d0b Always check return value of strftime().
strftime() returns 0 and leaves the contents of the output buffer
unspecified if the output buffer is not big enough.  Thus, one should
check strftime()'s return value.  Until now, OVS has had a few invocations
of strftime() that did not check the return value.  This commit fixes
those.  I believe that the buffers were always large enough in each case,
but it's better to be safe.

Reported-by: Andy Zhou <azhou@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2013-05-08 10:53:07 -07:00
Ben Pfaff
06d7ae7d9b dynamic-string: New function ds_get_test_line().
This eliminates some code duplication.   An upcoming commit will add
another user.

Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-10 11:44:05 -07:00
Raju Subramanian
e0edde6fee Global replace of Nicira Networks.
Replaced all instances of Nicira Networks(, Inc) to Nicira, Inc.

Feature #10593
Signed-off-by: Raju Subramanian <rsubramanian@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-02 17:08:02 -07:00
Ben Pfaff
541bc79f73 dynamic-string: Document a few functions.
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-02-27 10:07:47 -08:00
Gurucharan Shetty
b5d29991cc vlog: Change the default timestamp structure.
Change the default timestamp for console and file logs to
UTC in a format that satisfies timestamp requirements in RFC 5424.

Also, add the ability for ovs-appctl to log timestamps in UTC.

Bug #9052.

Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
2012-01-27 16:56:12 -08:00
Ben Pfaff
dd8101bc53 dynamic-string: New function ds_get_preprocessed_line().
This commit adds one user.  It will be useful elsewhere in an upcoming
commit.
2011-03-16 14:53:16 -07:00
Ben Pfaff
36c501fe78 dynamic-string: Optimize ds_put_char().
A qprof profile showed ds_put_char() and ds_put_uninit() as 4% of total
runtime.  This commit inlines the common case, which reduces them to 1%
total.
2010-05-05 14:00:50 -07:00
Ben Pfaff
e83fd21330 dynamic-string: New function ds_swap(). 2010-01-28 16:06:31 -08:00
Ben Pfaff
5f98eed4eb dynamic-string: New function ds_cstr_ro(). 2009-12-16 11:28:13 -08:00
Ben Pfaff
1fd13cde12 jsonrpc: Add logging for messages sent and received, at DBG level.
This made it much easier to see problems while developing some
ovsdb-server features.
2009-11-17 16:02:46 -08:00
Ben Pfaff
f38b84ea2b Implement JSON parsing and serialization.
This will be used by the upcoming Open vSwitch configuration database.
2009-11-04 15:24:40 -08:00
Ben Pfaff
4871855420 New function ds_steal_cstr(). 2009-07-16 09:17:06 -07:00
Ben Pfaff
a14bc59fb8 Update primary code license to Apache 2.0. 2009-06-15 15:11:30 -07:00
Ben Pfaff
064af42167 Import from old repository commit 61ef2b42a9c4ba8e1600f15bb0236765edc2ad45. 2009-07-08 13:19:16 -07:00