<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/openvswitch.git/ovsdb/ovsdb-client.c, branch master</title>
<subtitle>github.com: openvswitch/ovs.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/'/>
<entry>
<title>dpdk: Allow retaining CAP_SYS_RAWIO privileges.</title>
<updated>2023-03-22T17:56:02+00:00</updated>
<author>
<name>Aaron Conole</name>
<email>aconole@redhat.com</email>
</author>
<published>2023-03-16T12:00:39+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=07cf5810de8da12c700324bc421bde92376abe06'/>
<id>07cf5810de8da12c700324bc421bde92376abe06</id>
<content type='text'>
Open vSwitch generally tries to let the underlying operating system
managed the low level details of hardware, for example DMA mapping,
bus arbitration, etc.  However, when using DPDK, the underlying
operating system yields control of many of these details to userspace
for management.

In the case of some DPDK port drivers, configuring rte_flow or even
allocating resources may require access to iopl/ioperm calls, which
are guarded by the CAP_SYS_RAWIO privilege on linux systems.  These
calls are dangerous, and can allow a process to completely compromise
a system.  However, they are needed in the case of some userspace
driver code which manages the hardware (for example, the mlx
implementation of backend support for rte_flow).

Here, we create an opt-in flag passed to the command line to allow
this access.  We need to do this before ever accessing the database,
because we want to drop all privileges asap, and cannot wait for
a connection to the database to be established and functional before
dropping.  There may be distribution specific ways to do capability
management as well (using for example, systemd), but they are not
as universal to the vswitchd as a flag.

Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Signed-off-by: Aaron Conole &lt;aconole@redhat.com&gt;
Acked-by: Flavio Leitner &lt;fbl@sysclose.org&gt;
Acked-by: Gaetan Rivet &lt;gaetanr@nvidia.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Open vSwitch generally tries to let the underlying operating system
managed the low level details of hardware, for example DMA mapping,
bus arbitration, etc.  However, when using DPDK, the underlying
operating system yields control of many of these details to userspace
for management.

In the case of some DPDK port drivers, configuring rte_flow or even
allocating resources may require access to iopl/ioperm calls, which
are guarded by the CAP_SYS_RAWIO privilege on linux systems.  These
calls are dangerous, and can allow a process to completely compromise
a system.  However, they are needed in the case of some userspace
driver code which manages the hardware (for example, the mlx
implementation of backend support for rte_flow).

Here, we create an opt-in flag passed to the command line to allow
this access.  We need to do this before ever accessing the database,
because we want to drop all privileges asap, and cannot wait for
a connection to the database to be established and functional before
dropping.  There may be distribution specific ways to do capability
management as well (using for example, systemd), but they are not
as universal to the vswitchd as a flag.

Reviewed-by: Simon Horman &lt;simon.horman@corigine.com&gt;
Signed-off-by: Aaron Conole &lt;aconole@redhat.com&gt;
Acked-by: Flavio Leitner &lt;fbl@sysclose.org&gt;
Acked-by: Gaetan Rivet &lt;gaetanr@nvidia.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ovsdb: Make clients aware of relay service model.</title>
<updated>2021-07-15T20:38:49+00:00</updated>
<author>
<name>Ilya Maximets</name>
<email>i.maximets@ovn.org</email>
</author>
<published>2021-06-10T20:04:19+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=e26bf9726fad19bcf8bd48664d6ad9be63cdc8b5'/>
<id>e26bf9726fad19bcf8bd48664d6ad9be63cdc8b5</id>
<content type='text'>
Clients needs to re-connect from the relay that has no connection
with the database source.  Also, relay acts similarly to the follower
from a clustered model from the consistency point of view, so it's not
suitable for leader-only connections.

Acked-by: Mark D. Gray &lt;mark.d.gray@redhat.com&gt;
Acked-by: Dumitru Ceara &lt;dceara@redhat.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Clients needs to re-connect from the relay that has no connection
with the database source.  Also, relay acts similarly to the follower
from a clustered model from the consistency point of view, so it's not
suitable for leader-only connections.

