On Fri, May 06, 2011 at 05:47:06PM -0700, Ethan Jackson wrote:
> > +int
> > +ofproto_delete(const char *name, const char *type)
> > +{
> > + ? ?struct dpif *dpif;
> > + ? ?int error;
> > +
> > + ? ?error = dpif_open(name, type, &dpif);
> > + ? ?if (!error) {
> > + ? ? ? ?error = dpif_delete(dpif);
> > + ? ? ? ?dpif_close(dpif);
> > + ? ?}
> > + ? ?return error;
> > +}
> 
> This function may deserve a comment.  I could imagine someone not
> familiar with the code confused about what precisely it does.

Good idea.  I added this comment:

/* Destroys the datapath with the respective 'name' and 'type'.  With the Linux
 * kernel datapath, for example, this destroys the datapath in the kernel, and
 * with the netdev-based datapath, it tears down the data structures that
 * represent the datapath.
 *
 * The datapath should not be currently open as an ofproto. */
_______________________________________________
dev mailing list
dev@openvswitch.org
http://openvswitch.org/mailman/listinfo/dev

Reply via email to