ofproto: Make ->construct() and ->destruct() more symmetrical.
authorBen Pfaff <blp@nicira.com>
Thu, 28 Jul 2011 21:19:52 +0000 (14:19 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 8 Aug 2011 23:05:34 +0000 (16:05 -0700)
commit073e2a6f2383cf7c17f78b8fa29e6e5293f60ba0
tree7db00b942bba4e10574473288cf142fedb104d20
parent79feb7dfc714780ba86de73d42fe366e45e22b05
ofproto: Make ->construct() and ->destruct() more symmetrical.

The ofproto_provider's ->construct() was required to allocate and
initialize the flow tables, but ->destruct() was not allowed to
uninitialize and free them.  This arrangement is oddly asymmetrical (and
undocumented), so this commit changes the code so that the client is
responsible for both allocation and freeing.

Reported-by: Hao Zheng <hzheng@nicira.com>
CC: Hao Zheng <hzheng@nicira.com>
ofproto/ofproto-dpif.c
ofproto/ofproto-provider.h
ofproto/ofproto.c