Acked-by: Mark D. Gray &lt;mark.d.gray@redhat.com&gt;
Acked-by: Dumitru Ceara &lt;dceara@redhat.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ovsdb-client: Integrate record/replay functionality.</title>
<updated>2021-06-07T19:03:16+00:00</updated>
<author>
<name>Ilya Maximets</name>
<email>i.maximets@ovn.org</email>
</author>
<published>2021-05-27T13:29:06+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=4275b5b7fbb9437b265470670fa4aafb9acd8e23'/>
<id>4275b5b7fbb9437b265470670fa4aafb9acd8e23</id>
<content type='text'>
This is primarily to be able to test recording of client connections.
Unit test added accordingly.

Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
Acked-by: Dumitru Ceara &lt;dceara@redhat.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This is primarily to be able to test recording of client connections.
Unit test added accordingly.

Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
Acked-by: Dumitru Ceara &lt;dceara@redhat.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ovsdb-client: Fix needs-conversion when SERVER is explicitly specified.</title>
<updated>2021-02-19T18:02:05+00:00</updated>
<author>
<name>Alexey Roytman</name>
<email>roytman@il.ibm.com</email>
</author>
<published>2021-02-17T07:33:07+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=e775bf32e552e8ec781a5083d9d476a877e05681'/>
<id>e775bf32e552e8ec781a5083d9d476a877e05681</id>
<content type='text'>
When you try to specify `SERVER` to the 'ovsdb-client needs-conversion'
command, it interprets the `SERVER` parameter as the path to the schema
and returns an error.
This PR fixes it.

Fixes: 1b1d2e6daa56 ("ovsdb: Introduce experimental support for clustered databases.")
Submitted-at: https://github.com/openvswitch/ovs/pull/347
Signed-off-by: Alexey Roytman &lt;roytman@il.ibm.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
When you try to specify `SERVER` to the 'ovsdb-client needs-conversion'
command, it interprets the `SERVER` parameter as the path to the schema
and returns an error.
This PR fixes it.

Fixes: 1b1d2e6daa56 ("ovsdb: Introduce experimental support for clustered databases.")
Submitted-at: https://github.com/openvswitch/ovs/pull/347
Signed-off-by: Alexey Roytman &lt;roytman@il.ibm.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ovsdb-client: fix memory leak while executing database backup</title>
<updated>2019-10-09T18:03:46+00:00</updated>
<author>
<name>Damijan Skvarc</name>
<email>damjan.skvarc@gmail.com</email>
</author>
<published>2019-10-09T06:34:24+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=76c67e9ac3ad1e95249403777c5cd2b528633142'/>
<id>76c67e9ac3ad1e95249403777c5cd2b528633142</id>
<content type='text'>
valgrind detects this leak while running functional test "ovsdb-client backup and restore"

==25401== 1,068 (240 direct, 828 indirect) bytes in 6 blocks are definitely lost in loss record 22 of 22
==25401==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==25401==    by 0x449DA4: xmalloc (util.c:138)
==25401==    by 0x43012D: json_create (json.c:1451)
==25401==    by 0x43012D: json_array_create_empty (json.c:186)
==25401==    by 0x43012D: json_parser_push_array (json.c:1279)
==25401==    by 0x4303CF: json_parser_input (json.c:1407)
==25401==    by 0x4312F1: json_lex_input (json.c:991)
==25401==    by 0x43193B: json_parser_feed (json.c:1149)
==25401==    by 0x4329FA: jsonrpc_recv.part.7 (jsonrpc.c:332)
==25401==    by 0x432D3B: jsonrpc_recv (jsonrpc.c:297)
==25401==    by 0x432D3B: jsonrpc_recv_block (jsonrpc.c:402)
==25401==    by 0x4330EB: jsonrpc_transact_block (jsonrpc.c:436)
==25401==    by 0x409246: do_backup (ovsdb-client.c:2008)
==25401==    by 0x405F76: main (ovsdb-client.c:282)

