[ovs-dev] [ovsdb-server multithreading RFC 2/9] ovsdb: Make 'remote' opaque in ovsdb_jsonrpc_session

Ben Pfaff blp at ovn.org
Sat Mar 19 00:20:58 UTC 2016


On Thu, Mar 03, 2016 at 12:13:21AM -0800, Andy Zhou wrote:
> It turns out there is no need for ovsdb_jsonrcp_session to have access

s/jsonrcp/jsonrpc/

> to the remote data structure. Make it opaque as a 'void *' pointer.
> The pointer value is still useful when selecting ovsdb_jsonrpc_sessions
> that of the same 'remote'.  This change will laster multi-threading

s/laster/later/

> patches easier because access to 'remote' does not need be protected.
> 
> Signed-off-by: Andy Zhou <azhou at ovn.org>

I am not sure I understand the benefit yet.  The definition of a struct
does not have to be visible for a piece of code to refer to it through a
pointer.  Also, using a void pointer loses a lot of type safety.

Can you explain further?

Thanks,

Ben.



More information about the dev mailing list