[ovs-dev] [PATCH 2/5] ovn-controller: Pass around pointers to individual tables.

Han Zhou zhouhan at gmail.com
Mon Jun 11 18:23:58 UTC 2018

On Fri, Jun 8, 2018 at 2:59 PM, Ben Pfaff <blp at ovn.org> wrote:
> We're working to make ovn-controller compute more incrementally, to reduce
> CPU usage.  To make it easier to keep track of dependencies, it makes
> to pass around pointers to fine-grained resources instead of an entire
> database at a time.  This commit introduces a way to pass individual
> around and starts using that feature in ovn-controller.
> CC: Han Zhou <zhouhan at gmail.com>
> Signed-off-by: Ben Pfaff <blp at ovn.org>
> ---

In this patch although tables are passed individually, the ctx parameter is
still kept for most functions. With ctx, it is still easy for the function
to access any tables than the individual tables passed.
I see two reasons why ctx is still kept in this patch:
1) index implementation requires passing the IDL, and I saw this is
addressed in next patches by redesigning the index mechanism
2) OVSDB transaction requires passing the ..._idl_txn in the ctx. I think
we can pass in ..._idl_txn directly instead of the ctx. This would avoid
the misuse of tables.

What do you think about point 2)?


More information about the dev mailing list