the problem was in db_backup() function, where _uuid json node was detached from
its parent "row" json node, but never destroyed afterwards.

Signed-off-by: Damijan Skvarc &lt;damjan.skvarc@gmail.com&gt;
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
valgrind detects this leak while running functional test "ovsdb-client backup and restore"

==25401== 1,068 (240 direct, 828 indirect) bytes in 6 blocks are definitely lost in loss record 22 of 22
==25401==    at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==25401==    by 0x449DA4: xmalloc (util.c:138)
==25401==    by 0x43012D: json_create (json.c:1451)
==25401==    by 0x43012D: json_array_create_empty (json.c:186)
==25401==    by 0x43012D: json_parser_push_array (json.c:1279)
==25401==    by 0x4303CF: json_parser_input (json.c:1407)
==25401==    by 0x4312F1: json_lex_input (json.c:991)
==25401==    by 0x43193B: json_parser_feed (json.c:1149)
==25401==    by 0x4329FA: jsonrpc_recv.part.7 (jsonrpc.c:332)
==25401==    by 0x432D3B: jsonrpc_recv (jsonrpc.c:297)
==25401==    by 0x432D3B: jsonrpc_recv_block (jsonrpc.c:402)
==25401==    by 0x4330EB: jsonrpc_transact_block (jsonrpc.c:436)
==25401==    by 0x409246: do_backup (ovsdb-client.c:2008)
==25401==    by 0x405F76: main (ovsdb-client.c:282)

the problem was in db_backup() function, where _uuid json node was detached from
its parent "row" json node, but never destroyed afterwards.

Signed-off-by: Damijan Skvarc &lt;damjan.skvarc@gmail.com&gt;
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ovsdb-client: fix memory leak to prevent valgrind reporting memory leaks while running test suite</title>
<updated>2019-10-02T14:48:07+00:00</updated>
<author>
<name>Damijan Skvarc</name>
<email>damjan.skvarc@gmail.com</email>
</author>
<published>2019-10-02T09:37:52+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=e7ea37ac922b0873942fab34a4cb81fe05667073'/>
<id>e7ea37ac922b0873942fab34a4cb81fe05667073</id>
<content type='text'>
memory leaks are reported in several tests and are expressed in a following way:

==29840== 208 (48 direct, 160 indirect) bytes in 1 blocks are definitely lost in
 loss record 43 of 44
==29840==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64
-linux.so)
==29840==    by 0x449D12: xcalloc (util.c:121)
==29840==    by 0x432949: jsonrpc_msg_from_json (jsonrpc.c:697)
==29840==    by 0x432A8F: jsonrpc_parse_received_message (jsonrpc.c:472)
==29840==    by 0x432A8F: jsonrpc_recv.part.7 (jsonrpc.c:338)
==29840==    by 0x4338F7: jsonrpc_recv (jsonrpc.c:1139)
==29840==    by 0x4338F7: jsonrpc_session_recv (jsonrpc.c:1112)
==29840==    by 0x40719B: do_wait (ovsdb-client.c:2463)
==29840==    by 0x405F76: main (ovsdb-client.c:282)

Signed-off-by: Damijan Skvarc &lt;damjan.skvarc@gmail.com&gt;
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
memory leaks are reported in several tests and are expressed in a following way:

==29840== 208 (48 direct, 160 indirect) bytes in 1 blocks are definitely lost in
 loss record 43 of 44
==29840==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64
-linux.so)
==29840==    by 0x449D12: xcalloc (util.c:121)
==29840==    by 0x432949: jsonrpc_msg_from_json (jsonrpc.c:697)
==29840==    by 0x432A8F: jsonrpc_parse_received_message (jsonrpc.c:472)
==29840==    by 0x432A8F: jsonrpc_recv.part.7 (jsonrpc.c:338)
==29840==    by 0x4338F7: jsonrpc_recv (jsonrpc.c:1139)
==29840==    by 0x4338F7: jsonrpc_session_recv (jsonrpc.c:1112)
==29840==    by 0x40719B: do_wait (ovsdb-client.c:2463)
==29840==    by 0x405F76: main (ovsdb-client.c:282)

Signed-off-by: Damijan Skvarc &lt;damjan.skvarc@gmail.com&gt;
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ovsdb-client: fix memory leak in do_needs_conversion() and do_convert()</title>
<updated>2019-10-01T16:10:29+00:00</updated>
<author>
<name>Damijan Skvarc</name>
<email>damjan.skvarc@gmail.com</email>
</author>
<published>2019-09-30T08:21:00+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=3e0205082b52c8d46a9d2c9095087f6460a6ff30'/>
<id>3e0205082b52c8d46a9d2c9095087f6460a6ff30</id>
<content type='text'>
Memory leak itself is not so important, however the problem is that
it is caused by forgetting to close rpc channel which might in
a long term lead to the leak of system resources.

Memory leak is reported by Valgrin running test suite and is expressed as:

==29472== 784 (600 direct, 184 indirect) bytes in 1 blocks are definitely lost in loss record 23 of 23
==29472==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==29472==    by 0x449D32: xcalloc (util.c:121)
==29472==    by 0x432147: jsonrpc_open (jsonrpc.c:87)
==29472==    by 0x40ABBE: open_jsonrpc (ovsdb-client.c:528)
==29472==    by 0x40ABBE: open_rpc (ovsdb-client.c:143)
==29472==    by 0x40AE50: do_needs_conversion (ovsdb-client.c:1670)
==29472==    by 0x405F76: main (ovsdb-client.c:282)

==29464== 784 (600 direct, 184 indirect) bytes in 1 blocks are definitely lost in loss record 23 of 23
==29464==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==29464==    by 0x449D32: xcalloc (util.c:121)
==29464==    by 0x432147: jsonrpc_open (jsonrpc.c:87)
==29464==    by 0x40ABBE: open_jsonrpc (ovsdb-client.c:528)
==29464==    by 0x40ABBE: open_rpc (ovsdb-client.c:143)
==29464==    by 0x40AF5A: do_convert (ovsdb-client.c:1644)
==29464==    by 0x405F76: main (ovsdb-client.c:282)

Signed-off-by: Damijan Skvarc &lt;damjan.skvarc@gmail.com&gt;
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Memory leak itself is not so important, however the problem is that
it is caused by forgetting to close rpc channel which might in
a long term lead to the leak of system resources.

Memory leak is reported by Valgrin running test suite and is expressed as:

==29472== 784 (600 direct, 184 indirect) bytes in 1 blocks are definitely lost in loss record 23 of 23
==29472==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==29472==    by 0x449D32: xcalloc (util.c:121)
==29472==    by 0x432147: jsonrpc_open (jsonrpc.c:87)
==29472==    by 0x40ABBE: open_jsonrpc (ovsdb-client.c:528)
==29472==    by 0x40ABBE: open_rpc (ovsdb-client.c:143)
==29472==    by 0x40AE50: do_needs_conversion (ovsdb-client.c:1670)
==29472==    by 0x405F76: main (ovsdb-client.c:282)

==29464== 784 (600 direct, 184 indirect) bytes in 1 blocks are definitely lost in loss record 23 of 23
==29464==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==29464==    by 0x449D32: xcalloc (util.c:121)
==29464==    by 0x432147: jsonrpc_open (jsonrpc.c:87)
==29464==    by 0x40ABBE: open_jsonrpc (ovsdb-client.c:528)
==29464==    by 0x40ABBE: open_rpc (ovsdb-client.c:143)
==29464==    by 0x40AF5A: do_convert (ovsdb-client.c:1644)
==29464==    by 0x405F76: main (ovsdb-client.c:282)

Signed-off-by: Damijan Skvarc &lt;damjan.skvarc@gmail.com&gt;
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ovsdb-client: fix memory leak in is_database_clustered() function.</title>
<updated>2019-09-30T20:37:36+00:00</updated>
<author>
<name>Damijan Skvarc</name>
<email>damjan.skvarc@gmail.com</email>
</author>
<published>2019-09-30T07:40:48+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=a8d36f944ba5517052ae66dd7356d963259e5b28'/>
<id>a8d36f944ba5517052ae66dd7356d963259e5b28</id>
<content type='text'>
Memory leak is reported while running test suite. It is evidenced with the
following report:

==18447== 1,868 (48 direct, 1,820 indirect) bytes in 1 blocks are definitely lost in loss record 45 of 45
==18447==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==18447==    by 0x449C02: xcalloc (util.c:121)
==18447==    by 0x432949: jsonrpc_msg_from_json (jsonrpc.c:697)
==18447==    by 0x432A8F: jsonrpc_parse_received_message (jsonrpc.c:472)
==18447==    by 0x432A8F: jsonrpc_recv.part.7 (jsonrpc.c:338)
==18447==    by 0x432D0B: jsonrpc_recv (jsonrpc.c:297)
==18447==    by 0x432D0B: jsonrpc_recv_block (jsonrpc.c:402)
==18447==    by 0x4330BB: jsonrpc_transact_block (jsonrpc.c:436)
==18447==    by 0x40A7C1: is_database_clustered (ovsdb-client.c:1624)
==18447==    by 0x40AE3F: do_needs_conversion (ovsdb-client.c:1670)
==18447==    by 0x405F76: main (ovsdb-client.c:282)

Signed-off-by: Damijan Skvarc &lt;damjan.skvarc@gmail.com&gt;
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Memory leak is reported while running test suite. It is evidenced with the
following report:

==18447== 1,868 (48 direct, 1,820 indirect) bytes in 1 blocks are definitely lost in loss record 45 of 45
==18447==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==18447==    by 0x449C02: xcalloc (util.c:121)
==18447==    by 0x432949: jsonrpc_msg_from_json (jsonrpc.c:697)
==18447==    by 0x432A8F: jsonrpc_parse_received_message (jsonrpc.c:472)
==18447==    by 0x432A8F: jsonrpc_recv.part.7 (jsonrpc.c:338)
==18447==    by 0x432D0B: jsonrpc_recv (jsonrpc.c:297)
==18447==    by 0x432D0B: jsonrpc_recv_block (jsonrpc.c:402)
==18447==    by 0x4330BB: jsonrpc_transact_block (jsonrpc.c:436)
==18447==    by 0x40A7C1: is_database_clustered (ovsdb-client.c:1624)
==18447==    by 0x40AE3F: do_needs_conversion (ovsdb-client.c:1670)
==18447==    by 0x405F76: main (ovsdb-client.c:282)

Signed-off-by: Damijan Skvarc &lt;damjan.skvarc@gmail.com&gt;
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ovsdb-client: Free ovsdb_schema</title>
<updated>2019-09-19T16:23:54+00:00</updated>
<author>
<name>Yifeng Sun</name>
<email>pkusunyifeng@gmail.com</email>
</author>
<published>2019-09-11T21:18:32+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=48d8a65e75c7de6ca25589779ea397cd331b15b1'/>
<id>48d8a65e75c7de6ca25589779ea397cd331b15b1</id>
<content type='text'>
Valgrind reported:

1925: schema conversion online - standalone

==10727== 689 (56 direct, 633 indirect) bytes in 1 blocks are definitely lost in loss record 64 of 66
==10727==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==10727==    by 0x449D42: xcalloc (util.c:121)
==10727==    by 0x40F45C: ovsdb_schema_create (ovsdb.c:41)
==10727==    by 0x40F7F8: ovsdb_schema_from_json (ovsdb.c:217)
==10727==    by 0x40FB4E: ovsdb_schema_from_file (ovsdb.c:101)
==10727==    by 0x40B156: do_convert (ovsdb-client.c:1639)
==10727==    by 0x4061C6: main (ovsdb-client.c:282)

This patch fixes it.

Acked-by: William Tu &lt;u9012063@gmail.com&gt;
Signed-off-by: Yifeng Sun &lt;pkusunyifeng@gmail.com&gt;
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Valgrind reported:

1925: schema conversion online - standalone

==10727== 689 (56 direct, 633 indirect) bytes in 1 blocks are definitely lost in loss record 64 of 66
==10727==    at 0x4C2FB55: calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==10727==    by 0x449D42: xcalloc (util.c:121)
==10727==    by 0x40F45C: ovsdb_schema_create (ovsdb.c:41)
==10727==    by 0x40F7F8: ovsdb_schema_from_json (ovsdb.c:217)
==10727==    by 0x40FB4E: ovsdb_schema_from_file (ovsdb.c:101)
==10727==    by 0x40B156: do_convert (ovsdb-client.c:1639)
==10727==    by 0x4061C6: main (ovsdb-client.c:282)

This patch fixes it.

Acked-by: William Tu &lt;u9012063@gmail.com&gt;
Signed-off-by: Yifeng Sun &lt;pkusunyifeng@gmail.com&gt;
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>ovsdb-monitor: Support monitor_cond_since.</title>
<updated>2019-02-28T18:26:18+00:00</updated>
<author>
<name>Han Zhou</name>
<email>hzhou8@ebay.com</email>
</author>
<published>2019-02-28T17:15:18+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=9167cb52fa8708ff524be9fc41a8f5ccdfa0a15d'/>
<id>9167cb52fa8708ff524be9fc41a8f5ccdfa0a15d</id>
<content type='text'>
Support the new monitor method monitor_cond_since so that a client
can request monitoring start from a specific point instead of always
from beginning. This will reduce the cost at scenarios when server
is restarted/failed-over but client still has all existing data. In
these scenarios only new changes (and in most cases no change) needed
to be transfered to client. When ovsdb-server restarted, history
transactions are read from disk file; when ovsdb-server failed over,
history transactions exists already in the memory of the new server.

There are situations that the requested transaction may not be found.
For example, a transaction that is too old and has been discarded
from the maintained history list in memory, or the transactions on
disk has been compacted during ovsdb compaction. In those situations
the server fall backs to transfer all data start from begining.

For more details of the protocol change, see
Documentation/ref/ovsdb-server.7.rst.

This change includes both server side and ovsdb-client side changes
with the new protocol. IDLs using this capability will be added in
future patches.

Now the feature takes effect only for cluster mode of ovsdb-server,
because cluster mode is the only mode that supports unique transcation
uuid today. For other modes, the monitor_cond_since always fall back
to transfer all data with found = false. Support for those modes can
be added in the future.

Signed-off-by: Han Zhou &lt;hzhou8@ebay.com&gt;
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Support the new monitor method monitor_cond_since so that a client
can request monitoring start from a specific point instead of always
from beginning. This will reduce the cost at scenarios when server
is restarted/failed-over but client still has all existing data. In
these scenarios only new changes (and in most cases no change) needed
to be transfered to client. When ovsdb-server restarted, history
transactions are read from disk file; when ovsdb-server failed over,
history transactions exists already in the memory of the new server.

There are situations that the requested transaction may not be found.
For example, a transaction that is too old and has been discarded
from the maintained history list in memory, or the transactions on
disk has been compacted during ovsdb compaction. In those situations
the server fall backs to transfer all data start from begining.

For more details of the protocol change, see
Documentation/ref/ovsdb-server.7.rst.

This change includes both server side and ovsdb-client side changes
with the new protocol. IDLs using this capability will be added in
future patches.

Now the feature takes effect only for cluster mode of ovsdb-server,
because cluster mode is the only mode that supports unique transcation
uuid today. For other modes, the monitor_cond_since always fall back
to transfer all data with found = false. Support for those modes can
be added in the future.

Signed-off-by: Han Zhou &lt;hzhou8@ebay.com&gt;
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
